From 45ecd6aa7d9e90548ebd447c9ad4fa671689c1a1 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 26 May 2021 00:02:21 -0700 Subject: [PATCH] Add missing call to finish the home animation - This reset the task view's show-screenshot state to show the snapshot the next time the task view is visible Fixes: 186143625 Test: Enter pip w/ autoenter pip app, swipe up to overview Change-Id: I6a1ec3d0654a33b228f97a6009145450e72e8d48 --- .../src/com/android/quickstep/AbsSwipeUpHandler.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index e0f430d6cf..c09620268e 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -82,6 +82,7 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; +import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.logging.StatsLogManager.StatsLogger; import com.android.launcher3.statemanager.BaseState; @@ -1213,20 +1214,22 @@ public abstract class AbsSwipeUpHandler, && (windowRotation == ROTATION_90 || windowRotation == ROTATION_270)) { swipePipToHomeAnimator.setFromRotation(mTaskViewSimulator, windowRotation); } + AnimatorPlaybackController activityAnimationToHome = + homeAnimFactory.createActivityAnimationToHome(); swipePipToHomeAnimator.addListener(new AnimatorListenerAdapter() { private boolean mHasAnimationEnded; @Override public void onAnimationStart(Animator animation) { if (mHasAnimationEnded) return; - // Ensure Launcher ends in NORMAL state, we intentionally skip other callbacks - // since they are not relevant in this swipe-pip-to-home case. - homeAnimFactory.createActivityAnimationToHome().dispatchOnStart(); + // Ensure Launcher ends in NORMAL state + activityAnimationToHome.dispatchOnStart(); } @Override public void onAnimationEnd(Animator animation) { if (mHasAnimationEnded) return; mHasAnimationEnded = true; + activityAnimationToHome.getAnimationPlayer().end(); if (mRecentsAnimationController == null) { // If the recents animation is interrupted, we still end the running // animation (not canceled) so this is still called. In that case, we can