Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a85dd508 authored by Fan Zhang's avatar Fan Zhang
Browse files

Force shortcuts to launch as the root of a new task

Otherwise it will try to find a existing task affinity, which can be
stale.

Test: manual
Change-Id: If2982612bf8789e726757e9fda1f70af47274a9e
Fixes: 73710228
parent 6a6cc310
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class CreateShortcut extends LauncherActivity {
    @VisibleForTesting
    Intent createResultIntent(Intent shortcutIntent, ResolveInfo resolveInfo,
            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);
        ActivityInfo activityInfo = resolveInfo.activityInfo;