Validate pointer index in PagedView#onMotionEvent
Fixes: 157400422 Change-Id: I556e2e05323ec7f0a47a8a8e3321b8196ee77bcc
This commit is contained in:
1 parent
69d772633d
commit
93bf1fe1f0
1 file changed
+2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user