diff options
author | Tony Wickham <twickham@google.com> | 2016-10-21 18:51:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-10-21 18:51:50 +0000 |
commit | 5fd72d865e690a3bafedd39a6237152dbc894cc9 (patch) | |
tree | cf01fc0d411b22b3e821bf2b3ae0539c5bf4ebce | |
parent | 44ac57654534f1ff201f60e537b2ced53505cfc7 (diff) | |
parent | c92fe89327fcb3721e47672312613a1138a73afc (diff) | |
download | android_packages_apps_Trebuchet-5fd72d865e690a3bafedd39a6237152dbc894cc9.tar.gz android_packages_apps_Trebuchet-5fd72d865e690a3bafedd39a6237152dbc894cc9.tar.bz2 android_packages_apps_Trebuchet-5fd72d865e690a3bafedd39a6237152dbc894cc9.zip |
Merge "Don't allow multiple shortcuts to be dragged simultaneously." into ub-launcher3-master
-rw-r--r-- | src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java index b5126e95c..4daa09e01 100644 --- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java +++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java @@ -427,8 +427,10 @@ public class DeepShortcutsContainer extends AbstractFloatingView public boolean onLongClick(View v) { // Return early if this is not initiated from a touch or not the correct view if (!v.isInTouchMode() || !(v.getParent() instanceof DeepShortcutView)) return false; - // Return if global dragging is not enabled + // Return early if global dragging is not enabled if (!mLauncher.isDraggingEnabled()) return false; + // Return early if an item is already being dragged (e.g. when long-pressing two shortcuts) + if (mLauncher.getDragController().isDragging()) return false; // Long clicked on a shortcut. mDeferContainerRemoval = true; |