Merge "Fix pointer index out of range exception DO NOT MERGE" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
28a4cea5a0
@@ -57,6 +57,7 @@ public class StackTapPointerEventListener implements PointerEventListener {
|
|||||||
if (mPointerId >= 0) {
|
if (mPointerId >= 0) {
|
||||||
int index = motionEvent.findPointerIndex(mPointerId);
|
int index = motionEvent.findPointerIndex(mPointerId);
|
||||||
if ((motionEvent.getEventTime() - motionEvent.getDownTime()) > TAP_TIMEOUT_MSEC
|
if ((motionEvent.getEventTime() - motionEvent.getDownTime()) > TAP_TIMEOUT_MSEC
|
||||||
|
|| index < 0
|
||||||
|| (motionEvent.getX(index) - mDownX) > mMotionSlop
|
|| (motionEvent.getX(index) - mDownX) > mMotionSlop
|
||||||
|| (motionEvent.getY(index) - mDownY) > mMotionSlop) {
|
|| (motionEvent.getY(index) - mDownY) > mMotionSlop) {
|
||||||
mPointerId = -1;
|
mPointerId = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user