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

Commit d794e648 authored by Jim Miller's avatar Jim Miller
Browse files

Check for invalid pointer index in PagedView

Fixes bug 9088039

Change-Id: I54897df39adbf224ef3dd3de4ce7254fb70b587c
parent 606ab470
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;