diff options
author | Danesh M <daneshm90@gmail.com> | 2013-10-31 18:43:04 -0700 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-11-01 13:14:11 +0100 |
commit | 8d63521c205b0c95b06cce2f72cf03342371cb8d (patch) | |
tree | 2c78f64656278324f6955fa468ddf3970a3d04c6 | |
parent | 8db689f809298da46ac2f724bcf03e792b576bb2 (diff) | |
download | android_packages_apps_CMFileManager-8d63521c205b0c95b06cce2f72cf03342371cb8d.tar.gz android_packages_apps_CMFileManager-8d63521c205b0c95b06cce2f72cf03342371cb8d.tar.bz2 android_packages_apps_CMFileManager-8d63521c205b0c95b06cce2f72cf03342371cb8d.zip |
CMFileManager : Dismiss shortcutActivity before proceedingcm-10.2-M1
Issue reproduction steps :
Create shortcut to a file
Launch it
Press back
The shortcut activity never gets dismissed under certain conditions,
this takes care of those.
Change-Id: Ieca832fbb9f70ec54e1dbe22e9b1eac83f633baf
-rw-r--r-- | src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java b/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java index 4d56b375..c0711c50 100644 --- a/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java +++ b/src/com/cyanogenmod/filemanager/ui/policy/IntentsActionPolicy.java @@ -314,6 +314,9 @@ public final class IntentsActionPolicy extends ActionsPolicy { // No registered application if (info.size() == 0) { DialogHelper.showToast(ctx, R.string.msgs_not_registered_app, Toast.LENGTH_SHORT); + if (onDismissListener != null) { + onDismissListener.onDismiss(null); + } return; } @@ -327,12 +330,18 @@ public final class IntentsActionPolicy extends ActionsPolicy { // If we have a preferred application, then use it if (!choose && (mPreferredInfo != null && mPreferredInfo.match != 0)) { ctx.startActivity(getIntentFromResolveInfo(mPreferredInfo, intent)); + if (onDismissListener != null) { + onDismissListener.onDismiss(null); + } return; } // If there are only one activity (app or internal editor), then use it if (!choose && info.size() == 1) { ResolveInfo ri = info.get(0); ctx.startActivity(getIntentFromResolveInfo(ri, intent)); + if (onDismissListener != null) { + onDismissListener.onDismiss(null); + } return; } |