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

Commit 801336a9 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Animate shade blur fallback" into main

parents de4d5f1c e0677abe
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -533,7 +533,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
    private void handleBlurSupportedChanged(boolean isBlurSupported) {
        this.mIsBlurSupported = isBlurSupported;
        if (Flags.bouncerUiRevamp()) {
            updateDefaultScrimAlphas();
            // TODO: animate blur fallback when the bouncer is pulled up.
            for (ScrimState state : ScrimState.values()) {
                state.setDefaultScrimAlpha(getDefaultScrimAlpha(true));
            }
            if (isBlurSupported) {
                ScrimState.BOUNCER_SCRIMMED.setNotifBlurRadius(mBlurConfig.getMaxBlurRadiusPx());
            } else {
@@ -541,7 +544,17 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
            }
        }
        if (Flags.notificationShadeBlur()) {
            float inFrontAlpha = mInFrontAlpha;
            float behindAlpha = mBehindAlpha;
            float notifAlpha = mNotificationsAlpha;

            mState.prepare(mState);
            applyState();
            startScrimAnimation(mScrimBehind, behindAlpha);
            startScrimAnimation(mNotificationsScrim, notifAlpha);
            startScrimAnimation(mScrimInFront, inFrontAlpha);
            dispatchBackScrimState(mScrimBehind.getViewAlpha());
        } else if (Flags.bouncerUiRevamp()) {
            applyAndDispatchState();
        }
    }