Merge "Revert "Reuse the main depth controller for launch animations."" into main

This commit is contained in:
Luca Zuccarini
2023-10-27 23:01:00 +00:00
committed by Android (Google) Code Review
2 changed files with 18 additions and 3 deletions

View File

@@ -1057,9 +1057,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
boolean allowBlurringLauncher = mLauncher.getStateManager().getState() != OVERVIEW
&& BlurUtils.supportsBlursOnWindows();
ObjectAnimator backgroundRadiusAnim =
ObjectAnimator.ofFloat(mLauncher.getDepthController().stateDepth,
MULTI_PROPERTY_VALUE, BACKGROUND_APP.getDepth(mLauncher))
LaunchDepthController depthController = new LaunchDepthController(mLauncher);
ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController.stateDepth,
MULTI_PROPERTY_VALUE, BACKGROUND_APP.getDepth(mLauncher))
.setDuration(APP_LAUNCH_DURATION);
if (allowBlurringLauncher) {
@@ -1085,6 +1085,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
new SurfaceControl.Transaction().remove(dimLayer).apply()));
}
backgroundRadiusAnim.addListener(
AnimatorListeners.forEndCallback(depthController::dispose));
return backgroundRadiusAnim;
}