summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-08-29 23:55:57 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-08-29 23:55:57 +0000
commitedadc51db490867b563148e35a1157e09cb8796e (patch)
tree52fe7b14987694cedb007471a43a1ef24b1454cf /src/com/android/launcher3/LauncherModel.java
parenteedf79d2deff0064abecc921e6286f1a3f930d77 (diff)
parentfc02c1b446ee54561ac7351fb6ff0f8294785f0e (diff)
downloadandroid_packages_apps_Trebuchet-edadc51db490867b563148e35a1157e09cb8796e.tar.gz
android_packages_apps_Trebuchet-edadc51db490867b563148e35a1157e09cb8796e.tar.bz2
android_packages_apps_Trebuchet-edadc51db490867b563148e35a1157e09cb8796e.zip
Use promisedIntent instead of intent when deep shortcuts are restored.
am: fc02c1b446 Change-Id: Ic4c7bc4dfbeb2260f411edd56df2df3769127365
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r--src/com/android/launcher3/LauncherModel.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 59c823b4b..68450e7a7 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -930,7 +930,8 @@ public class LauncherModel extends BroadcastReceiver
}
if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
incrementPinnedShortcutCount(
- ShortcutKey.fromItemInfo(item), true /* shouldPin */);
+ ShortcutKey.fromShortcutInfo((ShortcutInfo) item),
+ true /* shouldPin */);
}
break;
case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
@@ -999,7 +1000,8 @@ public class LauncherModel extends BroadcastReceiver
sBgWorkspaceItems.remove(item);
break;
case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT:
- decrementPinnedShortcutCount(ShortcutKey.fromItemInfo(item));
+ decrementPinnedShortcutCount(ShortcutKey.fromShortcutInfo(
+ (ShortcutInfo) item));
// Fall through.
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
@@ -3388,7 +3390,8 @@ public class LauncherModel extends BroadcastReceiver
for (ItemInfo itemInfo : sBgItemsIdMap) {
if (itemInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
ShortcutInfo si = (ShortcutInfo) itemInfo;
- if (si.getIntent().getPackage().equals(mPackageName) && si.user.equals(mUser)) {
+ if (si.getPromisedIntent().getPackage().equals(mPackageName)
+ && si.user.equals(mUser)) {
String shortcutId = si.getDeepShortcutId();
if (idsToShortcuts.containsKey(shortcutId)) {
idsToWorkspaceShortcutInfos.addToList(shortcutId, si);
@@ -3461,7 +3464,7 @@ public class LauncherModel extends BroadcastReceiver
ShortcutInfo si = (ShortcutInfo) itemInfo;
if (isUserUnlocked) {
ShortcutInfoCompat shortcut =
- pinnedShortcuts.get(ShortcutKey.fromItemInfo(si));
+ pinnedShortcuts.get(ShortcutKey.fromShortcutInfo(si));
// We couldn't verify the shortcut during loader. If its no longer available
// (probably due to clear data), delete the workspace item as well
if (shortcut == null) {