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

Commit 93bf1fe1 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Validate pointer index in PagedView#onMotionEvent

Fixes: 157400422
Change-Id: I556e2e05323ec7f0a47a8a8e3321b8196ee77bcc
parent 69d77263
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1198,6 +1198,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
            if (mIsBeingDragged) {
                final int activePointerId = mActivePointerId;
                final int pointerIndex = ev.findPointerIndex(activePointerId);
                if (pointerIndex == -1) return true;

                final float primaryDirection = mOrientationHandler.getPrimaryDirection(ev,
                    pointerIndex);
                final VelocityTracker velocityTracker = mVelocityTracker;