summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2010-03-10 19:08:17 (GMT)
committerAdam Powell <adamp@google.com>2010-03-10 19:08:17 (GMT)
commitc36f2455aba21448a130b9a5e2a118a379745c37 (patch)
tree3ac3e4f9e3b625c189f6b560d4225e1beeb4306c
parent3499d4aac4333e9dc33fe4d09bb261574a633e91 (diff)
downloadandroid_packages_apps_Trebuchet-c36f2455aba21448a130b9a5e2a118a379745c37.zip
android_packages_apps_Trebuchet-c36f2455aba21448a130b9a5e2a118a379745c37.tar.gz
android_packages_apps_Trebuchet-c36f2455aba21448a130b9a5e2a118a379745c37.tar.bz2
Cancel long press within normal touch slop, before paging touch slop.
Change-Id: I1b4d02db306bc0a7c3f39e2174a7239239ce4422
-rw-r--r--src/com/android/launcher2/Workspace.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 00d3c0f..d65a98c 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -616,12 +616,14 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
final int xDiff = (int) Math.abs(x - mLastMotionX);
final int yDiff = (int) Math.abs(y - mLastMotionY);
- boolean xMoved = xDiff > mPagingTouchSlop;
- boolean yMoved = yDiff > mTouchSlop;
+ final int touchSlop = mTouchSlop;
+ boolean xPaged = xDiff > mPagingTouchSlop;
+ boolean xMoved = xDiff > touchSlop;
+ boolean yMoved = yDiff > touchSlop;
if (xMoved || yMoved) {
- if (xMoved) {
+ if (xPaged) {
// Scroll if the user moved far enough along the X axis
mTouchState = TOUCH_STATE_SCROLLING;
mLastMotionX = x;