fix potential crash (opening an activity without NewTask flag)
This commit is contained in:
@@ -831,11 +831,14 @@ namespace keepass2android
|
||||
ActivityManager.RunningAppProcessInfo appProcessInfo = new ActivityManager.RunningAppProcessInfo();
|
||||
ActivityManager.GetMyMemoryState(appProcessInfo);
|
||||
//at least on Samsung devices, we always need the helper activity
|
||||
mustUseHelperActivity = (appProcessInfo.Importance != Importance.Foreground) || (Build.Manufacturer != "Google");
|
||||
//mustUseHelperActivity = (appProcessInfo.Importance != Importance.Foreground) || (Build.Manufacturer != "Google");
|
||||
mustUseHelperActivity = true;
|
||||
}
|
||||
if (mustUseHelperActivity)
|
||||
{
|
||||
StartActivity(typeof(SwitchImeActivity));
|
||||
Intent switchImeIntent = new Intent(this, typeof(SwitchImeActivity));
|
||||
switchImeIntent.SetFlags(ActivityFlags.NewTask);
|
||||
StartActivity(switchImeIntent);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user