Clear MotionPauseDetector onRecentsAnimationCanceled()

Fixes: 234022857
Test: Open ImCapture and swipe up to home; repeat 20 times and ensure never see empty overview tasks over launcher
Change-Id: Icef6d7a54000e1e21453feeae7e207679077b772
This commit is contained in:
Tony Wickham committed 2022-06-15 11:59:59 -07:00
1 parent fe83fce489
commit a379435d04
1 file changed
+10 -3
@@ -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);
}