diff options
author | Tony Wickham <twickham@google.com> | 2016-07-27 17:10:01 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2016-07-27 17:10:01 -0700 |
commit | 8141d63ed1447afe500c1dffa4f38eba2acb3e6a (patch) | |
tree | 7f8cfd6deb952aabb9e4dde85153186ef89295bc /src | |
parent | 8fcdee05bb87fee8085048a27c954626d59dbb9b (diff) | |
download | android_packages_apps_Trebuchet-8141d63ed1447afe500c1dffa4f38eba2acb3e6a.tar.gz android_packages_apps_Trebuchet-8141d63ed1447afe500c1dffa4f38eba2acb3e6a.tar.bz2 android_packages_apps_Trebuchet-8141d63ed1447afe500c1dffa4f38eba2acb3e6a.zip |
Prevent opening shortcuts container if one is already open.
Bug: 30245433
Change-Id: Id50f9e4b9ff40e1d1124caee537a07a594d6a790
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java index a693f150a..73d85690e 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<String> ids = launcher.getShortcutIdsForItem((ItemInfo) icon.getTag()); if (!ids.isEmpty()) { // There are shortcuts associated with the app, so defer its drag. |