Merge "Prevent two overlapping long press actions." into ub-launcher3-rvc-dev
diff --git a/src/com/android/launcher3/CheckLongPressHelper.java b/src/com/android/launcher3/CheckLongPressHelper.java
index ef353f9..ff405ec 100644
--- a/src/com/android/launcher3/CheckLongPressHelper.java
+++ b/src/com/android/launcher3/CheckLongPressHelper.java
@@ -113,7 +113,10 @@
     }
 
     private void triggerLongPress() {
-        if ((mView.getParent() != null) && mView.hasWindowFocus() && !mHasPerformedLongPress) {
+        if ((mView.getParent() != null)
+                && mView.hasWindowFocus()
+                && (!mView.isPressed() || mListener == null)
+                && !mHasPerformedLongPress) {
             boolean handled;
             if (mListener != null) {
                 handled = mListener.onLongClick(mView);