From 8141d63ed1447afe500c1dffa4f38eba2acb3e6a Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Wed, 27 Jul 2016 17:10:01 -0700 Subject: [PATCH] Prevent opening shortcuts container if one is already open. Bug: 30245433 Change-Id: Id50f9e4b9ff40e1d1124caee537a07a594d6a790 --- .../android/launcher3/shortcuts/DeepShortcutsContainer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java index a693f150ae..73d85690eb 100644 --- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java +++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java @@ -582,6 +582,11 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnLongC */ 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 ids = launcher.getShortcutIdsForItem((ItemInfo) icon.getTag()); if (!ids.isEmpty()) { // There are shortcuts associated with the app, so defer its drag.