diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java index d4db08f315..94345fc3f0 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java @@ -1183,6 +1183,12 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba * Clean up on destroy from TaskbarControllers */ public void onDestroy() { + // If the controller is destroyed before the animation finishes, we cancel the animation + // so that we don't finish the CUJ. + if (mAnimator != null) { + mAnimator.cancel(); + mAnimator = null; + } UI_HELPER_EXECUTOR.execute( () -> mAccessibilityManager.unregisterSystemAction(SYSTEM_ACTION_ID_TASKBAR)); }