Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d75448f authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Update displacement on ACTION_UP as well, in case ACTION_UP and...

[automerger] Update displacement on ACTION_UP as well, in case ACTION_UP and came in a different frame than last ACTION_MOVE am: ab66067d

Change-Id: Id8ff4d88a399ef4e45805a3b8bbc4fe18064bb17
parents 2daafb68 ab66067d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC
            case ACTION_UP: {
                TraceHelper.endSection("TouchInt");

                finishTouchTracking();
                finishTouchTracking(ev);
                break;
            }
        }
@@ -268,8 +268,10 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC
     * Called when the gesture has ended. Does not correlate to the completion of the interaction as
     * the animation can still be running.
     */
    private void finishTouchTracking() {
    private void finishTouchTracking(MotionEvent ev) {
        if (mPassedInitialSlop && mInteractionHandler != null) {
            mInteractionHandler.updateDisplacement(getDisplacement(ev) - mStartDisplacement);

            mVelocityTracker.computeCurrentVelocity(1000,
                    ViewConfiguration.get(this).getScaledMaximumFlingVelocity());