Loading packages/SystemUI/res/values-night/colors.xml +5 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,11 @@ <!-- The dark background color behind the shade --> <!-- The dark background color behind the shade --> <color name="shade_scrim_background_dark">@androidprv:color/system_under_surface_dark</color> <color name="shade_scrim_background_dark">@androidprv:color/system_under_surface_dark</color> <!-- The main FG tint for shade header items --> <!-- Only applicable when com.android.systemui.shade_header_blur_font_color is enabled --> <color name="shade_header_text_color" android:featureFlag="com.android.systemui.shade_header_blur_font_color">#FFFFFFFF</color> <color name="shade_header_text_color_bg" android:featureFlag="com.android.systemui.shade_header_blur_font_color">#FF000000</color> <!-- The color of the legacy notifications with customs backgrounds (gingerbread and lollipop.) <!-- The color of the legacy notifications with customs backgrounds (gingerbread and lollipop.) It's fine to override this color since at that point the shade was dark. --> It's fine to override this color since at that point the shade was dark. --> <color name="notification_legacy_background_color">@color/GM2_grey_900</color> <color name="notification_legacy_background_color">@color/GM2_grey_900</color> Loading packages/SystemUI/res/values/colors.xml +4 −1 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,10 @@ <color name="qs_tile_divider">#29ffffff</color><!-- 16% white --> <color name="qs_tile_divider">#29ffffff</color><!-- 16% white --> <color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white --> <color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white --> <color name="status_bar_clock_color">#FFFFFFFF</color> <color name="status_bar_clock_color">#FFFFFFFF</color> <color name="shade_header_text_color">#FFFFFFFF</color> <!-- The main FG tint for shade header items --> <color name="shade_header_text_color">#FF000000</color> <!-- The main BG tint for shade header items --> <color name="shade_header_text_color_bg">#FFFFFFFF</color> <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black --> <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black --> <color name="status_bar_icons_hover_color_light">#38FFFFFF</color> <!-- 22% white --> <color name="status_bar_icons_hover_color_light">#38FFFFFF</color> <!-- 22% white --> <color name="status_bar_icons_hover_color_dark">#38000000</color> <!-- 22% black --> <color name="status_bar_icons_hover_color_dark">#38000000</color> <!-- 22% black --> Loading packages/SystemUI/res/values/styles.xml +1 −2 Original line number Original line Diff line number Diff line Loading @@ -184,8 +184,7 @@ <style name="TextAppearance.QS.Status"> <style name="TextAppearance.QS.Status"> <item name="android:fontFamily" android:featureFlag="!com.android.systemui.shade_header_font_update">@*android:string/config_headlineFontFamily</item> <item name="android:fontFamily" android:featureFlag="!com.android.systemui.shade_header_font_update">@*android:string/config_headlineFontFamily</item> <item name="android:fontFamily" android:featureFlag="com.android.systemui.shade_header_font_update">variable-body-medium-emphasized</item> <item name="android:fontFamily" android:featureFlag="com.android.systemui.shade_header_font_update">variable-body-medium-emphasized</item> <item name="android:textColor" android:featureFlag="!com.android.systemui.shade_header_blur_font_color">@color/shade_header_text_color</item> <item name="android:textColor">@color/shade_header_text_color</item> <item name="android:textColor" android:featureFlag="com.android.systemui.shade_header_blur_font_color">@androidprv:color/materialColorOnSurface</item> <item name="android:textSize">14sp</item> <item name="android:textSize">14sp</item> <item name="android:letterSpacing">0.01</item> <item name="android:letterSpacing">0.01</item> </style> </style> Loading packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt +6 −4 Original line number Original line Diff line number Diff line Loading @@ -37,7 +37,6 @@ import android.widget.TextView import androidx.annotation.VisibleForTesting import androidx.annotation.VisibleForTesting import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color Loading Loading @@ -150,10 +149,12 @@ constructor( companion object { companion object { /** IDs for transitions and constraints for the [MotionLayout]. */ /** IDs for transitions and constraints for the [MotionLayout]. */ @VisibleForTesting internal val HEADER_TRANSITION_ID = R.id.header_transition @VisibleForTesting internal val HEADER_TRANSITION_ID = R.id.header_transition @VisibleForTesting @VisibleForTesting internal val LARGE_SCREEN_HEADER_TRANSITION_ID = R.id.large_screen_header_transition internal val LARGE_SCREEN_HEADER_TRANSITION_ID = R.id.large_screen_header_transition @VisibleForTesting internal val QQS_HEADER_CONSTRAINT = R.id.qqs_header_constraint @VisibleForTesting internal val QQS_HEADER_CONSTRAINT = R.id.qqs_header_constraint @VisibleForTesting internal val QS_HEADER_CONSTRAINT = R.id.qs_header_constraint @VisibleForTesting internal val QS_HEADER_CONSTRAINT = R.id.qs_header_constraint @VisibleForTesting @VisibleForTesting internal val LARGE_SCREEN_HEADER_CONSTRAINT = R.id.large_screen_header_constraint internal val LARGE_SCREEN_HEADER_CONSTRAINT = R.id.large_screen_header_constraint Loading Loading @@ -409,14 +410,14 @@ constructor( private fun getBgColor() = private fun getBgColor() = if (notificationShadeBlur()) { if (notificationShadeBlur()) { header.context.getColor(com.android.internal.R.color.materialColorSurfaceDim) header.context.getColor(R.color.shade_header_text_color_bg) } else { } else { android.graphics.Color.BLACK android.graphics.Color.BLACK } } private fun getFgColor() = private fun getFgColor() = if (notificationShadeBlur()) { if (notificationShadeBlur()) { header.context.getColor(com.android.internal.R.color.materialColorOnSurface) header.context.getColor(R.color.shade_header_text_color) } else { } else { android.graphics.Color.WHITE android.graphics.Color.WHITE } } Loading Loading @@ -452,7 +453,8 @@ constructor( viewModelFactory = unifiedBatteryViewModelFactory, viewModelFactory = unifiedBatteryViewModelFactory, isDarkProvider = { IsAreaDark { dark } }, isDarkProvider = { IsAreaDark { dark } }, textColor = textColor = if (notificationShadeBlur()) MaterialTheme.colorScheme.onSurface if (notificationShadeBlur()) Color(context.getColor(R.color.shade_header_text_color)) else Color.White, else Color.White, showEstimate = showBatteryEstimate, showEstimate = showBatteryEstimate, ) ) Loading packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -305,8 +305,8 @@ class ShadeHeaderControllerTest : SysuiTestCase() { verify(clock).setTextAppearance(R.style.TextAppearance_QS_Status) verify(clock).setTextAppearance(R.style.TextAppearance_QS_Status) verify(date).setTextAppearance(R.style.TextAppearance_QS_Status) verify(date).setTextAppearance(R.style.TextAppearance_QS_Status) val fgColor = context.getColor(com.android.internal.R.color.materialColorOnSurface) val fgColor = context.getColor(R.color.shade_header_text_color) val bgColor = context.getColor(com.android.internal.R.color.materialColorSurfaceDim) val bgColor = context.getColor(R.color.shade_header_text_color_bg) verify(carrierGroup) verify(carrierGroup) .updateTextAppearanceAndTint(R.style.TextAppearance_QS_Status, fgColor, bgColor) .updateTextAppearanceAndTint(R.style.TextAppearance_QS_Status, fgColor, bgColor) } } Loading Loading
packages/SystemUI/res/values-night/colors.xml +5 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,11 @@ <!-- The dark background color behind the shade --> <!-- The dark background color behind the shade --> <color name="shade_scrim_background_dark">@androidprv:color/system_under_surface_dark</color> <color name="shade_scrim_background_dark">@androidprv:color/system_under_surface_dark</color> <!-- The main FG tint for shade header items --> <!-- Only applicable when com.android.systemui.shade_header_blur_font_color is enabled --> <color name="shade_header_text_color" android:featureFlag="com.android.systemui.shade_header_blur_font_color">#FFFFFFFF</color> <color name="shade_header_text_color_bg" android:featureFlag="com.android.systemui.shade_header_blur_font_color">#FF000000</color> <!-- The color of the legacy notifications with customs backgrounds (gingerbread and lollipop.) <!-- The color of the legacy notifications with customs backgrounds (gingerbread and lollipop.) It's fine to override this color since at that point the shade was dark. --> It's fine to override this color since at that point the shade was dark. --> <color name="notification_legacy_background_color">@color/GM2_grey_900</color> <color name="notification_legacy_background_color">@color/GM2_grey_900</color> Loading
packages/SystemUI/res/values/colors.xml +4 −1 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,10 @@ <color name="qs_tile_divider">#29ffffff</color><!-- 16% white --> <color name="qs_tile_divider">#29ffffff</color><!-- 16% white --> <color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white --> <color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white --> <color name="status_bar_clock_color">#FFFFFFFF</color> <color name="status_bar_clock_color">#FFFFFFFF</color> <color name="shade_header_text_color">#FFFFFFFF</color> <!-- The main FG tint for shade header items --> <color name="shade_header_text_color">#FF000000</color> <!-- The main BG tint for shade header items --> <color name="shade_header_text_color_bg">#FFFFFFFF</color> <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black --> <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black --> <color name="status_bar_icons_hover_color_light">#38FFFFFF</color> <!-- 22% white --> <color name="status_bar_icons_hover_color_light">#38FFFFFF</color> <!-- 22% white --> <color name="status_bar_icons_hover_color_dark">#38000000</color> <!-- 22% black --> <color name="status_bar_icons_hover_color_dark">#38000000</color> <!-- 22% black --> Loading
packages/SystemUI/res/values/styles.xml +1 −2 Original line number Original line Diff line number Diff line Loading @@ -184,8 +184,7 @@ <style name="TextAppearance.QS.Status"> <style name="TextAppearance.QS.Status"> <item name="android:fontFamily" android:featureFlag="!com.android.systemui.shade_header_font_update">@*android:string/config_headlineFontFamily</item> <item name="android:fontFamily" android:featureFlag="!com.android.systemui.shade_header_font_update">@*android:string/config_headlineFontFamily</item> <item name="android:fontFamily" android:featureFlag="com.android.systemui.shade_header_font_update">variable-body-medium-emphasized</item> <item name="android:fontFamily" android:featureFlag="com.android.systemui.shade_header_font_update">variable-body-medium-emphasized</item> <item name="android:textColor" android:featureFlag="!com.android.systemui.shade_header_blur_font_color">@color/shade_header_text_color</item> <item name="android:textColor">@color/shade_header_text_color</item> <item name="android:textColor" android:featureFlag="com.android.systemui.shade_header_blur_font_color">@androidprv:color/materialColorOnSurface</item> <item name="android:textSize">14sp</item> <item name="android:textSize">14sp</item> <item name="android:letterSpacing">0.01</item> <item name="android:letterSpacing">0.01</item> </style> </style> Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt +6 −4 Original line number Original line Diff line number Diff line Loading @@ -37,7 +37,6 @@ import android.widget.TextView import androidx.annotation.VisibleForTesting import androidx.annotation.VisibleForTesting import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color Loading Loading @@ -150,10 +149,12 @@ constructor( companion object { companion object { /** IDs for transitions and constraints for the [MotionLayout]. */ /** IDs for transitions and constraints for the [MotionLayout]. */ @VisibleForTesting internal val HEADER_TRANSITION_ID = R.id.header_transition @VisibleForTesting internal val HEADER_TRANSITION_ID = R.id.header_transition @VisibleForTesting @VisibleForTesting internal val LARGE_SCREEN_HEADER_TRANSITION_ID = R.id.large_screen_header_transition internal val LARGE_SCREEN_HEADER_TRANSITION_ID = R.id.large_screen_header_transition @VisibleForTesting internal val QQS_HEADER_CONSTRAINT = R.id.qqs_header_constraint @VisibleForTesting internal val QQS_HEADER_CONSTRAINT = R.id.qqs_header_constraint @VisibleForTesting internal val QS_HEADER_CONSTRAINT = R.id.qs_header_constraint @VisibleForTesting internal val QS_HEADER_CONSTRAINT = R.id.qs_header_constraint @VisibleForTesting @VisibleForTesting internal val LARGE_SCREEN_HEADER_CONSTRAINT = R.id.large_screen_header_constraint internal val LARGE_SCREEN_HEADER_CONSTRAINT = R.id.large_screen_header_constraint Loading Loading @@ -409,14 +410,14 @@ constructor( private fun getBgColor() = private fun getBgColor() = if (notificationShadeBlur()) { if (notificationShadeBlur()) { header.context.getColor(com.android.internal.R.color.materialColorSurfaceDim) header.context.getColor(R.color.shade_header_text_color_bg) } else { } else { android.graphics.Color.BLACK android.graphics.Color.BLACK } } private fun getFgColor() = private fun getFgColor() = if (notificationShadeBlur()) { if (notificationShadeBlur()) { header.context.getColor(com.android.internal.R.color.materialColorOnSurface) header.context.getColor(R.color.shade_header_text_color) } else { } else { android.graphics.Color.WHITE android.graphics.Color.WHITE } } Loading Loading @@ -452,7 +453,8 @@ constructor( viewModelFactory = unifiedBatteryViewModelFactory, viewModelFactory = unifiedBatteryViewModelFactory, isDarkProvider = { IsAreaDark { dark } }, isDarkProvider = { IsAreaDark { dark } }, textColor = textColor = if (notificationShadeBlur()) MaterialTheme.colorScheme.onSurface if (notificationShadeBlur()) Color(context.getColor(R.color.shade_header_text_color)) else Color.White, else Color.White, showEstimate = showBatteryEstimate, showEstimate = showBatteryEstimate, ) ) Loading
packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -305,8 +305,8 @@ class ShadeHeaderControllerTest : SysuiTestCase() { verify(clock).setTextAppearance(R.style.TextAppearance_QS_Status) verify(clock).setTextAppearance(R.style.TextAppearance_QS_Status) verify(date).setTextAppearance(R.style.TextAppearance_QS_Status) verify(date).setTextAppearance(R.style.TextAppearance_QS_Status) val fgColor = context.getColor(com.android.internal.R.color.materialColorOnSurface) val fgColor = context.getColor(R.color.shade_header_text_color) val bgColor = context.getColor(com.android.internal.R.color.materialColorSurfaceDim) val bgColor = context.getColor(R.color.shade_header_text_color_bg) verify(carrierGroup) verify(carrierGroup) .updateTextAppearanceAndTint(R.style.TextAppearance_QS_Status, fgColor, bgColor) .updateTextAppearanceAndTint(R.style.TextAppearance_QS_Status, fgColor, bgColor) } } Loading