summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/LauncherAppWidgetHostView.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherAppWidgetHostView.java b/src/com/android/launcher3/LauncherAppWidgetHostView.java
index 6157a8721..faec8b6c1 100644
--- a/src/com/android/launcher3/LauncherAppWidgetHostView.java
+++ b/src/com/android/launcher3/LauncherAppWidgetHostView.java
@@ -87,6 +87,18 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView {
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();