SMainActivity changes to reflect changes made in 1.322
This commit is contained in:
parent
8c571146fb
commit
dea50b6851
|
@ -18,15 +18,17 @@ using StardewValley;
|
||||||
using Android.Widget;
|
using Android.Widget;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
using Android.Content.Res;
|
||||||
|
|
||||||
namespace StardewModdingAPI
|
namespace StardewModdingAPI
|
||||||
{
|
{
|
||||||
[Activity(Label = "Stardew Valley", Icon = "@mipmap/ic_launcher", Theme = "@style/Theme.Splash", MainLauncher = true, AlwaysRetainTaskState = true, LaunchMode = LaunchMode.SingleInstance, ScreenOrientation = ScreenOrientation.SensorLandscape, ConfigurationChanges = (ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.Orientation | ConfigChanges.ScreenLayout | ConfigChanges.ScreenSize | ConfigChanges.UiMode))]
|
[Activity(Label = "SMAPI Stardew Valley", Icon = "@mipmap/ic_launcher", Theme = "@style/Theme.Splash", MainLauncher = true, AlwaysRetainTaskState = true, LaunchMode = LaunchMode.SingleInstance, ScreenOrientation = ScreenOrientation.SensorLandscape, ConfigurationChanges = (ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.Orientation | ConfigChanges.ScreenLayout | ConfigChanges.ScreenSize | ConfigChanges.UiMode))]
|
||||||
public class SMainActivity: MainActivity, ILicenseCheckerCallback, IJavaObject, IDisposable
|
public class SMainActivity: MainActivity, ILicenseCheckerCallback, IJavaObject, IDisposable
|
||||||
{
|
{
|
||||||
private SCore core;
|
private SCore core;
|
||||||
private LicenseChecker _licenseChecker;
|
private LicenseChecker _licenseChecker;
|
||||||
private PowerManager.WakeLock _wakeLock;
|
private PowerManager.WakeLock _wakeLock;
|
||||||
|
private ServerManagedPolicyExtended _serverManagedPolicyExtended;
|
||||||
public new bool HasPermissions
|
public new bool HasPermissions
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -128,7 +130,7 @@ namespace StardewModdingAPI
|
||||||
|
|
||||||
private void CheckUsingServerManagedPolicy()
|
private void CheckUsingServerManagedPolicy()
|
||||||
{
|
{
|
||||||
byte[] salt = new byte[15]
|
this._serverManagedPolicyExtended = new ServerManagedPolicyExtended(this, new AESObfuscator(new byte[15]
|
||||||
{
|
{
|
||||||
46,
|
46,
|
||||||
65,
|
65,
|
||||||
|
@ -145,12 +147,8 @@ namespace StardewModdingAPI
|
||||||
77,
|
77,
|
||||||
117,
|
117,
|
||||||
36
|
36
|
||||||
};
|
}, this.PackageName, Settings.Secure.GetString(this.ContentResolver, "android_id")));
|
||||||
string packageName = this.PackageName;
|
this._licenseChecker = new LicenseChecker(this, this._serverManagedPolicyExtended, "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAry4fecehDpCohQk4XhiIZX9ylIGUThWZxfN9qwvQyTh53hvnpQl/lCrjfflKoPz6gz5jJn6JI1PTnoBy/iXVx1+kbO99qBgJE2V8PS5pq+Usbeqqmqqzx4lEzhiYQ2um92v4qkldNYZFwbTODYPIMbSbaLm7eK9ZyemaRbg9ssAl4QYs0EVxzDK1DjuXilRk28WxiK3lNJTz4cT38bfs4q6Zvuk1vWUvnMqcxiugox6c/9j4zZS5C4+k+WY6mHjUMuwssjCY3G+aImWDSwnU3w9G41q8EoPvJ1049PIi7GJXErusTYZITmqfonyejmSFLPt8LHtux9AmJgFSrC3UhwIDAQAB");
|
||||||
string @string = Settings.Secure.GetString(this.ContentResolver, "android_id");
|
|
||||||
AESObfuscator obfuscator = new AESObfuscator(salt, packageName, @string);
|
|
||||||
ServerManagedPolicy policy = new ServerManagedPolicy(this, obfuscator);
|
|
||||||
this._licenseChecker = new LicenseChecker(this, policy, "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAry4fecehDpCohQk4XhiIZX9ylIGUThWZxfN9qwvQyTh53hvnpQl/lCrjfflKoPz6gz5jJn6JI1PTnoBy/iXVx1+kbO99qBgJE2V8PS5pq+Usbeqqmqqzx4lEzhiYQ2um92v4qkldNYZFwbTODYPIMbSbaLm7eK9ZyemaRbg9ssAl4QYs0EVxzDK1DjuXilRk28WxiK3lNJTz4cT38bfs4q6Zvuk1vWUvnMqcxiugox6c/9j4zZS5C4+k+WY6mHjUMuwssjCY3G+aImWDSwnU3w9G41q8EoPvJ1049PIi7GJXErusTYZITmqfonyejmSFLPt8LHtux9AmJgFSrC3UhwIDAQAB");
|
|
||||||
this._licenseChecker.CheckAccess(this);
|
this._licenseChecker.CheckAccess(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,5 +189,10 @@ namespace StardewModdingAPI
|
||||||
{
|
{
|
||||||
base.OnWindowFocusChanged(hasFocus);
|
base.OnWindowFocusChanged(hasFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnConfigurationChanged(Configuration newConfig)
|
||||||
|
{
|
||||||
|
base.OnConfigurationChanged(newConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue