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

Commit 2f48c4a7 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Check for invalid pointer index in PagedView" into jb-mr2-dev

parents 55bf965e d794e648
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1350,6 +1350,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
            if (mTouchState == TOUCH_STATE_SCROLLING) {
                // Scroll to follow the motion event
                final int pointerIndex = ev.findPointerIndex(mActivePointerId);

                if (pointerIndex == -1) return true;

                final float x = ev.getX(pointerIndex);
                final float deltaX = mLastMotionX + mLastMotionXRemainder - x;