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

Commit 9d5f64ad authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Clear MotionPauseDetector onRecentsAnimationCanceled()" into tm-dev

parents 5d57e3d6 a379435d
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -425,10 +425,16 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
            mMainThreadHandler.removeCallbacks(mCancelRecentsAnimationRunnable);
            mMainThreadHandler.postDelayed(mCancelRecentsAnimationRunnable, 100);
        }
        cleanupAfterGesture();
        TraceHelper.INSTANCE.endSection(traceToken);
    }

    private void cleanupAfterGesture() {
        if (mVelocityTracker != null) {
            mVelocityTracker.recycle();
            mVelocityTracker = null;
        }
        mMotionPauseDetector.clear();
        TraceHelper.INSTANCE.endSection(traceToken);
    }

    @Override
@@ -453,6 +459,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
        Preconditions.assertUIThread();
        removeListener();
        mInteractionHandler = null;
        cleanupAfterGesture();
        mOnCompleteCallback.accept(this);
    }