Cancelling long press on widgets if they don't handle touch/tap.

Change-Id: Id5f002f64d02d8d5fb9bdda8b062a026decbe0e2
diff --git a/src/com/android/launcher3/LauncherAppWidgetHostView.java b/src/com/android/launcher3/LauncherAppWidgetHostView.java
index 6157a87..faec8b6 100644
--- a/src/com/android/launcher3/LauncherAppWidgetHostView.java
+++ b/src/com/android/launcher3/LauncherAppWidgetHostView.java
@@ -87,6 +87,18 @@
         return false;
     }
 
+    public boolean onTouchEvent(MotionEvent ev) {
+        // If the widget does not handle touch, then cancel
+        // long press when we release the touch
+        switch (ev.getAction()) {
+            case MotionEvent.ACTION_UP:
+            case MotionEvent.ACTION_CANCEL:
+                mLongPressHelper.cancelLongPress();
+                break;
+        }
+        return false;
+    }
+
     @Override
     public void cancelLongPress() {
         super.cancelLongPress();