summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-07-29 01:14:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-07-29 01:14:22 +0000
commit6257bc327b0ddb579fe04882c0adf5eb852c9184 (patch)
tree27b8f191f973771c2a30f855f6c168bc1ec0b0ec /src
parent62d7023639e527e0f0986870289e174d80f20c1a (diff)
parent8141d63ed1447afe500c1dffa4f38eba2acb3e6a (diff)
downloadandroid_packages_apps_Trebuchet-6257bc327b0ddb579fe04882c0adf5eb852c9184.tar.gz
android_packages_apps_Trebuchet-6257bc327b0ddb579fe04882c0adf5eb852c9184.tar.bz2
android_packages_apps_Trebuchet-6257bc327b0ddb579fe04882c0adf5eb852c9184.zip
Merge "Prevent opening shortcuts container if one is already open." into ub-launcher3-calgary
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java5
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 ba48f26bc..7aa212321 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
@@ -735,6 +735,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.