am 94ac906b: Merge "Fix pointer index out of range exception"
* commit '94ac906b103b0f03eca2000815bf306209f33109': Fix pointer index out of range exception
This commit is contained in:
@@ -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
|
||||||
|| Math.abs(motionEvent.getX(index) - mDownX) > mMotionSlop
|
|| Math.abs(motionEvent.getX(index) - mDownX) > mMotionSlop
|
||||||
|| Math.abs(motionEvent.getY(index) - mDownY) > mMotionSlop) {
|
|| Math.abs(motionEvent.getY(index) - mDownY) > mMotionSlop) {
|
||||||
mPointerId = -1;
|
mPointerId = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user