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
diff --git a/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java b/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java
index badb41a..5cf4f0b 100644
--- a/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java
+++ b/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java
@@ -78,6 +78,10 @@
}
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);