Updating materialColorSurfaceContainerHighest color access
For any view files applying the WidgetConatinerTheme via widgetsTheme they were incorrectly inheriting themes and skipping the AppTheme provided but only in light mode. In dark mode the WidgetContainerTheme.Dark was correctly inheriting the theme.
To avoid a risky theme update for all widgetsThemes we just modify the color accessor to use @color instead of ?attr as these colors should not be attributes AFAIKT
Bug: b/289305591
Test: Follow repro steps on the bug for smartspace
Change-Id: I26cc3239763f8eac3dfe5f094c6757692f46d1bc
diff --git a/res/color-v31/surface.xml b/res/color-v31/surface.xml
deleted file mode 100644
index da4571a..0000000
--- a/res/color-v31/surface.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2021, 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.
-*/
--->
-<selector
- xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="?attr/materialColorSurfaceContainerHighest"/>
-</selector>
-
diff --git a/res/drawable/add_item_dialog_background.xml b/res/drawable/add_item_dialog_background.xml
index c3a8269..e279fa0 100644
--- a/res/drawable/add_item_dialog_background.xml
+++ b/res/drawable/add_item_dialog_background.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
- <solid android:color="@color/surface" />
+ <solid android:color="@color/material_color_surface_container_highest" />
<corners
android:topLeftRadius="?android:attr/dialogCornerRadius"
android:topRightRadius="?android:attr/dialogCornerRadius" />
diff --git a/res/drawable/button_top_rounded_bordered_ripple.xml b/res/drawable/button_top_rounded_bordered_ripple.xml
index f15a4a0..f5b6886 100644
--- a/res/drawable/button_top_rounded_bordered_ripple.xml
+++ b/res/drawable/button_top_rounded_bordered_ripple.xml
@@ -25,7 +25,7 @@
android:topRightRadius="12dp"
android:bottomLeftRadius="4dp"
android:bottomRightRadius="4dp" />
- <solid android:color="@color/surface"/>
+ <solid android:color="@color/material_color_surface_container_highest"/>
<stroke
android:width="2dp"
android:color="@color/button_bg"/>