diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java index 105b62a911..2de4036f9e 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java @@ -184,13 +184,21 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { } /** - * Adds animation for all the components corresponding to transition from an app to overview + * Adds animation for all the components corresponding to transition from an app to overview. */ public void addAppToOverviewAnim(PendingAnimation pa, TimeInterpolator interpolator) { pa.addFloat(fullScreenProgress, AnimatedFloat.VALUE, 1, 0, interpolator); pa.addFloat(recentsViewScale, AnimatedFloat.VALUE, getFullScreenScale(), 1, interpolator); } + /** + * Adds animation for all the components corresponding to transition from overview to the app. + */ + public void addOverviewToAppAnim(PendingAnimation pa, TimeInterpolator interpolator) { + pa.addFloat(fullScreenProgress, AnimatedFloat.VALUE, 0, 1, interpolator); + pa.addFloat(recentsViewScale, AnimatedFloat.VALUE, 1, getFullScreenScale(), interpolator); + } + /** * Returns the current clipped/visible window bounds in the window coordinate space */ diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java index 0fcd74bf2c..0a4cec7759 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java @@ -135,19 +135,6 @@ public class LauncherRecentsView extends RecentsView return anim; } - @Override - protected void onTaskLaunchAnimationUpdate(float progress, TaskView tv) { - if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { - if (tv.isRunningTask()) { - mLiveTileParams.setProgress(1 - progress) - .setSyncTransactionApplier(mSyncTransactionApplier); - // TODO: Revisit live tiles - } else { - redrawLiveTile(); - } - } - } - @Override protected void onTaskLaunchAnimationEnd(boolean success) { if (success) { diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index 49a9db978b..b478161f8e 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -1978,8 +1978,6 @@ public abstract class RecentsView extends PagedView ? targetSysUiFlags : 0); - onTaskLaunchAnimationUpdate(animator.getAnimatedFraction(), tv); - // Passing the threshold from taskview to fullscreen app will vibrate final boolean passed = animator.getAnimatedFraction() >= SUCCESS_TRANSITION_PROGRESS; @@ -2003,6 +2001,10 @@ public abstract class RecentsView extends PagedView mPendingAnimation = new PendingAnimation(duration); mPendingAnimation.add(anim); + if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { + mLiveTileTaskViewSimulator.addOverviewToAppAnim(mPendingAnimation, interpolator); + mPendingAnimation.addOnFrameCallback(this::redrawLiveTile); + } mPendingAnimation.addEndListener((endState) -> { if (endState.isSuccess) { Consumer onLaunchResult = (result) -> { @@ -2028,9 +2030,6 @@ public abstract class RecentsView extends PagedView return mPendingAnimation; } - protected void onTaskLaunchAnimationUpdate(float progress, TaskView tv) { - } - protected void onTaskLaunchAnimationEnd(boolean success) { if (success) { resetTaskVisuals();