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

Commit fc47f89f authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

cmfm: create new activity stack when opening a new external intent



This change creates a new stack for the activity opened, so CMFM will not
be linked to the new activity

Change-Id: Ibbdc48d706698b296e27f49272e811d47d54a905
Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
parent df3b730a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ public final class IntentsActionPolicy extends ActionsPolicy {
            // Create the intent that will handle the shortcut
            Intent shortcutIntent = new Intent(ctx, ShortcutActivity.class);
            shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
            shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            if (FileHelper.isDirectory(fso)) {
                shortcutIntent.putExtra(
                        ShortcutActivity.EXTRA_TYPE,ShortcutActivity.SHORTCUT_TYPE_NAVIGATE);
@@ -471,6 +471,10 @@ public final class IntentsActionPolicy extends ActionsPolicy {
                        Intent.ACTION_VIEW);
            }
            intent.setAction(a);
        } else {
            // Create a new stack for the activity
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        }
        return intent;
    }