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

This commit is contained in:
Tony Wickham
2022-06-16 14:55:48 +00:00
committed by Android (Google) Code Review

View File

@@ -425,12 +425,18 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
mMainThreadHandler.removeCallbacks(mCancelRecentsAnimationRunnable);
mMainThreadHandler.postDelayed(mCancelRecentsAnimationRunnable, 100);
}
mVelocityTracker.recycle();
mVelocityTracker = null;
mMotionPauseDetector.clear();
cleanupAfterGesture();
TraceHelper.INSTANCE.endSection(traceToken);
}
private void cleanupAfterGesture() {
if (mVelocityTracker != null) {
mVelocityTracker.recycle();
mVelocityTracker = null;
}
mMotionPauseDetector.clear();
}
@Override
public void notifyOrientationSetup() {
mRotationTouchHelper.onStartGesture();
@@ -453,6 +459,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
Preconditions.assertUIThread();
removeListener();
mInteractionHandler = null;
cleanupAfterGesture();
mOnCompleteCallback.accept(this);
}