Merge "Intercept abnormal MotionEvent in GestureDetector#onTouchEvent"

This commit is contained in:
Alan Viverette
2022-08-31 18:25:48 +00:00
committed by Android (Google) Code Review

View File

@@ -653,7 +653,7 @@ public class GestureDetector {
break;
case MotionEvent.ACTION_MOVE:
if (mInLongPress || mInContextClick) {
if ((mCurrentDownEvent == null) || mInLongPress || mInContextClick) {
break;
}
@@ -736,6 +736,9 @@ public class GestureDetector {
break;
case MotionEvent.ACTION_UP:
if (mCurrentDownEvent == null) {
break;
}
mStillDown = false;
MotionEvent currentUpEvent = MotionEvent.obtain(ev);
if (mIsDoubleTapping) {