From f6780f66c3b7fe7bd8a2feaa8a1b839683bbbaeb Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Fri, 18 Mar 2022 09:58:55 -0700 Subject: [PATCH] Allow depth animation when user swipes back to home. Bug: 221196062 Test: open app, swipe back to home, ensure blurs Change-Id: I9faff4e41c2e8d22df72e41c7753e2090fa0973d --- .../com/android/launcher3/QuickstepTransitionManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index f14e2a2559..0e391ce6ec 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -28,6 +28,7 @@ import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.BACKGROUND_APP; +import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.Utilities.mapBoundToRange; import static com.android.launcher3.Utilities.postAsyncCallback; @@ -1617,6 +1618,12 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener if (!mLauncher.isInState(LauncherState.ALL_APPS)) { anim.play(new StaggeredWorkspaceAnim(mLauncher, velocity.y, true /* animateOverviewScrim */, launcherView).getAnimators()); + + if (!areAllTargetsTranslucent(appTargets)) { + anim.play(ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH, + BACKGROUND_APP.getDepth(mLauncher), NORMAL.getDepth(mLauncher))); + } + // We play StaggeredWorkspaceAnim as a part of the closing window animation. playWorkspaceReveal = false; } else {