Loading src/com/android/launcher3/model/ItemInstallQueue.java +31 −2 Original line number Diff line number Diff line Loading @@ -104,9 +104,11 @@ public class ItemInstallQueue { @WorkerThread private void addToQueue(PendingInstallShortcutInfo info) { ensureQueueLoaded(); if (!mItems.contains(info)) { mItems.add(info); mStorage.write(mContext, mItems); } } @WorkerThread private void flushQueueInBackground() { Loading Loading @@ -303,6 +305,33 @@ public class ItemInstallQueue { } return null; } @Override public boolean equals(Object obj) { if (obj instanceof PendingInstallShortcutInfo) { PendingInstallShortcutInfo other = (PendingInstallShortcutInfo) obj; boolean userMatches = user.equals(other.user); boolean itemTypeMatches = itemType == other.itemType; boolean intentMatches = intent.toUri(0).equals(other.intent.toUri(0)); boolean shortcutInfoMatches = shortcutInfo == null ? other.shortcutInfo == null : other.shortcutInfo != null && shortcutInfo.getId().equals(other.shortcutInfo.getId()) && shortcutInfo.getPackage().equals(other.shortcutInfo.getPackage()); boolean providerInfoMatches = providerInfo == null ? other.providerInfo == null : other.providerInfo != null && providerInfo.provider.equals(other.providerInfo.provider); return userMatches && itemTypeMatches && intentMatches && shortcutInfoMatches && providerInfoMatches; } return false; } } private static String getIntentPackage(Intent intent) { Loading Loading
src/com/android/launcher3/model/ItemInstallQueue.java +31 −2 Original line number Diff line number Diff line Loading @@ -104,9 +104,11 @@ public class ItemInstallQueue { @WorkerThread private void addToQueue(PendingInstallShortcutInfo info) { ensureQueueLoaded(); if (!mItems.contains(info)) { mItems.add(info); mStorage.write(mContext, mItems); } } @WorkerThread private void flushQueueInBackground() { Loading Loading @@ -303,6 +305,33 @@ public class ItemInstallQueue { } return null; } @Override public boolean equals(Object obj) { if (obj instanceof PendingInstallShortcutInfo) { PendingInstallShortcutInfo other = (PendingInstallShortcutInfo) obj; boolean userMatches = user.equals(other.user); boolean itemTypeMatches = itemType == other.itemType; boolean intentMatches = intent.toUri(0).equals(other.intent.toUri(0)); boolean shortcutInfoMatches = shortcutInfo == null ? other.shortcutInfo == null : other.shortcutInfo != null && shortcutInfo.getId().equals(other.shortcutInfo.getId()) && shortcutInfo.getPackage().equals(other.shortcutInfo.getPackage()); boolean providerInfoMatches = providerInfo == null ? other.providerInfo == null : other.providerInfo != null && providerInfo.provider.equals(other.providerInfo.provider); return userMatches && itemTypeMatches && intentMatches && shortcutInfoMatches && providerInfoMatches; } return false; } } private static String getIntentPackage(Intent intent) { Loading