diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 1a616d0837..dc10c0f638 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -1761,12 +1761,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener true /* animateOverviewScrim */, launcherView).getAnimators()); } - if (!areAllTargetsTranslucent(appTargets)) { - anim.play(ObjectAnimator.ofFloat(mLauncher.getDepthController().stateDepth, - MULTI_PROPERTY_VALUE, - BACKGROUND_APP.getDepth(mLauncher), NORMAL.getDepth(mLauncher))); - } - // We play StaggeredWorkspaceAnim as a part of the closing window animation. playWorkspaceReveal = false; } diff --git a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java index 1328699082..11f1b6d37c 100644 --- a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java +++ b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java @@ -25,6 +25,7 @@ import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE; import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS; import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION; +import static com.android.launcher3.Flags.enableOverviewBackgroundWallpaperBlur; import static com.android.window.flags.Flags.predictiveBackThreeButtonNav; import static com.android.window.flags.Flags.removeDepartTargetFromMotion; @@ -98,7 +99,6 @@ public class LauncherBackAnimationController { Flags.predictiveBackToHomePolish() ? 0.75f : 0.85f; private static final float MAX_SCRIM_ALPHA_DARK = 0.8f; private static final float MAX_SCRIM_ALPHA_LIGHT = 0.2f; - private static final int MAX_BLUR_RADIUS = 20; private static final int MIN_BLUR_RADIUS_PRE_COMMIT = 10; private final QuickstepTransitionManager mQuickstepTransitionManager; @@ -130,6 +130,7 @@ public class LauncherBackAnimationController { private ValueAnimator mScrimAlphaAnimator; private float mScrimAlpha; private boolean mOverridingStatusBarFlags; + private int mMaxBlurRadius; private int mLastBlurRadius = 0; private final ComponentCallbacks mComponentCallbacks = new ComponentCallbacks() { @@ -411,7 +412,7 @@ public class LauncherBackAnimationController { final float[] colorComponents = new float[] { 0f, 0f, 0f }; mScrimAlpha = (isDarkTheme) ? MAX_SCRIM_ALPHA_DARK : MAX_SCRIM_ALPHA_LIGHT; - setBlur(MAX_BLUR_RADIUS); + setBlur(mMaxBlurRadius); mTransaction .setColor(mScrimLayer, colorComponents) .setAlpha(mScrimLayer, mScrimAlpha) @@ -439,7 +440,7 @@ public class LauncherBackAnimationController { // Scrim hasn't been attached yet. Let's attach it. addScrimLayer(); } else { - mLastBlurRadius = (int) lerp(MAX_BLUR_RADIUS, MIN_BLUR_RADIUS_PRE_COMMIT, progress); + mLastBlurRadius = (int) lerp(mMaxBlurRadius, MIN_BLUR_RADIUS_PRE_COMMIT, progress); setBlur(mLastBlurRadius); } float screenWidth = mStartRect.width(); @@ -626,6 +627,12 @@ public class LauncherBackAnimationController { : 0; mWindowScaleStartCornerRadius = QuickStepContract.getWindowCornerRadius(mLauncher); mStatusBarHeight = SystemBarUtils.getStatusBarHeight(mLauncher); + if (Flags.allAppsBlur() || enableOverviewBackgroundWallpaperBlur()) { + mMaxBlurRadius = mLauncher.getResources().getDimensionPixelSize( + R.dimen.max_depth_blur_radius_enhanced); + } else { + mMaxBlurRadius = mLauncher.getResources().getInteger(R.integer.max_depth_blur_radius); + } } /** diff --git a/quickstep/src/com/android/quickstep/util/ScalingWorkspaceRevealAnim.kt b/quickstep/src/com/android/quickstep/util/ScalingWorkspaceRevealAnim.kt index b1263ff441..273bba8b5f 100644 --- a/quickstep/src/com/android/quickstep/util/ScalingWorkspaceRevealAnim.kt +++ b/quickstep/src/com/android/quickstep/util/ScalingWorkspaceRevealAnim.kt @@ -147,10 +147,12 @@ class ScalingWorkspaceRevealAnim( } val transitionConfig = StateAnimationConfig() + transitionConfig.duration = SCALE_DURATION_MS // Match the Wallpaper animation to the rest of the content. val depthController = (launcher as? QuickstepLauncher)?.depthController transitionConfig.setInterpolator(StateAnimationConfig.ANIM_DEPTH, SCALE_INTERPOLATOR) + depthController?.stateDepth?.value = LauncherState.BACKGROUND_APP.getDepth(launcher) depthController?.setStateWithAnimation(LauncherState.NORMAL, transitionConfig, animation) // Make sure that the contrast scrim animates correctly if needed.