Loading core/java/android/view/GestureDetector.java +9 −2 Original line number Diff line number Diff line Loading @@ -494,6 +494,9 @@ public class GestureDetector { mLastMotionX = x; mLastMotionY = y; if (mCurrentDownEvent != null) { mCurrentDownEvent.recycle(); } mCurrentDownEvent = MotionEvent.obtain(ev); mAlwaysInTapRegion = true; mAlwaysInBiggerTapRegion = true; Loading Loading @@ -562,10 +565,14 @@ public class GestureDetector { if ((Math.abs(velocityY) > mMinimumFlingVelocity) || (Math.abs(velocityX) > mMinimumFlingVelocity)){ handled = mListener.onFling(mCurrentDownEvent, currentUpEvent, velocityX, velocityY); handled = mListener.onFling(mCurrentDownEvent, ev, velocityX, velocityY); } } if (mPreviousUpEvent != null) { mPreviousUpEvent.recycle(); } mPreviousUpEvent = MotionEvent.obtain(ev); // Hold the event we obtained above - listeners may have changed the original. mPreviousUpEvent = currentUpEvent; mVelocityTracker.recycle(); mVelocityTracker = null; mIsDoubleTapping = false; Loading Loading
core/java/android/view/GestureDetector.java +9 −2 Original line number Diff line number Diff line Loading @@ -494,6 +494,9 @@ public class GestureDetector { mLastMotionX = x; mLastMotionY = y; if (mCurrentDownEvent != null) { mCurrentDownEvent.recycle(); } mCurrentDownEvent = MotionEvent.obtain(ev); mAlwaysInTapRegion = true; mAlwaysInBiggerTapRegion = true; Loading Loading @@ -562,10 +565,14 @@ public class GestureDetector { if ((Math.abs(velocityY) > mMinimumFlingVelocity) || (Math.abs(velocityX) > mMinimumFlingVelocity)){ handled = mListener.onFling(mCurrentDownEvent, currentUpEvent, velocityX, velocityY); handled = mListener.onFling(mCurrentDownEvent, ev, velocityX, velocityY); } } if (mPreviousUpEvent != null) { mPreviousUpEvent.recycle(); } mPreviousUpEvent = MotionEvent.obtain(ev); // Hold the event we obtained above - listeners may have changed the original. mPreviousUpEvent = currentUpEvent; mVelocityTracker.recycle(); mVelocityTracker = null; mIsDoubleTapping = false; Loading