From 14b919e2fde5fe2f5d1a3db13998042d3fabc960 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 15 Oct 2019 11:35:15 -0700 Subject: [PATCH] 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 --- src/com/android/launcher3/touch/SwipeDetector.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/android/launcher3/touch/SwipeDetector.java b/src/com/android/launcher3/touch/SwipeDetector.java index d0edfd87de..c38ca24d92 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;