From f75baa9f4023c0cf728360806891fd344aa8f3cd Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 22 Nov 2016 03:23:51 +0530 Subject: Adding support for deep shortcuts in Install queue Bug: 32904959 Change-Id: Ida43bcf78da716defdf95eb704c31973bc390ea1 --- src/com/android/launcher3/LauncherModel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/com/android/launcher3/LauncherModel.java') 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 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); } -- cgit v1.2.3