Merge "Fix pointer index out of range exception DO NOT MERGE" into lmp-mr1-dev

This commit is contained in:
Craig Mautner
2015-01-08 18:34:00 +00:00
committed by Android (Google) Code Review

View File

@@ -57,6 +57,7 @@ public class StackTapPointerEventListener implements PointerEventListener {
if (mPointerId >= 0) {
int index = motionEvent.findPointerIndex(mPointerId);
if ((motionEvent.getEventTime() - motionEvent.getDownTime()) > TAP_TIMEOUT_MSEC
|| index < 0
|| (motionEvent.getX(index) - mDownX) > mMotionSlop
|| (motionEvent.getY(index) - mDownY) > mMotionSlop) {
mPointerId = -1;