aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2014-06-28 00:00:14 +0200
committerJorge Ruesga <jorge@ruesga.com>2014-06-28 00:00:14 +0200
commitfc47f89f6fbe99dc155def5cce8932925c9fecbb (patch)
treeaeb8efe5cc59d0dd48705c0edb55a4d5d32b1d29
parentdf3b730a4df6aa057846bfe978cf3564ab5f6aa8 (diff)
downloadandroid_packages_apps_CMFileManager-fc47f89f6fbe99dc155def5cce8932925c9fecbb.tar.gz
android_packages_apps_CMFileManager-fc47f89f6fbe99dc155def5cce8932925c9fecbb.tar.bz2
android_packages_apps_CMFileManager-fc47f89f6fbe99dc155def5cce8932925c9fecbb.zip
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: Jorge Ruesga <jorge@ruesga.com>
-rw-r--r--src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java b/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java
index 852d2984..4d687dfe 100644
--- a/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java
+++ b/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java
@@ -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;
}