mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Reuse the main depth controller for launch animations.
The two controllers don't own any unique state, other than the current depth state. These two _should_ never diverge anyway, because there is only one valid depth at any given time. By using the same controller all the time we can enforce this invariant. Everything else is basically just registered and unregistered listeners, which the main controller already does properly and always has the same state in that regard as the ad-hoc one that we're removing. Finally we don't need to take care of any cleanup explicitly, as we did before. Bug: 293427436 Flag: N/A Test: manual Change-Id: If6ea68847a60254df76e806eac2679ae0415bfe0
This commit is contained in:
@@ -1061,9 +1061,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
boolean allowBlurringLauncher = mLauncher.getStateManager().getState() != OVERVIEW
|
||||
&& BlurUtils.supportsBlursOnWindows();
|
||||
|
||||
LaunchDepthController depthController = new LaunchDepthController(mLauncher);
|
||||
ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController.stateDepth,
|
||||
MULTI_PROPERTY_VALUE, BACKGROUND_APP.getDepth(mLauncher))
|
||||
ObjectAnimator backgroundRadiusAnim =
|
||||
ObjectAnimator.ofFloat(mLauncher.getDepthController().stateDepth,
|
||||
MULTI_PROPERTY_VALUE, BACKGROUND_APP.getDepth(mLauncher))
|
||||
.setDuration(APP_LAUNCH_DURATION);
|
||||
|
||||
if (allowBlurringLauncher) {
|
||||
@@ -1089,9 +1089,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
new SurfaceControl.Transaction().remove(dimLayer).apply()));
|
||||
}
|
||||
|
||||
backgroundRadiusAnim.addListener(
|
||||
AnimatorListeners.forEndCallback(depthController::dispose));
|
||||
|
||||
return backgroundRadiusAnim;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user