Fixing longpress bug on widgets with a ListView

Change-Id: Idca7a8948ca21f1e7a1c332fd56303f903eb122d
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 35a767d..818cedd 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -744,6 +744,20 @@
         return super.dispatchTouchEvent(ev);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
+        if (disallowIntercept) {
+            // We need to make sure to cancel our long press if
+            // a scrollable widget takes over touch events
+            final View currentScreen = getChildAt(mCurrentScreen);
+            currentScreen.cancelLongPress();
+        }
+        super.requestDisallowInterceptTouchEvent(disallowIntercept);
+    }
+
     @Override
     public boolean onInterceptTouchEvent(MotionEvent ev) {
         final boolean workspaceLocked = mLauncher.isWorkspaceLocked();