summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/touch
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2019-06-01 15:04:52 -0700
committerAdam Cohen <adamcohen@google.com>2019-06-01 17:16:59 -0600
commitacdde3d750611476264a838d0a536d99404a692b (patch)
treeec9953dcd799341779984698c0c3ac1813244d26 /src/com/android/launcher3/touch
parent72c6e7b73651dcb0c3cacd12a284a8f3a42cd436 (diff)
downloadandroid_packages_apps_Trebuchet-acdde3d750611476264a838d0a536d99404a692b.tar.gz
android_packages_apps_Trebuchet-acdde3d750611476264a838d0a536d99404a692b.tar.bz2
android_packages_apps_Trebuchet-acdde3d750611476264a838d0a536d99404a692b.zip
Fix issue where Workspace scrolling doesn't work
=> The WorkspaceTouchListener was relying on receiving TOUCH_DOWN in order to clear its state. This is not guaranteed; ie. when touches begin above children of the workspace (icons or widgets) => Any invocation of the Workspace long press menu would trigger this issue and it would persist until a touch went directly onto the Workspace in a location without any children. Bug 132298752 Change-Id: Id8617baaa1ce59dc84758a7c82049329323b04cc
Diffstat (limited to 'src/com/android/launcher3/touch')
-rw-r--r--src/com/android/launcher3/touch/WorkspaceTouchListener.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/touch/WorkspaceTouchListener.java b/src/com/android/launcher3/touch/WorkspaceTouchListener.java
index 07ddccb31..310d598b2 100644
--- a/src/com/android/launcher3/touch/WorkspaceTouchListener.java
+++ b/src/com/android/launcher3/touch/WorkspaceTouchListener.java
@@ -99,7 +99,6 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
handleLongPress = mTempRect.contains((int) ev.getX(), (int) ev.getY());
}
- cancelLongPress();
if (handleLongPress) {
mLongPressState = STATE_REQUESTED;
mTouchDownPoint.set(ev.getX(), ev.getY());
@@ -148,6 +147,10 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
}
}
+ if (action == ACTION_UP || action == ACTION_CANCEL) {
+ cancelLongPress();
+ }
+
return result;
}