summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2019-10-15 11:35:15 -0700
committerTony Wickham <twickham@google.com>2019-10-15 11:35:15 -0700
commit14b919e2fde5fe2f5d1a3db13998042d3fabc960 (patch)
tree5cf106d36b2bc7244519fb0901bbdd98a74c00d5
parent3d97fdcfdf5ae39cf98b0bd7d1a5e260eecc1d9c (diff)
downloadpackages_apps_Trebuchet-14b919e2fde5fe2f5d1a3db13998042d3fabc960.tar.gz
packages_apps_Trebuchet-14b919e2fde5fe2f5d1a3db13998042d3fabc960.tar.bz2
packages_apps_Trebuchet-14b919e2fde5fe2f5d1a3db13998042d3fabc960.zip
Fix mSubtractDisplacement when recatching
Previously we correctly set mSubtractDisplacement when re-catching during the SETTLING state, but then immediately overrode it to be +/-mTouchSlop. Test: Swipe up to all apps, catch it by touching down during the transition, ensure there's no jump when starting to move again. Change-Id: I5d543e8a8b027b68bafb26b752e70862f6ae0777
-rw-r--r--src/com/android/launcher3/touch/SwipeDetector.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/android/launcher3/touch/SwipeDetector.java b/src/com/android/launcher3/touch/SwipeDetector.java
index d0edfd87d..c38ca24d9 100644
--- a/src/com/android/launcher3/touch/SwipeDetector.java
+++ b/src/com/android/launcher3/touch/SwipeDetector.java
@@ -330,8 +330,7 @@ public class SwipeDetector {
private void initializeDragging() {
if (mState == ScrollState.SETTLING && mIgnoreSlopWhenSettling) {
mSubtractDisplacement = 0;
- }
- if (mDisplacement > 0) {
+ } else if (mDisplacement > 0) {
mSubtractDisplacement = mTouchSlop;
} else {
mSubtractDisplacement = -mTouchSlop;