Merge "Cancel the stash animation if the stash controller is destroyed before then" into main

This commit is contained in:
Treehugger Robot
2024-09-11 21:01:36 +00:00
committed by Android (Google) Code Review
@@ -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));
}