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: Jorge Ruesga <jorge@ruesga.com>
// 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);
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;
}