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
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java
index 544835c..fb7d85f 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java
@@ -246,6 +246,11 @@
      * 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 @@
         mTaskbarVisibilityController.cleanup();
         mHotseatController.cleanup();
         mRecentsController.cleanup();
-
-        if (mAnimator != null) {
-            mAnimator.end();
-        }
     }
 
     private void removeFromWindowManager() {