diff options
author | Tony Wickham <twickham@google.com> | 2016-08-29 15:17:48 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2016-08-29 15:59:28 -0700 |
commit | fc02c1b446ee54561ac7351fb6ff0f8294785f0e (patch) | |
tree | a4fdb8c15c5c1613bef61dd1d8ce5227216f8a23 /src/com/android/launcher3/Launcher.java | |
parent | 4a4b49ff3482cbe7f8192807cdc99437810fe518 (diff) | |
download | android_packages_apps_Trebuchet-fc02c1b446ee54561ac7351fb6ff0f8294785f0e.tar.gz android_packages_apps_Trebuchet-fc02c1b446ee54561ac7351fb6ff0f8294785f0e.tar.bz2 android_packages_apps_Trebuchet-fc02c1b446ee54561ac7351fb6ff0f8294785f0e.zip |
Use promisedIntent instead of intent when deep shortcuts are restored.
This ensures that the intent has the package corresponding to the
shortcut publisher, rather than a market intent. It also ensures that
the intent has the EXTRA_SHORTCUT_ID attached.
Bug: 31123204
Change-Id: I05d56396b629880322e915f52bfc0605b921b0b1
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index f125287bb..e1c64a72d 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2932,7 +2932,8 @@ public class Launcher extends Activity try { if (Utilities.ATLEAST_MARSHMALLOW && item != null && (item.itemType == Favorites.ITEM_TYPE_SHORTCUT - || item.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT)) { + || item.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT) + && ((ShortcutInfo) item).promisedIntent == null) { // Shortcuts need some special checks due to legacy reasons. startShortcutIntentSafely(intent, optsBundle, item); } else if (user == null || user.equals(UserHandleCompat.myUserHandle())) { @@ -4238,7 +4239,7 @@ public class Launcher extends Activity for (ShortcutInfo si : removed) { if (si.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT) { - removedDeepShortcuts.add(ShortcutKey.fromItemInfo(si)); + removedDeepShortcuts.add(ShortcutKey.fromShortcutInfo(si)); } else { removedComponents.add(si.getTargetComponent()); } |