Fix small scrolling regression
-> only cancel scrolling when necessary to avoid
unnecessary snapToDestination() calls
Change-Id: I406bef2453c88d61d25f66be67205ab8fbd69ec9
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 8181bea..3e2ec58 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -1368,10 +1368,13 @@
*/
final int xDist = Math.abs(mScroller.getFinalX() - mScroller.getCurrX());
final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop);
+
if (finishedScrolling) {
mTouchState = TOUCH_STATE_REST;
- mScrollAbortedFromIntercept = true;
- abortScrollerAnimation(false);
+ if (!mScroller.isFinished()) {
+ mScrollAbortedFromIntercept = true;
+ abortScrollerAnimation(false);
+ }
} else {
if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) {
mTouchState = TOUCH_STATE_SCROLLING;