diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-11-22 03:23:51 +0530 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-12-03 15:55:13 +0530 |
commit | f75baa9f4023c0cf728360806891fd344aa8f3cd (patch) | |
tree | 4e435203ac1763e72675b7cbd9cda480aec7e0c7 /src/com/android/launcher3/LauncherModel.java | |
parent | 36f71f873b5176fdd2b24886d0bc4371b1d5cb82 (diff) | |
download | android_packages_apps_Trebuchet-f75baa9f4023c0cf728360806891fd344aa8f3cd.tar.gz android_packages_apps_Trebuchet-f75baa9f4023c0cf728360806891fd344aa8f3cd.tar.bz2 android_packages_apps_Trebuchet-f75baa9f4023c0cf728360806891fd344aa8f3cd.zip |
Adding support for deep shortcuts in Install queue
Bug: 32904959
Change-Id: Ida43bcf78da716defdf95eb704c31973bc390ea1
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index c7bb188b3..cc56d439f 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -1776,9 +1776,12 @@ public class LauncherModel extends BroadcastReceiver } // Unpin shortcuts that don't exist on the workspace. + HashSet<ShortcutKey> pendingShortcuts = + InstallShortcutReceiver.getPendingShortcuts(context); for (ShortcutKey key : shortcutKeyToPinnedShortcuts.keySet()) { MutableInt numTimesPinned = sBgDataModel.pinnedShortcutCounts.get(key); - if (numTimesPinned == null || numTimesPinned.value == 0) { + if ((numTimesPinned == null || numTimesPinned.value == 0) + && !pendingShortcuts.contains(key)) { // Shortcut is pinned but doesn't exist on the workspace; unpin it. shortcutManager.unpinShortcut(key); } |