Merge "Validate pointer index in PagedView#onMotionEvent" into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-27 05:03:38 +00:00
committed by Android (Google) Code Review
+2
View File
@@ -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;