diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index e77d2c6e01..c5d0b952c2 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -1057,9 +1057,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) { @@ -1085,9 +1085,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener new SurfaceControl.Transaction().remove(dimLayer).apply())); } - backgroundRadiusAnim.addListener( - AnimatorListeners.forEndCallback(depthController::dispose)); - return backgroundRadiusAnim; } diff --git a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java index 882682dc4a..957db6414e 100644 --- a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java +++ b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java @@ -94,18 +94,6 @@ public class DepthController extends BaseDepthController implements StateHandler } } - /** - * Cleans up after this controller so it can be garbage collected without leaving traces. - */ - public void dispose() { - removeSecondaryListeners(); - - if (mLauncher.getRootView() != null && mOnAttachListener != null) { - mLauncher.getRootView().removeOnAttachStateChangeListener(mOnAttachListener); - mOnAttachListener = null; - } - } - private void removeSecondaryListeners() { if (mCrossWindowBlurListener != null) { CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener);