Dispatch onAnimationStart and End to maintain proper state

The AnimatorPlaybackController from createLauncherStateFromSuwAnimation
does not ever get started (it's all user-driven) and thus some internal
state is not updated properly, namely mIsStashed is never set to false
even though the animation unstashes visually. This will break the first
"real" unstash animation after SUW. Thus, when the animation from SUW is
completed, we now dispatch onAnimationStart() and End() to ensure the
proper state is updated.

Test: adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
  Then, skip to the end and swipe to home; ensure first app launch
  properly stashes taskbar
Fixes: 263533070
Change-Id: I9553b8a884fb84303e2e97f14b9a7051e9de4709
diff --git a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
index e0262d0..0389d07 100644
--- a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
@@ -240,6 +240,7 @@
         maybeResumeOrPauseBackgroundAnimation();
         if (mSwipeProgress.value >= 1) {
             finishAndRemoveTask();
+            dispatchLauncherAnimStartEnd();
         }
     }
 
@@ -251,6 +252,18 @@
         }
     }
 
+    /**
+     * Should be called when we have successfully reached Launcher, so we dispatch to animation
+     * listeners to ensure the state matches the visual animation that just occurred.
+      */
+    private void dispatchLauncherAnimStartEnd() {
+        if (mLauncherStartAnim != null) {
+            mLauncherStartAnim.dispatchOnStart();
+            mLauncherStartAnim.dispatchOnEnd();
+            mLauncherStartAnim = null;
+        }
+    }
+
     @Override
     protected void onDestroy() {
         super.onDestroy();
@@ -259,6 +272,7 @@
         if (mBackgroundAnimatorListener != null) {
             mAnimatedBackground.removeAnimatorListener(mBackgroundAnimatorListener);
         }
+        dispatchLauncherAnimStartEnd();
     }
 
     private AnimatedFloat createSwipeUpProxy(GestureState state) {