summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2023-02-01 18:58:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2023-02-01 18:58:56 +0000
commit8baae80cdfc9b91a837df927ba118c7c48147a8e (patch)
treef815af81053931d1e13572de3685dced91df5f97
parent18be12d0ddbff7b3e9faa91d31efd79d1da04e65 (diff)
parent4edce0100aed3ca4a3a18c0bdfee38a196e2fee9 (diff)
downloadLauncher3-8baae80cdfc9b91a837df927ba118c7c48147a8e.tar.gz
Merge "Dispatch onAnimationStart and End to maintain proper state" into tm-qpr-dev
-rw-r--r--quickstep/src/com/android/quickstep/interaction/AllSetActivity.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
index e0262d02eb..0389d077f7 100644
--- a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
@@ -240,6 +240,7 @@ public class AllSetActivity extends Activity {
maybeResumeOrPauseBackgroundAnimation();
if (mSwipeProgress.value >= 1) {
finishAndRemoveTask();
+ dispatchLauncherAnimStartEnd();
}
}
@@ -251,6 +252,18 @@ public class AllSetActivity extends Activity {
}
}
+ /**
+ * 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 @@ public class AllSetActivity extends Activity {
if (mBackgroundAnimatorListener != null) {
mAnimatedBackground.removeAnimatorListener(mBackgroundAnimatorListener);
}
+ dispatchLauncherAnimStartEnd();
}
private AnimatedFloat createSwipeUpProxy(GestureState state) {