Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7e3d8ab authored by Luca Zuccarini's avatar Luca Zuccarini Committed by Android (Google) Code Review
Browse files

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

parents fbc8b715 ff2b38e3
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1057,8 +1057,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
        boolean allowBlurringLauncher = mLauncher.getStateManager().getState() != OVERVIEW
                && BlurUtils.supportsBlursOnWindows();

        LaunchDepthController depthController = new LaunchDepthController(mLauncher);
        ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController.stateDepth,
        ObjectAnimator backgroundRadiusAnim =
                ObjectAnimator.ofFloat(mLauncher.getDepthController().stateDepth,
                                MULTI_PROPERTY_VALUE, BACKGROUND_APP.getDepth(mLauncher))
                .setDuration(APP_LAUNCH_DURATION);

@@ -1085,9 +1085,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
                    new SurfaceControl.Transaction().remove(dimLayer).apply()));
        }

        backgroundRadiusAnim.addListener(
                AnimatorListeners.forEndCallback(depthController::dispose));

        return backgroundRadiusAnim;
    }

+0 −12
Original line number Diff line number Diff line
@@ -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);