Reset live tile params along with resetTaskVisuals

The dismissal animation doesn't return the translationY to 0, but resetTaskVisuals does.

Fixes: 207782306
Test: Drag live tile to dismiss lightly so it doesn't succeed. When it comes back, make sure it matches the cutout.
Change-Id: I64ee06ad72c403ab4fdd4671d08b1843a3e89253
This commit is contained in:
Tracy Zhou 2021-11-30 00:46:23 +00:00
parent ed05712f04
commit a56dc760dd
1 changed files with 10 additions and 0 deletions

View File

@ -1508,6 +1508,16 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
}
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
// resetTaskVisuals is called at the end of dismiss animation which could update
// primary and secondary translation of the live tile cut out. We will need to do so
// here accordingly.
runActionOnRemoteHandles(remoteTargetHandle -> {
TaskViewSimulator simulator = remoteTargetHandle.getTaskViewSimulator();
simulator.taskPrimaryTranslation.value = 0;
simulator.taskSecondaryTranslation.value = 0;
simulator.fullScreenProgress.value = 0;
simulator.recentsViewScale.value = 1;
});
// Similar to setRunningTaskHidden below, reapply the state before runningTaskView is
// null.
if (!mRunningTaskShowScreenshot) {