Merge "Skip animation if there are no targets" into sc-v2-dev

This commit is contained in:
Winson Chung 2022-01-21 20:04:04 +00:00 committed by Android (Google) Code Review
commit cda2b35971
1 changed files with 4 additions and 2 deletions

View File

@ -4139,8 +4139,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
anim.play(ObjectAnimator.ofFloat(getPageAt(centerTaskIndex), anim.play(ObjectAnimator.ofFloat(getPageAt(centerTaskIndex),
mOrientationHandler.getPrimaryViewTranslate(), primaryTranslation)); mOrientationHandler.getPrimaryViewTranslate(), primaryTranslation));
int runningTaskIndex = recentsView.getRunningTaskIndex(); int runningTaskIndex = recentsView.getRunningTaskIndex();
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && runningTaskIndex != -1 if (ENABLE_QUICKSTEP_LIVE_TILE.get()
&& runningTaskIndex != taskIndex) { && runningTaskIndex != -1
&& runningTaskIndex != taskIndex
&& recentsView.getRemoteTargetHandles() != null) {
for (RemoteTargetHandle remoteHandle : recentsView.getRemoteTargetHandles()) { for (RemoteTargetHandle remoteHandle : recentsView.getRemoteTargetHandles()) {
anim.play(ObjectAnimator.ofFloat( anim.play(ObjectAnimator.ofFloat(
remoteHandle.getTaskViewSimulator().taskPrimaryTranslation, remoteHandle.getTaskViewSimulator().taskPrimaryTranslation,