diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java index 37a595ec07..fce019b3e4 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java @@ -16,7 +16,6 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.AbstractFloatingView.TYPE_ACCESSIBLE; -import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_BOTH; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_POSITIVE; @@ -262,13 +261,6 @@ public abstract class TaskViewTouchController mCurrentAnimation.setPlayFraction(Utilities.boundToRange( totalDisplacement * mProgressMultiplier, 0, 1)); - if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { - if (mRecentsView.getCurrentPage() == 0) { - mRecentsView.getLiveTileTaskViewSimulator().setOffsetY( - isGoingUp ? totalDisplacement : 0); - mRecentsView.redrawLiveTile(); - } - } return true; } @@ -299,13 +291,6 @@ public abstract class TaskViewTouchController } mCurrentAnimation.setEndAction(() -> onCurrentAnimationEnd(goingToEnd, logAction)); - if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { - mCurrentAnimation.getAnimationPlayer().addUpdateListener(valueAnimator -> { - if (mRecentsView.getCurrentPage() != 0 || mCurrentAnimationIsGoingUp) { - mRecentsView.redrawLiveTile(); - } - }); - } mCurrentAnimation.startWithVelocity(mActivity, goingToEnd, velocity, mEndDisplacement, animationDuration); } 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 dda2c5c230..51e4a85a14 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 @@ -1501,6 +1501,13 @@ public abstract class RecentsView extends PagedView anim.addOnFrameCallback(this::updateCurveProperties); } + if (ENABLE_QUICKSTEP_LIVE_TILE.get() && getRunningTaskView() == taskView) { + anim.addOnFrameCallback(() -> { + mLiveTileTaskViewSimulator.setOffsetY(taskView.getTranslationY()); + redrawLiveTile(); + }); + } + // Add a tiny bit of translation Z, so that it draws on top of other views if (animateTaskView) { taskView.setTranslationZ(0.1f);