From 2e9de09383d1a7727fd6f89652a66991e4da5b26 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Wed, 10 Mar 2021 09:33:11 -0800 Subject: [PATCH] End Taskbar animator before other cleanup This ensures it doesn't try to set properties that have already been cleaned up. Test: Swipe home from an app, remove taskbar during transition Fixes: 182163822 Change-Id: Ia8779f044beeabd99e087288c3ae7f4f72c72d39 --- .../com/android/launcher3/taskbar/TaskbarController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java index 544835c317..fb7d85fd85 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java @@ -246,6 +246,11 @@ public class TaskbarController { * Removes the Taskbar from the screen, and removes any obsolete listeners etc. */ public void cleanup() { + if (mAnimator != null) { + // End this first, in case it relies on properties that are about to be cleaned up. + mAnimator.end(); + } + mTaskbarView.cleanup(); mTaskbarContainerView.cleanup(); removeFromWindowManager(); @@ -253,10 +258,6 @@ public class TaskbarController { mTaskbarVisibilityController.cleanup(); mHotseatController.cleanup(); mRecentsController.cleanup(); - - if (mAnimator != null) { - mAnimator.end(); - } } private void removeFromWindowManager() {