Merge "Fix issue #6447773: Pulse does not run in JB (NPE in GestureDetector.onTouchEvent)" into jb-dev

This commit is contained in:
Dianne Hackborn
2012-05-21 15:25:48 -07:00
committed by Android (Google) Code Review

View File

@@ -585,8 +585,12 @@ public class GestureDetector {
}
// Hold the event we obtained above - listeners may have changed the original.
mPreviousUpEvent = currentUpEvent;
mVelocityTracker.recycle();
mVelocityTracker = null;
if (mVelocityTracker != null) {
// This may have been cleared when we called out to the
// application above.
mVelocityTracker.recycle();
mVelocityTracker = null;
}
mIsDoubleTapping = false;
mHandler.removeMessages(SHOW_PRESS);
mHandler.removeMessages(LONG_PRESS);