Prevent opening shortcuts container if one is already open.
am: 8141d63ed1
Change-Id: I0263738c17b069edc7295f67f1f5b00e1bfeae0d
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
index ba48f26..7aa2123 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
@@ -735,6 +735,11 @@
*/
public static DeepShortcutsContainer showForIcon(BubbleTextView icon) {
Launcher launcher = Launcher.getLauncher(icon.getContext());
+ if (launcher.getOpenShortcutsContainer() != null) {
+ // There is already a shortcuts container open, so don't open this one.
+ icon.clearFocus();
+ return null;
+ }
List<String> ids = launcher.getShortcutIdsForItem((ItemInfo) icon.getTag());
if (!ids.isEmpty()) {
// There are shortcuts associated with the app, so defer its drag.