OSDN Git Service

Start settings activity in a new task, so that if the LauncherActivity
authorSunny Goyal <sunnygoyal@google.com>
Thu, 4 May 2017 18:23:29 +0000 (11:23 -0700)
committerSunny Goyal <sunnygoyal@google.com>
Thu, 4 May 2017 18:24:19 +0000 (11:24 -0700)
finishes from behind, the task does not enter an inconsistant state

Bug: 37921974
Change-Id: I5f943ae89ce1099d3b9cf6a4902c7fd077beb764

src/com/android/launcher3/Launcher.java

index 27b8859..eef578d 100644 (file)
@@ -2555,6 +2555,7 @@ public class Launcher extends BaseActivity
         Intent intent = new Intent(Intent.ACTION_APPLICATION_PREFERENCES)
                 .setPackage(getPackageName());
         intent.setSourceBounds(getViewBounds(v));
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         startActivity(intent, getActivityLaunchOptions(v));
     }