[SB][Screen Chips] Update red color for screen chips to be brighter.
Also updates our GM_red_600 token to be GM_red_800 (the actual color is
the red 800 color, the token was misnamed).
Fixes: 357061027
Bug: 332662551
Flag: com.android.systemui.status_bar_screen_sharing_chips
Test: start screen record, cast, or share -> verify chip color in light
and dark mode
Change-Id: I217aea653b7abed2c053099a7d646ab0300710c9
diff --git a/packages/SystemUI/res/layout/chipbar.xml b/packages/SystemUI/res/layout/chipbar.xml
index 8fa975b..e1b8ab4 100644
--- a/packages/SystemUI/res/layout/chipbar.xml
+++ b/packages/SystemUI/res/layout/chipbar.xml
@@ -49,7 +49,7 @@
android:alpha="0.0"
/>
- <!-- LINT.IfChange textColor -->
+ <!-- LINT.IfChange -->
<TextView
android:id="@+id/text"
android:layout_width="0dp"
@@ -78,7 +78,7 @@
android:layout_height="@dimen/chipbar_end_icon_size"
android:layout_marginStart="@dimen/chipbar_end_item_start_margin"
android:src="@drawable/ic_warning"
- android:tint="@color/GM2_red_600"
+ android:tint="@color/GM2_red_800"
android:alpha="0.0"
/>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 0350cd7..8cf0fb2 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -160,8 +160,8 @@
<color name="GM2_red_300">#F28B82</color>
<color name="GM2_red_500">#EA4335</color>
- <color name="GM2_red_600">#B3261E</color>
<color name="GM2_red_700">#C5221F</color>
+ <color name="GM2_red_800">#B3261E</color>
<color name="GM2_blue_300">#8AB4F8</color>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt
index 130b117..8a5165d8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt
@@ -18,7 +18,6 @@
import android.content.Context
import android.content.res.ColorStateList
-import android.view.ContextThemeWrapper
import androidx.annotation.ColorInt
import com.android.settingslib.Utils
import com.android.systemui.res.R
@@ -43,9 +42,7 @@
/** The chip should have a red background with white text. */
data object Red : ColorsModel {
override fun background(context: Context): ColorStateList {
- val themedContext =
- ContextThemeWrapper(context, com.android.internal.R.style.Theme_DeviceDefault_Light)
- return Utils.getColorAttr(themedContext, com.android.internal.R.attr.materialColorError)
+ return ColorStateList.valueOf(context.getColor(R.color.GM2_red_700))
}
override fun text(context: Context) = context.getColor(android.R.color.white)