This commit is contained in:
Philipp Crocoll
2020-06-11 07:27:23 +02:00
parent be1cc06a4b
commit 1625e5e3ac

View File

@@ -828,7 +828,7 @@ namespace keepass2android
Intent settingsIntent = new Intent(Android.Provider.Settings.ActionInputMethodSettings); Intent settingsIntent = new Intent(Android.Provider.Settings.ActionInputMethodSettings);
try try
{ {
settingsIntent.SetFlags(ActivityFlags.NewTask); settingsIntent.SetFlags(ActivityFlags.NewTask | ActivityFlags.ExcludeFromRecents);
StartActivity(settingsIntent); StartActivity(settingsIntent);
} }
catch (Exception e) catch (Exception e)
@@ -849,14 +849,14 @@ namespace keepass2android
ActivityManager.RunningAppProcessInfo appProcessInfo = new ActivityManager.RunningAppProcessInfo(); ActivityManager.RunningAppProcessInfo appProcessInfo = new ActivityManager.RunningAppProcessInfo();
ActivityManager.GetMyMemoryState(appProcessInfo); ActivityManager.GetMyMemoryState(appProcessInfo);
//at least on Samsung devices, we always need the helper activity //at least on Samsung devices, we always need the helper activity
mustUseHelperActivity = (appProcessInfo.Importance != Importance.Foreground) || (Build.Manufacturer != "Google"); mustUseHelperActivity = true;// TODO enable again (appProcessInfo.Importance != Importance.Foreground) || (Build.Manufacturer != "Google");
} }
if (mustUseHelperActivity) if (mustUseHelperActivity)
{ {
try try
{ {
Intent switchImeIntent = new Intent(this, typeof(SwitchImeActivity)); Intent switchImeIntent = new Intent(this, typeof(SwitchImeActivity));
switchImeIntent.SetFlags(ActivityFlags.NewTask); switchImeIntent.SetFlags(ActivityFlags.NewTask | ActivityFlags.ExcludeFromRecents);
StartActivity(switchImeIntent); StartActivity(switchImeIntent);
} }
catch (Exception e) catch (Exception e)
@@ -918,7 +918,7 @@ namespace keepass2android
if (App.Kp2a.LastOpenedEntry == null) if (App.Kp2a.LastOpenedEntry == null)
{ {
Intent i = new Intent(context, typeof(AppKilledInfo)); Intent i = new Intent(context, typeof(AppKilledInfo));
i.SetFlags(ActivityFlags.ClearTask | ActivityFlags.NewTask); i.SetFlags(ActivityFlags.ClearTask | ActivityFlags.NewTask | ActivityFlags.ExcludeFromRecents);
context.StartActivity(i); context.StartActivity(i);
return; return;
} }