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

Commit 5ce77909 authored by Chandru S's avatar Chandru S
Browse files

Override the scrims alpha across the board to match the new UI specs

This is a temporary change that will be cleaned up as part of subsequent CLs.
Without this, surface blur effects are not visible behind the bouncer.
The plan is to move this to ScrimController and rely on scrimAlpha flows provided by different bouncer transitions.

Bug: 381263600
Flag: com.android.systemui.bouncer_ui_revamp
Test: verified manually, the surface behind lockscreen is visible when bouncer is opened.
Change-Id: I27f564268eaf501e3dfcacd7d45e4b1604c2577c
parent f8dd6ef3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import android.view.animation.DecelerateInterpolator;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.graphics.ColorUtils;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
import static com.android.systemui.Flags.notificationShadeBlur;
import com.android.systemui.window.flag.WindowBlurFlag;

/**
 * Drawable used on SysUI scrims.
@@ -214,8 +214,9 @@ public class ScrimDrawable extends Drawable {
    public void draw(@NonNull Canvas canvas) {
        mPaint.setColor(mMainColor);
        mPaint.setAlpha(mAlpha);
        if (notificationShadeBlur()) {
        if (WindowBlurFlag.isEnabled()) {
            // TODO(b/370555223): Match the alpha to the visual spec when it is finalized.
            // TODO (b/381263600), wire this at ScrimController, move it to PrimaryBouncerTransition
            mPaint.setAlpha((int) (0.5f * mAlpha));
        }
        if (mConcaveInfo != null) {
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.window.flag

import com.android.systemui.Flags

/**
 * Flag that controls whether the background surface is blurred or not while on the
 * lockscreen/shade/bouncer. This makes the background of scrim, bouncer and few other opaque
 * surfaces transparent so that we can see the blur effect on the background surface (wallpaper).
 */
object WindowBlurFlag {
    /** Whether the blur is enabled or not */
    @JvmStatic
    val isEnabled
        // Add flags here that require scrims/background surfaces to be transparent.
        get() = Flags.notificationShadeBlur() || Flags.bouncerUiRevamp()
}