We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents de83e7a + 7a83b93 commit af5c011Copy full SHA for af5c011
core/java/android/view/GestureDetector.java
@@ -585,8 +585,12 @@ public boolean onTouchEvent(MotionEvent ev) {
585
}
586
// Hold the event we obtained above - listeners may have changed the original.
587
mPreviousUpEvent = currentUpEvent;
588
- mVelocityTracker.recycle();
589
- mVelocityTracker = null;
+ if (mVelocityTracker != null) {
+ // This may have been cleared when we called out to the
590
+ // application above.
591
+ mVelocityTracker.recycle();
592
+ mVelocityTracker = null;
593
+ }
594
mIsDoubleTapping = false;
595
mHandler.removeMessages(SHOW_PRESS);
596
mHandler.removeMessages(LONG_PRESS);
0 commit comments