From d3cc6643914968678e503e134b881f385709c8dc Mon Sep 17 00:00:00 2001 From: randypfohl Date: Mon, 12 Jun 2023 15:32:55 -0700 Subject: [PATCH] switching animation to screenshot to avoid visual jank Test: built locally, recorded, and slow replayed it to verify no jank/visual anomalies visible. Bug: 245750127 Change-Id: If7e72512d3303222f4d006a9e2a1639b2f86b1af --- .../states/QuickstepAtomicAnimationFactory.java | 4 ++++ .../src/com/android/quickstep/views/RecentsView.java | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java index c7cd39c100..a8d7538687 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java @@ -94,8 +94,12 @@ public class QuickstepAtomicAnimationFactory extends @Override public void prepareForAtomicAnimation(LauncherState fromState, LauncherState toState, StateAnimationConfig config) { + RecentsView overview = mActivity.getOverviewPanel(); if ((fromState == OVERVIEW || fromState == OVERVIEW_SPLIT_SELECT) && toState == NORMAL) { + overview.switchToScreenshot(() -> + overview.finishRecentsAnimation(true /* toRecents */, null)); + if (fromState == OVERVIEW_SPLIT_SELECT) { config.setInterpolator(ANIM_OVERVIEW_SPLIT_SELECT_FLOATING_TASK_TRANSLATE_OFFSCREEN, clampToProgress(EMPHASIZED_ACCELERATE, 0, 0.4f)); diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 6d78364f71..0a31a62aaf 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -4100,14 +4100,6 @@ public abstract class RecentsView { - TransformParams params = remoteTargetHandle.getTransformParams(); - params.setTargetAlpha(mContentAlpha); - if (params.getTargetSet() != null) { - remoteTargetHandle.getTaskViewSimulator().apply(params); - } - }); - int runningTaskId = getTaskIdsForRunningTaskView()[0]; for (int i = getTaskViewCount() - 1; i >= 0; i--) { TaskView child = requireTaskViewAt(i);