From 950388bf0e964e1f82ad90ff17ce0dc571e17d67 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 1 Jun 2021 13:56:00 -0700 Subject: [PATCH] Fix duplicate depth animations when swiping from overview to home - Add SKIP_DEPTH_CONTROLLER in OverviewToHomeAnim if WorkspaceRevealAnim is used, because WorkspaceRevealAnim already handles the depth. Test: visual, and also log to ensure we only get one call to DepthController#setStateWithAnimation() Fixes: 189060172 Change-Id: Ifb4ff3278272b3e98b4cf43bf94d6e108921ea80 --- .../src/com/android/quickstep/util/OverviewToHomeAnim.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java b/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java index badb41a7c9..5cf4f0b97f 100644 --- a/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java +++ b/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java @@ -78,6 +78,10 @@ public class OverviewToHomeAnim { } StateAnimationConfig config = new StateAnimationConfig(); + if (playWorkspaceRevealAnim) { + // WorkspaceRevealAnim handles the depth, so don't interfere. + config.animFlags |= StateAnimationConfig.SKIP_DEPTH_CONTROLLER; + } config.duration = startState.getTransitionDuration(mLauncher); AnimatorSet stateAnim = stateManager.createAtomicAnimation( startState, NORMAL, config);