summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-10-21 11:37:25 -0700
committerTony Wickham <twickham@google.com>2016-10-21 11:37:25 -0700
commitc92fe89327fcb3721e47672312613a1138a73afc (patch)
tree3fe5499af21c2e45b0cc2195186f24ec9a72cf5c /src/com/android/launcher3/shortcuts
parent3f0a53fa448fc077a1e3ca547bdd0f3bd408372f (diff)
downloadandroid_packages_apps_Trebuchet-c92fe89327fcb3721e47672312613a1138a73afc.tar.gz
android_packages_apps_Trebuchet-c92fe89327fcb3721e47672312613a1138a73afc.tar.bz2
android_packages_apps_Trebuchet-c92fe89327fcb3721e47672312613a1138a73afc.zip
Don't allow multiple shortcuts to be dragged simultaneously.
When starting a drag when another is already in progress, the original drag view is left dangling until launcher is killed. Bug: 32231238 Change-Id: I5ff94b82971c539231f8f588059dc84845cc88f0
Diffstat (limited to 'src/com/android/launcher3/shortcuts')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java4
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;