diff options
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); } |