Loading packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt +2 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ import com.android.compose.windowsizeclass.LocalWindowSizeClass import com.android.mechanics.behavior.VerticalExpandContainerSpec import com.android.mechanics.behavior.verticalExpandContainerBackground import com.android.systemui.res.R import com.android.systemui.shade.ui.ShadeColors.notificationScrim import com.android.systemui.shade.ui.ShadeColors.shadePanel import com.android.systemui.shade.ui.ShadeColors.shadePanelScrimBehind import com.android.systemui.shade.ui.composable.OverlayShade.rememberShadeExpansionMotion /** Renders a lightweight shade UI container, as an overlay. */ Loading Loading @@ -170,7 +170,7 @@ object OverlayShade { val ScrimBackground: Color @Composable @ReadOnlyComposable get() = Color(notificationScrim(LocalContext.current, /* blurSupported= */ true)) get() = Color(shadePanelScrimBehind(LocalContext.current)) @Composable @ReadOnlyComposable Loading packages/SystemUI/src/com/android/systemui/shade/ui/ShadeColors.kt +14 −11 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ 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). Loading @@ -34,11 +35,11 @@ object ShadeColors { if (withScrim) { ColorUtils.compositeColors( shadePanelStandard(context), shadePanelScrimBehind(context)) shadePanelScrimBehind(context), ) } else { shadePanelStandard(context) } } else { shadePanelFallback(context) } Loading @@ -54,18 +55,20 @@ object ShadeColors { } @JvmStatic private fun shadePanelStandard(context: Context): Int { val layerAbove = context.resources.getColor( com.android.internal.R.color.shade_panel_fg, context.theme) val layerBelow = context.resources.getColor( com.android.internal.R.color.shade_panel_bg, context.theme) return ColorUtils.compositeColors(layerAbove, layerBelow) fun shadePanelScrimBehind(context: Context): Int { return context.resources.getColor( com.android.internal.R.color.shade_panel_scrim, context.theme, ) } @JvmStatic private fun shadePanelScrimBehind(context: Context): Int { return context.resources.getColor( com.android.internal.R.color.shade_panel_scrim, context.theme) private fun shadePanelStandard(context: Context): Int { val layerAbove = context.resources.getColor(com.android.internal.R.color.shade_panel_fg, context.theme) val layerBelow = context.resources.getColor(com.android.internal.R.color.shade_panel_bg, context.theme) return ColorUtils.compositeColors(layerAbove, layerBelow) } @JvmStatic Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt +2 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ import com.android.compose.windowsizeclass.LocalWindowSizeClass import com.android.mechanics.behavior.VerticalExpandContainerSpec import com.android.mechanics.behavior.verticalExpandContainerBackground import com.android.systemui.res.R import com.android.systemui.shade.ui.ShadeColors.notificationScrim import com.android.systemui.shade.ui.ShadeColors.shadePanel import com.android.systemui.shade.ui.ShadeColors.shadePanelScrimBehind import com.android.systemui.shade.ui.composable.OverlayShade.rememberShadeExpansionMotion /** Renders a lightweight shade UI container, as an overlay. */ Loading Loading @@ -170,7 +170,7 @@ object OverlayShade { val ScrimBackground: Color @Composable @ReadOnlyComposable get() = Color(notificationScrim(LocalContext.current, /* blurSupported= */ true)) get() = Color(shadePanelScrimBehind(LocalContext.current)) @Composable @ReadOnlyComposable Loading
packages/SystemUI/src/com/android/systemui/shade/ui/ShadeColors.kt +14 −11 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ 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). Loading @@ -34,11 +35,11 @@ object ShadeColors { if (withScrim) { ColorUtils.compositeColors( shadePanelStandard(context), shadePanelScrimBehind(context)) shadePanelScrimBehind(context), ) } else { shadePanelStandard(context) } } else { shadePanelFallback(context) } Loading @@ -54,18 +55,20 @@ object ShadeColors { } @JvmStatic private fun shadePanelStandard(context: Context): Int { val layerAbove = context.resources.getColor( com.android.internal.R.color.shade_panel_fg, context.theme) val layerBelow = context.resources.getColor( com.android.internal.R.color.shade_panel_bg, context.theme) return ColorUtils.compositeColors(layerAbove, layerBelow) fun shadePanelScrimBehind(context: Context): Int { return context.resources.getColor( com.android.internal.R.color.shade_panel_scrim, context.theme, ) } @JvmStatic private fun shadePanelScrimBehind(context: Context): Int { return context.resources.getColor( com.android.internal.R.color.shade_panel_scrim, context.theme) private fun shadePanelStandard(context: Context): Int { val layerAbove = context.resources.getColor(com.android.internal.R.color.shade_panel_fg, context.theme) val layerBelow = context.resources.getColor(com.android.internal.R.color.shade_panel_bg, context.theme) return ColorUtils.compositeColors(layerAbove, layerBelow) } @JvmStatic Loading