diff --git a/core/java/android/view/GestureDetector.java b/core/java/android/view/GestureDetector.java index 57ba7e9e816f4..f9bb880b1881e 100644 --- a/core/java/android/view/GestureDetector.java +++ b/core/java/android/view/GestureDetector.java @@ -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) {