Merge "Don't allow multiple shortcuts to be dragged simultaneously." into ub-launcher3-master
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
index b5126e9..4daa09e 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
@@ -427,8 +427,10 @@
     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;