Loading packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt +5 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,11 @@ object OverlayShade { val PanelBackground: Color @Composable @ReadOnlyComposable get() = Color(shadePanel(LocalContext.current, Flags.notificationShadeBlur())) get() = Color(shadePanel( context = LocalContext.current, blurSupported = Flags.notificationShadeBlur(), withScrim = false )) } object Dimensions { Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/BouncerToGoneFlows.kt +5 −1 Original line number Diff line number Diff line Loading @@ -194,7 +194,11 @@ constructor( bouncerBehindAlpha = 1.0f, ) val shadeNotifAlpha = colorAlpha(notificationScrim(context, isBlurCurrentlySupported)) val shadeBehindAlpha = colorAlpha(shadePanel(context, isBlurCurrentlySupported)) val shadeBehindAlpha = colorAlpha(shadePanel( context = context, blurSupported = isBlurCurrentlySupported, withScrim = true )) val bouncerBehindAlpha = if (isBlurCurrentlySupported) ScrimController.TRANSPARENT_BOUNCER_SCRIM_ALPHA else 1.0f return when { Loading packages/SystemUI/src/com/android/systemui/shade/ui/ShadeColors.kt +16 −4 Original line number Diff line number Diff line Loading @@ -21,12 +21,24 @@ import com.android.internal.graphics.ColorUtils import com.android.systemui.res.R object ShadeColors { /** * Calculate notification shade panel color. * @param context Context to resolve colors. * @param blurSupported Whether blur is enabled (can be off due to battery saver) * @param withScrim Whether to composite a scrim when blur is enabled (used by legacy shade). * @return color for the shade panel. */ @JvmStatic fun shadePanel(context: Context, blurSupported: Boolean): Int { fun shadePanel(context: Context, blurSupported: Boolean, withScrim: Boolean): Int { return if (blurSupported) { if (withScrim) { ColorUtils.compositeColors( shadePanelStandard(context), shadePanelScrimBehind(context)) } else { shadePanelStandard(context) } } else { shadePanelFallback(context) } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1647,7 +1647,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } private int getShadePanelColor() { return ShadeColors.shadePanel(mContext, isBlurCurrentlySupported()); return ShadeColors.shadePanel(mContext, isBlurCurrentlySupported(), true); } private void onThemeChanged() { Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt +5 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,11 @@ object OverlayShade { val PanelBackground: Color @Composable @ReadOnlyComposable get() = Color(shadePanel(LocalContext.current, Flags.notificationShadeBlur())) get() = Color(shadePanel( context = LocalContext.current, blurSupported = Flags.notificationShadeBlur(), withScrim = false )) } object Dimensions { Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/BouncerToGoneFlows.kt +5 −1 Original line number Diff line number Diff line Loading @@ -194,7 +194,11 @@ constructor( bouncerBehindAlpha = 1.0f, ) val shadeNotifAlpha = colorAlpha(notificationScrim(context, isBlurCurrentlySupported)) val shadeBehindAlpha = colorAlpha(shadePanel(context, isBlurCurrentlySupported)) val shadeBehindAlpha = colorAlpha(shadePanel( context = context, blurSupported = isBlurCurrentlySupported, withScrim = true )) val bouncerBehindAlpha = if (isBlurCurrentlySupported) ScrimController.TRANSPARENT_BOUNCER_SCRIM_ALPHA else 1.0f return when { Loading
packages/SystemUI/src/com/android/systemui/shade/ui/ShadeColors.kt +16 −4 Original line number Diff line number Diff line Loading @@ -21,12 +21,24 @@ import com.android.internal.graphics.ColorUtils import com.android.systemui.res.R object ShadeColors { /** * Calculate notification shade panel color. * @param context Context to resolve colors. * @param blurSupported Whether blur is enabled (can be off due to battery saver) * @param withScrim Whether to composite a scrim when blur is enabled (used by legacy shade). * @return color for the shade panel. */ @JvmStatic fun shadePanel(context: Context, blurSupported: Boolean): Int { fun shadePanel(context: Context, blurSupported: Boolean, withScrim: Boolean): Int { return if (blurSupported) { if (withScrim) { ColorUtils.compositeColors( shadePanelStandard(context), shadePanelScrimBehind(context)) } else { shadePanelStandard(context) } } else { shadePanelFallback(context) } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1647,7 +1647,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } private int getShadePanelColor() { return ShadeColors.shadePanel(mContext, isBlurCurrentlySupported()); return ShadeColors.shadePanel(mContext, isBlurCurrentlySupported(), true); } private void onThemeChanged() { Loading