Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa88b450 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "VelocityTracker should not be cleared until pointer up" into udc-dev

parents 3eb9626b b5f473ed
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -845,11 +845,7 @@ public class ScrollView extends FrameLayout {

                    // Calling overScrollBy will call onOverScrolled, which
                    // calls onScrollChanged if applicable.
                    if (overScrollBy(0, deltaY, 0, mScrollY, 0, range, 0, mOverscrollDistance, true)
                            && !hasNestedScrollingParent()) {
                        // Break our velocity if we hit a scroll barrier.
                        mVelocityTracker.clear();
                    }
                    overScrollBy(0, deltaY, 0, mScrollY, 0, range, 0, mOverscrollDistance, true);

                    final int scrolledDeltaY = mScrollY - oldY;
                    final int unconsumedY = deltaY - scrolledDeltaY;
@@ -894,6 +890,7 @@ public class ScrollView extends FrameLayout {

                    mActivePointerId = INVALID_POINTER;
                    endDrag();
                    velocityTracker.clear();
                }
                break;
            case MotionEvent.ACTION_CANCEL: