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
This commit is contained in:
Tony Wickham
2021-03-10 09:33:11 -08:00
parent 43b9310197
commit 2e9de09383

View File

@@ -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() {