Merge "Force shortcuts to launch as the root of a new task"

This commit is contained in:
TreeHugger Robot
2018-02-28 20:27:32 +00:00
committed by Android (Google) Code Review

View File

@@ -71,7 +71,7 @@ public class CreateShortcut extends LauncherActivity {
@VisibleForTesting @VisibleForTesting
Intent createResultIntent(Intent shortcutIntent, ResolveInfo resolveInfo, Intent createResultIntent(Intent shortcutIntent, ResolveInfo resolveInfo,
CharSequence label) { CharSequence label) {
shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
ShortcutManager sm = getSystemService(ShortcutManager.class); ShortcutManager sm = getSystemService(ShortcutManager.class);
ActivityInfo activityInfo = resolveInfo.activityInfo; ActivityInfo activityInfo = resolveInfo.activityInfo;