Merge cherrypicks of ['googleplex-android-review.googlesource.com/30815274', 'googleplex-android-review.googlesource.com/30824238'] into 25Q1-release.

Change-Id: Ib15a082911748c50d9ce0269e1d41cd75319b4b8
diff --git a/res/color/dream_card_color_state_list.xml b/res/color/dream_card_color_state_list.xml
index 44ed589..082408d 100644
--- a/res/color/dream_card_color_state_list.xml
+++ b/res/color/dream_card_color_state_list.xml
@@ -17,6 +17,6 @@
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:state_selected="true" android:color="@androidprv:color/materialColorPrimaryContainer"/>
-    <item android:color="@androidprv:color/materialColorSurfaceBright"/>
+    <item android:state_selected="true" android:color="?androidprv:attr/materialColorPrimaryContainer"/>
+    <item android:color="?androidprv:attr/materialColorSurfaceBright"/>
 </selector>
\ No newline at end of file
diff --git a/res/color/dream_card_icon_color_state_list.xml b/res/color/dream_card_icon_color_state_list.xml
index f3e0872..ed34ae3 100644
--- a/res/color/dream_card_icon_color_state_list.xml
+++ b/res/color/dream_card_icon_color_state_list.xml
@@ -17,6 +17,6 @@
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:state_selected="true" android:color="@androidprv:color/materialColorOnPrimaryContainer"/>
-    <item android:color="@androidprv:color/materialColorPrimary"/>
+    <item android:state_selected="true" android:color="?androidprv:attr/materialColorOnPrimaryContainer"/>
+    <item android:color="?androidprv:attr/materialColorPrimary"/>
 </selector>
\ No newline at end of file
diff --git a/res/color/dream_card_summary_color_state_list.xml b/res/color/dream_card_summary_color_state_list.xml
index 7252abe..a1845f4 100644
--- a/res/color/dream_card_summary_color_state_list.xml
+++ b/res/color/dream_card_summary_color_state_list.xml
@@ -17,6 +17,6 @@
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:state_selected="true" android:color="@androidprv:color/materialColorOnPrimaryContainer"/>
-    <item android:color="@androidprv:color/materialColorOnSurfaceVariant"/>
+    <item android:state_selected="true" android:color="?androidprv:attr/materialColorOnPrimaryContainer"/>
+    <item android:color="?androidprv:attr/materialColorOnSurfaceVariant"/>
 </selector>
\ No newline at end of file
diff --git a/res/color/dream_card_text_color_state_list.xml b/res/color/dream_card_text_color_state_list.xml
index c4b3ef5..b39bbed 100644
--- a/res/color/dream_card_text_color_state_list.xml
+++ b/res/color/dream_card_text_color_state_list.xml
@@ -17,6 +17,6 @@
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:state_selected="true" android:color="@androidprv:color/materialColorOnPrimaryContainer"/>
-    <item android:color="@androidprv:color/materialColorOnSurface"/>
+    <item android:state_selected="true" android:color="?androidprv:attr/materialColorOnPrimaryContainer"/>
+    <item android:color="?androidprv:attr/materialColorOnSurface"/>
 </selector>
\ No newline at end of file
diff --git a/res/color/modes_icon_selectable_background.xml b/res/color/modes_icon_selectable_background.xml
index b3b3935..f9280c6 100644
--- a/res/color/modes_icon_selectable_background.xml
+++ b/res/color/modes_icon_selectable_background.xml
@@ -19,7 +19,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
 
-    <item android:state_pressed="true" android:color="@androidprv:color/materialColorPrimary" />
-    <item android:state_selected="true" android:color="@androidprv:color/materialColorPrimary" />
-    <item android:color="@androidprv:color/materialColorSecondaryContainer" />
+    <item android:state_pressed="true" android:color="?androidprv:attr/materialColorPrimary" />
+    <item android:state_selected="true" android:color="?androidprv:attr/materialColorPrimary" />
+    <item android:color="?androidprv:attr/materialColorSecondaryContainer" />
 </selector>
diff --git a/res/color/modes_icon_selectable_icon.xml b/res/color/modes_icon_selectable_icon.xml
index a5ab92b..8a517d5 100644
--- a/res/color/modes_icon_selectable_icon.xml
+++ b/res/color/modes_icon_selectable_icon.xml
@@ -19,7 +19,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
 
-    <item android:state_pressed="true" android:color="@androidprv:color/materialColorOnPrimary" />
-    <item android:state_selected="true" android:color="@androidprv:color/materialColorOnPrimary" />
-    <item android:color="@androidprv:color/materialColorOnSecondaryContainer" />
+    <item android:state_pressed="true" android:color="?androidprv:attr/materialColorOnPrimary" />
+    <item android:state_selected="true" android:color="?androidprv:attr/materialColorOnPrimary" />
+    <item android:color="?androidprv:attr/materialColorOnSecondaryContainer" />
 </selector>
diff --git a/res/drawable/accessibility_contrast_button_background.xml b/res/drawable/accessibility_contrast_button_background.xml
index 5f0f5ad..7e41aae 100644
--- a/res/drawable/accessibility_contrast_button_background.xml
+++ b/res/drawable/accessibility_contrast_button_background.xml
@@ -22,9 +22,9 @@
         <layer-list>
             <item>
                 <shape android:shape="rectangle">
-                    <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest" />
+                    <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest" />
                     <stroke
-                        android:color="@androidprv:color/materialColorSecondary"
+                        android:color="?androidprv:attr/materialColorSecondary"
                         android:width="@dimen/contrast_button_stroke_width" />
                     <corners android:radius="@dimen/contrast_button_radius"/>
                 </shape>
@@ -41,7 +41,7 @@
                     android:viewportHeight="24"
                     android:tint="?attr/colorControlNormal">
                     <path
-                        android:fillColor="@androidprv:color/materialColorPrimary"
+                        android:fillColor="?androidprv:attr/materialColorPrimary"
                         android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10c5.52,0 10,-4.48 10,-10S17.52,2 12,2zM10.59,16.6l-4.24,-4.24l1.41,-1.41l2.83,2.83l5.66,-5.66l1.41,1.41L10.59,16.6z"/>
                 </vector>
             </item>
@@ -55,7 +55,7 @@
                   android:left="@dimen/contrast_button_stroke_width"
                   android:right="@dimen/contrast_button_stroke_width">
                 <shape android:shape="rectangle">
-                    <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest" />
+                    <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest" />
                     <corners android:radius="@dimen/contrast_button_radius"/>
                 </shape>
             </item>
diff --git a/res/drawable/broadcast_button_outline.xml b/res/drawable/broadcast_button_outline.xml
index 1645ad0..c8658a9 100644
--- a/res/drawable/broadcast_button_outline.xml
+++ b/res/drawable/broadcast_button_outline.xml
@@ -29,7 +29,7 @@
             <shape android:shape="rectangle">
                 <corners android:radius="24dp"/>
                 <solid android:color="@android:color/transparent"/>
-                <stroke android:color="@androidprv:color/materialColorPrimaryContainer"
+                <stroke android:color="?androidprv:attr/materialColorPrimaryContainer"
                     android:width="1dp"
                     />
                 <padding android:left="16dp"
diff --git a/res/drawable/color_contrast_preview_background.xml b/res/drawable/color_contrast_preview_background.xml
index cc248be..51d0ade 100644
--- a/res/drawable/color_contrast_preview_background.xml
+++ b/res/drawable/color_contrast_preview_background.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle" >
-    <solid android:color="@androidprv:color/materialColorSurfaceContainerHigh"/>
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainerHigh"/>
     <corners android:radius="20dp" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/color_contrast_preview_bottom_appbar_background.xml b/res/drawable/color_contrast_preview_bottom_appbar_background.xml
index 7ffe374..f3392fb 100644
--- a/res/drawable/color_contrast_preview_bottom_appbar_background.xml
+++ b/res/drawable/color_contrast_preview_bottom_appbar_background.xml
@@ -17,7 +17,7 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle" >
-    <solid android:color="@androidprv:color/materialColorSurfaceContainer"/>
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainer"/>
     <corners
         android:bottomLeftRadius="20dp"
         android:bottomRightRadius="20dp"
diff --git a/res/drawable/color_contrast_preview_button_background.xml b/res/drawable/color_contrast_preview_button_background.xml
index ae263f6..8b92087 100644
--- a/res/drawable/color_contrast_preview_button_background.xml
+++ b/res/drawable/color_contrast_preview_button_background.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle" >
-    <solid android:color="@androidprv:color/materialColorTertiaryContainer"/>
+    <solid android:color="?androidprv:attr/materialColorTertiaryContainer"/>
     <corners android:radius="7dp" />
 </shape>
diff --git a/res/drawable/color_contrast_preview_dialog_background.xml b/res/drawable/color_contrast_preview_dialog_background.xml
index 61219ac..f60a271 100644
--- a/res/drawable/color_contrast_preview_dialog_background.xml
+++ b/res/drawable/color_contrast_preview_dialog_background.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle" >
-    <solid android:color="@androidprv:color/materialColorSurfaceContainerLow"/>
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainerLow"/>
     <corners android:radius="12dp" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/color_contrast_preview_icon_edit_background.xml b/res/drawable/color_contrast_preview_icon_edit_background.xml
index b6b2930..61fe4fe 100644
--- a/res/drawable/color_contrast_preview_icon_edit_background.xml
+++ b/res/drawable/color_contrast_preview_icon_edit_background.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle" >
-    <solid android:color="@androidprv:color/materialColorPrimaryContainer"/>
+    <solid android:color="?androidprv:attr/materialColorPrimaryContainer"/>
     <corners android:radius="24dp" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/color_contrast_preview_icon_group_background.xml b/res/drawable/color_contrast_preview_icon_group_background.xml
index 284d9ca..46cd40d 100644
--- a/res/drawable/color_contrast_preview_icon_group_background.xml
+++ b/res/drawable/color_contrast_preview_icon_group_background.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="oval" >
-    <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest"/>
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest"/>
     <size android:width="36dp" android:height="36dp" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/color_contrast_preview_icon_inbox_background.xml b/res/drawable/color_contrast_preview_icon_inbox_background.xml
index b63d918..45d8285 100644
--- a/res/drawable/color_contrast_preview_icon_inbox_background.xml
+++ b/res/drawable/color_contrast_preview_icon_inbox_background.xml
@@ -17,7 +17,7 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle" >
-    <solid android:color="@androidprv:color/materialColorSecondaryContainer"/>
+    <solid android:color="?androidprv:attr/materialColorSecondaryContainer"/>
     <corners android:radius="20dp" />
     <size android:height="30dp" android:width="60dp" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/color_contrast_preview_icon_star_background.xml b/res/drawable/color_contrast_preview_icon_star_background.xml
index 027d3e1..335ee88 100644
--- a/res/drawable/color_contrast_preview_icon_star_background.xml
+++ b/res/drawable/color_contrast_preview_icon_star_background.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="oval" >
-    <solid android:color="@androidprv:color/materialColorPrimary"/>
+    <solid android:color="?androidprv:attr/materialColorPrimary"/>
     <size android:width="36dp" android:height="36dp" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/color_contrast_preview_tag_background.xml b/res/drawable/color_contrast_preview_tag_background.xml
index 91b090c..a7b051a 100644
--- a/res/drawable/color_contrast_preview_tag_background.xml
+++ b/res/drawable/color_contrast_preview_tag_background.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
     android:shape="rectangle" >
-    <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest"/>
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest"/>
     <corners android:radius="4dp" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/dream_default_preview_icon.xml b/res/drawable/dream_default_preview_icon.xml
index be3f128..8989929 100644
--- a/res/drawable/dream_default_preview_icon.xml
+++ b/res/drawable/dream_default_preview_icon.xml
@@ -20,6 +20,6 @@
         android:height="24dp"
         android:viewportWidth="24"
         android:viewportHeight="24">
-    <path android:fillColor="@androidprv:color/materialColorOnSurfaceVariant"
+    <path android:fillColor="?androidprv:attr/materialColorOnSurfaceVariant"
           android:pathData="M3,19Q2.175,19 1.588,18.413Q1,17.825 1,17V7Q1,6.175 1.588,5.588Q2.175,5 3,5H13Q13.825,5 14.413,5.588Q15,6.175 15,7V17Q15,17.825 14.413,18.413Q13.825,19 13,19ZM3,17H13Q13,17 13,17Q13,17 13,17V7Q13,7 13,7Q13,7 13,7H3Q3,7 3,7Q3,7 3,7V17Q3,17 3,17Q3,17 3,17ZM17,19V5H19V19ZM21,19V5H23V19ZM4,15H12L9.4,11.5L7.5,14L6.1,12.15ZM3,7Q3,7 3,7Q3,7 3,7V17Q3,17 3,17Q3,17 3,17Q3,17 3,17Q3,17 3,17V7Q3,7 3,7Q3,7 3,7Z"/>
 </vector>
\ No newline at end of file
diff --git a/res/drawable/dream_preview_rounded_bg.xml b/res/drawable/dream_preview_rounded_bg.xml
index c7034e7..7cae599 100644
--- a/res/drawable/dream_preview_rounded_bg.xml
+++ b/res/drawable/dream_preview_rounded_bg.xml
@@ -17,6 +17,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle">
-    <solid android:color="@androidprv:color/materialColorSurfaceContainer" />
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainer" />
     <corners android:radius="@dimen/dream_item_corner_radius"/>
 </shape>
\ No newline at end of file
diff --git a/res/drawable/ic_article_24dp.xml b/res/drawable/ic_article_24dp.xml
index bf9d2f7..0b38daa 100644
--- a/res/drawable/ic_article_24dp.xml
+++ b/res/drawable/ic_article_24dp.xml
@@ -22,6 +22,6 @@
         android:tint="?attr/colorControlNormal"
         android:autoMirrored="true">
 <path
-    android:fillColor="@androidprv:color/materialColorOnSurfaceVariant"
+    android:fillColor="?androidprv:attr/materialColorOnSurfaceVariant"
     android:pathData="M19,5v14L5,19L5,5h14m0,-2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM14,17L7,17v-2h7v2zM17,13L7,13v-2h10v2zM17,9L7,9L7,7h10v2z"/>
 </vector>
diff --git a/res/drawable/ic_article_filled_24dp.xml b/res/drawable/ic_article_filled_24dp.xml
index 9e5f24c..e22d151 100644
--- a/res/drawable/ic_article_filled_24dp.xml
+++ b/res/drawable/ic_article_filled_24dp.xml
@@ -21,6 +21,6 @@
     android:viewportHeight="24"
     android:tint="?attr/colorControlNormal">
     <path
-        android:fillColor="@androidprv:color/materialColorOnTertiaryContainer"
+        android:fillColor="?androidprv:attr/materialColorOnTertiaryContainer"
         android:pathData="M19,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5C21,3.9 20.1,3 19,3zM14,17H7v-2h7V17zM17,13H7v-2h10V13zM17,9H7V7h10V9z"/>
 </vector>
diff --git a/res/drawable/ic_chat_bubble_24dp.xml b/res/drawable/ic_chat_bubble_24dp.xml
index 5b6536b..c7ad6bf 100644
--- a/res/drawable/ic_chat_bubble_24dp.xml
+++ b/res/drawable/ic_chat_bubble_24dp.xml
@@ -21,6 +21,6 @@
         android:viewportHeight="24"
         android:tint="?attr/colorControlNormal">
 <path
-    android:fillColor="@androidprv:color/materialColorOnSurfaceVariant"
+    android:fillColor="?androidprv:attr/materialColorOnSurfaceVariant"
     android:pathData="M20,2L4,2c-1.1,0 -2,0.9 -2,2v18l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM20,16L4,16L4,4h16v12z"/>
 </vector>
diff --git a/res/drawable/ic_edit_24dp.xml b/res/drawable/ic_edit_24dp.xml
index fdd82f5..e663b52 100644
--- a/res/drawable/ic_edit_24dp.xml
+++ b/res/drawable/ic_edit_24dp.xml
@@ -21,6 +21,6 @@
         android:viewportHeight="24"
         android:tint="?attr/colorControlNormal">
 <path
-    android:fillColor="@androidprv:color/materialColorOnPrimaryContainer"
+    android:fillColor="?androidprv:attr/materialColorOnPrimaryContainer"
     android:pathData="M20.41,4.94l-1.35,-1.35c-0.78,-0.78 -2.05,-0.78 -2.83,0L3,16.82L3,21h4.18L20.41,7.77c0.79,-0.78 0.79,-2.05 0,-2.83zM6.41,19.06L5,19v-1.36l9.82,-9.82 1.41,1.41 -9.82,9.83z"/>
 </vector>
diff --git a/res/drawable/ic_group_24dp.xml b/res/drawable/ic_group_24dp.xml
index 1c65fc2..92815c2 100644
--- a/res/drawable/ic_group_24dp.xml
+++ b/res/drawable/ic_group_24dp.xml
@@ -21,6 +21,6 @@
         android:viewportHeight="24"
         android:tint="?attr/colorControlNormal">
     <path
-        android:fillColor="@androidprv:color/materialColorSecondary"
+        android:fillColor="?androidprv:attr/materialColorSecondary"
         android:pathData="M15,8c0,-1.42 -0.5,-2.73 -1.33,-3.76C14.09,4.1 14.53,4 15,4c2.21,0 4,1.79 4,4s-1.79,4 -4,4c-0.43,0 -0.84,-0.09 -1.23,-0.21c-0.03,-0.01 -0.06,-0.02 -0.1,-0.03C14.5,10.73 15,9.42 15,8zM16.66,13.13C18.03,14.06 19,15.32 19,17v3h4v-3C23,14.82 19.42,13.53 16.66,13.13zM9,4c2.21,0 4,1.79 4,4s-1.79,4 -4,4s-4,-1.79 -4,-4S6.79,4 9,4zM9,13c2.67,0 8,1.34 8,4v3H1v-3C1,14.34 6.33,13 9,13z"/>
 </vector>
diff --git a/res/drawable/ic_inbox_24dp.xml b/res/drawable/ic_inbox_24dp.xml
index 18cc3e9..7800ea1 100644
--- a/res/drawable/ic_inbox_24dp.xml
+++ b/res/drawable/ic_inbox_24dp.xml
@@ -21,6 +21,6 @@
         android:viewportHeight="24"
         android:tint="?attr/colorControlNormal">
 <path
-    android:fillColor="@androidprv:color/materialColorOnSecondaryContainer"
+    android:fillColor="?androidprv:attr/materialColorOnSecondaryContainer"
     android:pathData="M19,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5C21,3.9 20.1,3 19,3zM19,5v9h-4.18c-0.41,1.16 -1.51,2 -2.82,2s-2.4,-0.84 -2.82,-2H5V5H19z"/>
 </vector>
diff --git a/res/drawable/ic_modifier_keys_reset.xml b/res/drawable/ic_modifier_keys_reset.xml
index 9fdbab0..5345c25 100644
--- a/res/drawable/ic_modifier_keys_reset.xml
+++ b/res/drawable/ic_modifier_keys_reset.xml
@@ -21,7 +21,7 @@
         android:height="24.0dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0"
-        android:tint="@androidprv:color/materialColorPrimary">
+        android:tint="?androidprv:attr/materialColorPrimary">
     <path
         android:fillColor="@android:color/white"
         android:pathData="M18,4C13.58,0.69 7.31,1.58 4,6V4H2v6h6V8H5.09c1.44,-2.47 4.09,-3.98 6.94,-3.97c4.42,0.02 7.99,3.61 7.97,8.03s-3.61,7.99 -8.03,7.97C7.55,20.01 3.98,16.42 4,12H2c0,3.15 1.48,6.11 4,8c4.42,3.31 10.69,2.42 14,-2C23.31,13.58 22.42,7.31 18,4z"/>
diff --git a/res/drawable/ic_star_24dp.xml b/res/drawable/ic_star_24dp.xml
index 4490678..667db94 100644
--- a/res/drawable/ic_star_24dp.xml
+++ b/res/drawable/ic_star_24dp.xml
@@ -21,6 +21,6 @@
         android:viewportHeight="24"
         android:tint="?attr/colorControlNormal">
     <path
-        android:fillColor="@androidprv:color/materialColorOnPrimary"
+        android:fillColor="?androidprv:attr/materialColorOnPrimary"
         android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27z"/>
 </vector>
diff --git a/res/drawable/modifier_key_bordered.xml b/res/drawable/modifier_key_bordered.xml
index a3c7cc5..29316796 100644
--- a/res/drawable/modifier_key_bordered.xml
+++ b/res/drawable/modifier_key_bordered.xml
@@ -25,7 +25,7 @@
                 <solid android:color="@android:color/transparent"/>
                 <stroke
                     android:width="1dp"
-                    android:color="@androidprv:color/materialColorPrimary"/>
+                    android:color="?androidprv:attr/materialColorPrimary"/>
             </shape>
         </item>
     </ripple>
diff --git a/res/drawable/modifier_key_colored.xml b/res/drawable/modifier_key_colored.xml
index 4610738..995d733 100644
--- a/res/drawable/modifier_key_colored.xml
+++ b/res/drawable/modifier_key_colored.xml
@@ -22,7 +22,7 @@
         <item>
             <shape android:shape="rectangle">
                 <corners android:radius="24dp"/>
-                <solid android:color="@androidprv:color/materialColorPrimary"/>
+                <solid android:color="?androidprv:attr/materialColorPrimary"/>
             </shape>
         </item>
     </ripple>
diff --git a/res/drawable/modifier_key_lisetview_background.xml b/res/drawable/modifier_key_lisetview_background.xml
index a0d8c03..3353cfd 100644
--- a/res/drawable/modifier_key_lisetview_background.xml
+++ b/res/drawable/modifier_key_lisetview_background.xml
@@ -22,7 +22,7 @@
         <item>
             <shape android:shape="rectangle">
                 <corners android:radius="24dp"/>
-                <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest"/>
+                <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest"/>
             </shape>
         </item>
     </ripple>
diff --git a/res/drawable/pointer_icon_fill_container_background.xml b/res/drawable/pointer_icon_fill_container_background.xml
index 7f6bf53..ca930a7 100644
--- a/res/drawable/pointer_icon_fill_container_background.xml
+++ b/res/drawable/pointer_icon_fill_container_background.xml
@@ -18,5 +18,5 @@
     xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
     android:shape="rectangle">
     <corners android:radius="20dp" />
-    <solid android:color="@androidprv:color/materialColorSurfaceContainerHigh"/>
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainerHigh"/>
 </shape>
diff --git a/res/drawable/preference_circular_icons_plus_item_background.xml b/res/drawable/preference_circular_icons_plus_item_background.xml
index e261c76..faaa1fd 100644
--- a/res/drawable/preference_circular_icons_plus_item_background.xml
+++ b/res/drawable/preference_circular_icons_plus_item_background.xml
@@ -21,5 +21,5 @@
     <size
         android:width="@dimen/zen_mode_circular_icon_diameter"
         android:height="@dimen/zen_mode_circular_icon_diameter" />
-    <solid android:color="@androidprv:color/materialColorSecondaryContainer" />
+    <solid android:color="?androidprv:attr/materialColorSecondaryContainer" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/rounded_bg.xml b/res/drawable/rounded_bg.xml
index 0e2743d..ae12af8 100644
--- a/res/drawable/rounded_bg.xml
+++ b/res/drawable/rounded_bg.xml
@@ -17,7 +17,7 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle">
-    <solid android:color="@androidprv:color/materialColorSurfaceContainer" />
+    <solid android:color="?androidprv:attr/materialColorSurfaceContainer" />
     <corners
         android:bottomLeftRadius="?android:attr/dialogCornerRadius"
         android:topLeftRadius="?android:attr/dialogCornerRadius"
diff --git a/res/drawable/sim_confirm_dialog_btn_outline.xml b/res/drawable/sim_confirm_dialog_btn_outline.xml
index 070d73a..816174a 100644
--- a/res/drawable/sim_confirm_dialog_btn_outline.xml
+++ b/res/drawable/sim_confirm_dialog_btn_outline.xml
@@ -29,7 +29,7 @@
             <shape android:shape="rectangle">
                 <corners android:radius="24dp"/>
                 <solid android:color="@android:color/transparent"/>
-                <stroke android:color="@androidprv:color/materialColorPrimaryContainer"
+                <stroke android:color="?androidprv:attr/materialColorPrimaryContainer"
                         android:width="1dp" />
                 <padding android:left="16dp"
                          android:top="8dp"
diff --git a/res/drawable/trackpad_bordered.xml b/res/drawable/trackpad_bordered.xml
index 276b3ac..940be8f 100644
--- a/res/drawable/trackpad_bordered.xml
+++ b/res/drawable/trackpad_bordered.xml
@@ -25,7 +25,7 @@
                 <solid android:color="@android:color/transparent"/>
                 <stroke
                     android:width="1dp"
-                    android:color="@androidprv:color/materialColorPrimary"/>
+                    android:color="?androidprv:attr/materialColorPrimary"/>
             </shape>
         </item>
     </ripple>
diff --git a/res/drawable/trackpad_button_done_colored.xml b/res/drawable/trackpad_button_done_colored.xml
index 4610738..995d733 100644
--- a/res/drawable/trackpad_button_done_colored.xml
+++ b/res/drawable/trackpad_button_done_colored.xml
@@ -22,7 +22,7 @@
         <item>
             <shape android:shape="rectangle">
                 <corners android:radius="24dp"/>
-                <solid android:color="@androidprv:color/materialColorPrimary"/>
+                <solid android:color="?androidprv:attr/materialColorPrimary"/>
             </shape>
         </item>
     </ripple>
diff --git a/res/drawable/user_select_background.xml b/res/drawable/user_select_background.xml
index 490246c..7b75160 100644
--- a/res/drawable/user_select_background.xml
+++ b/res/drawable/user_select_background.xml
@@ -19,13 +19,13 @@
     android:color="@color/settingslib_ripple_color">
     <item android:id="@android:id/mask">
         <shape android:shape="rectangle">
-            <solid android:color="@androidprv:color/materialColorSurfaceContainer"/>
+            <solid android:color="?androidprv:attr/materialColorSurfaceContainer"/>
             <corners android:radius="20dp"/>
         </shape>
     </item>
     <item android:id="@android:id/background">
         <shape android:shape="rectangle">
-            <stroke android:color="@androidprv:color/materialColorPrimaryContainer" android:width="1dp"/>
+            <stroke android:color="?androidprv:attr/materialColorPrimaryContainer" android:width="1dp"/>
             <corners android:radius="20dp"/>
         </shape>
     </item>
diff --git a/res/drawable/volume_dialog_button_background_outline.xml b/res/drawable/volume_dialog_button_background_outline.xml
index f8df90e..36ffb93 100644
--- a/res/drawable/volume_dialog_button_background_outline.xml
+++ b/res/drawable/volume_dialog_button_background_outline.xml
@@ -21,7 +21,7 @@
     <shape
            android:shape="rectangle">
         <stroke
-            android:color="@androidprv:color/materialColorPrimaryContainer"
+            android:color="?androidprv:attr/materialColorPrimaryContainer"
             android:width="1dp"/>
         <corners android:radius="24dp"/>
         <padding
diff --git a/res/layout/accessibility_color_contrast_preview.xml b/res/layout/accessibility_color_contrast_preview.xml
index 988a3df..1603549 100644
--- a/res/layout/accessibility_color_contrast_preview.xml
+++ b/res/layout/accessibility_color_contrast_preview.xml
@@ -31,7 +31,7 @@
         android:id="@+id/preview_background"
         android:layout_width="0dp"
         android:layout_height="0dp"
-        android:background="@androidprv:color/materialColorSurface"
+        android:background="?androidprv:attr/materialColorSurface"
         app:layout_constraintBottom_toTopOf="@+id/bottom_appbar_background"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -96,7 +96,7 @@
             android:maxLines="1"
             android:paddingEnd="10dp"
             android:text="@string/color_contrast_preview_sender_name"
-            android:textColor="@androidprv:color/materialColorOnSurface"
+            android:textColor="?androidprv:attr/materialColorOnSurface"
             android:textSize="12sp"
             app:layout_constraintEnd_toStartOf="@+id/email_tag"
             app:layout_constraintHorizontal_bias="0"
@@ -116,7 +116,7 @@
             android:maxLines="1"
             android:paddingHorizontal="4dp"
             android:text="@string/color_contrast_preview_email_badge"
-            android:textColor="@androidprv:color/materialColorOnSurface"
+            android:textColor="?androidprv:attr/materialColorOnSurface"
             android:textSize="11sp"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toEndOf="@+id/sender_name"
@@ -134,7 +134,7 @@
         android:ellipsize="end"
         android:maxLines="1"
         android:text="@string/color_contrast_preview_email_send_date"
-        android:textColor="@androidprv:color/materialColorOnSurfaceVariant"
+        android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
         android:textSize="11sp"
         app:layout_constrainedWidth="true"
         app:layout_constraintEnd_toEndOf="@+id/email_background"
@@ -173,7 +173,7 @@
         android:ellipsize="end"
         android:maxLines="1"
         android:text="@string/color_contrast_preview_email_title"
-        android:textColor="@androidprv:color/materialColorOnSurface"
+        android:textColor="?androidprv:attr/materialColorOnSurface"
         android:textSize="16sp"
         app:layout_constrainedWidth="true"
         app:layout_constraintEnd_toEndOf="@+id/email_main_background"
@@ -189,7 +189,7 @@
         android:maxLines="2"
         android:paddingBottom="8dp"
         android:text="@string/color_contrast_preview_email_body"
-        android:textColor="@androidprv:color/materialColorOnSurfaceVariant"
+        android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
         android:textSize="12sp"
         app:layout_constrainedWidth="true"
         app:layout_constraintEnd_toEndOf="@+id/email_main_background"
@@ -228,7 +228,7 @@
         android:maxLines="1"
         android:paddingEnd="10dp"
         android:text="@string/color_contrast_preview_email_attachment_name"
-        android:textColor="@androidprv:color/materialColorOnTertiaryContainer"
+        android:textColor="?androidprv:attr/materialColorOnTertiaryContainer"
         android:textSize="12sp"
         app:layout_constrainedWidth="true"
         app:layout_constraintBottom_toBottomOf="@+id/attachment_background"
diff --git a/res/layout/accessibility_color_contrast_selector.xml b/res/layout/accessibility_color_contrast_selector.xml
index dde0940..18b085a 100644
--- a/res/layout/accessibility_color_contrast_selector.xml
+++ b/res/layout/accessibility_color_contrast_selector.xml
@@ -72,7 +72,7 @@
                 android:singleLine="true"
                 android:textSize="@dimen/contrast_button_text_size"
                 android:text="@string/contrast_default"
-                android:textColor="@androidprv:color/materialColorOnSurface"/>
+                android:textColor="?androidprv:attr/materialColorOnSurface"/>
         </LinearLayout>
 
         <Space
@@ -107,7 +107,7 @@
                 android:singleLine="true"
                 android:textSize="@dimen/contrast_button_text_size"
                 android:text="@string/contrast_medium"
-                android:textColor="@androidprv:color/materialColorOnSurface"/>
+                android:textColor="?androidprv:attr/materialColorOnSurface"/>
         </LinearLayout>
 
         <Space
@@ -142,7 +142,7 @@
                 android:singleLine="true"
                 android:textSize="@dimen/contrast_button_text_size"
                 android:text="@string/contrast_high"
-                android:textColor="@androidprv:color/materialColorOnSurface"/>
+                android:textColor="?androidprv:attr/materialColorOnSurface"/>
         </LinearLayout>
 
         <Space
diff --git a/res/layout/homepage_preference.xml b/res/layout/homepage_preference.xml
index 5f106c7..38cb491 100644
--- a/res/layout/homepage_preference.xml
+++ b/res/layout/homepage_preference.xml
@@ -78,7 +78,7 @@
             android:layout_gravity="start"
             android:textAlignment="viewStart"
             android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="@androidprv:color/materialColorOnSurfaceVariant"
+            android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
             android:maxLines="4"
             android:hyphenationFrequency="normalFast"
             android:lineBreakWordStyle="phrase"
diff --git a/res/layout/homepage_preference_v2.xml b/res/layout/homepage_preference_v2.xml
index 76eb403..ebb7ca9 100644
--- a/res/layout/homepage_preference_v2.xml
+++ b/res/layout/homepage_preference_v2.xml
@@ -78,7 +78,7 @@
             android:layout_gravity="start"
             android:textAlignment="viewStart"
             android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="@androidprv:color/materialColorOnSurfaceVariant"
+            android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
             android:maxLines="4"
             android:hyphenationFrequency="normalFast"
             android:lineBreakWordStyle="phrase"
diff --git a/res/layout/modifier_key_item.xml b/res/layout/modifier_key_item.xml
index 0019036..683f631 100644
--- a/res/layout/modifier_key_item.xml
+++ b/res/layout/modifier_key_item.xml
@@ -31,7 +31,7 @@
         android:ellipsize="marquee"
         android:fadingEdge="horizontal"
         android:src="@drawable/ic_check_24dp"
-        android:tint="@androidprv:color/materialColorPrimary"/>
+        android:tint="?androidprv:attr/materialColorPrimary"/>
 
     <TextView
         android:id="@+id/modifier_key_text"
diff --git a/res/layout/modifier_key_picker_dialog.xml b/res/layout/modifier_key_picker_dialog.xml
index b4b05a3..fd4d75e 100644
--- a/res/layout/modifier_key_picker_dialog.xml
+++ b/res/layout/modifier_key_picker_dialog.xml
@@ -107,7 +107,7 @@
                 android:paddingVertical="14dp"
                 android:drawablePadding="9dp"
                 style="@style/ModifierKeyButtonDone"
-                android:textColor="@androidprv:color/materialColorOnPrimary"
+                android:textColor="?androidprv:attr/materialColorOnPrimary"
                 android:text="@string/modifier_keys_done"/>
 
         </RelativeLayout>
diff --git a/res/layout/notification_ls_minimalism_selector.xml b/res/layout/notification_ls_minimalism_selector.xml
index cf34561..d37ad54 100644
--- a/res/layout/notification_ls_minimalism_selector.xml
+++ b/res/layout/notification_ls_minimalism_selector.xml
@@ -74,7 +74,7 @@
                 android:singleLine="true"
                 android:textSize="@dimen/contrast_button_text_size"
                 android:text="@string/lock_screen_notifs_show_compact"
-                android:textColor="@androidprv:color/materialColorOnSurface"/>
+                android:textColor="?androidprv:attr/materialColorOnSurface"/>
         </LinearLayout>
 
         <Space
@@ -109,7 +109,7 @@
                 android:singleLine="true"
                 android:textSize="@dimen/contrast_button_text_size"
                 android:text="@string/lock_screen_notifs_show_full_list"
-                android:textColor="@androidprv:color/materialColorOnSurface"/>
+                android:textColor="?androidprv:attr/materialColorOnSurface"/>
         </LinearLayout>
 
         <Space
diff --git a/res/layout/pointer_icon_fill_style_layout.xml b/res/layout/pointer_icon_fill_style_layout.xml
index aba57a6..63c8ebd 100644
--- a/res/layout/pointer_icon_fill_style_layout.xml
+++ b/res/layout/pointer_icon_fill_style_layout.xml
@@ -32,7 +32,7 @@
         android:layout_marginTop="@dimen/pointer_fill_style_circle_padding"
         android:text="@string/pointer_fill_style"
         android:textSize="14sp"
-        android:textColor="@androidprv:color/materialColorPrimary"
+        android:textColor="?androidprv:attr/materialColorPrimary"
         android:textAlignment="viewStart"
         android:fontWeight="500" />
 
diff --git a/res/layout/pointer_icon_stroke_style_layout.xml b/res/layout/pointer_icon_stroke_style_layout.xml
index a68b596..01b58b2 100644
--- a/res/layout/pointer_icon_stroke_style_layout.xml
+++ b/res/layout/pointer_icon_stroke_style_layout.xml
@@ -31,7 +31,7 @@
         android:layout_marginTop="@dimen/pointer_stroke_style_padding"
         android:text="@string/pointer_stroke_style"
         android:textSize="14sp"
-        android:textColor="@androidprv:color/materialColorPrimary"
+        android:textColor="?androidprv:attr/materialColorPrimary"
         android:textAlignment="viewStart"
         android:fontWeight="500"
         android:textAppearance="?android:attr/textAppearanceListItem" />
diff --git a/res/layout/preference_background.xml b/res/layout/preference_background.xml
index 1c69be4..51718b8 100644
--- a/res/layout/preference_background.xml
+++ b/res/layout/preference_background.xml
@@ -65,7 +65,7 @@
                 android:layout_height="wrap_content"
                 android:singleLine="true"
                 android:textAppearance="?android:attr/textAppearanceListItem"
-                android:textColor="@androidprv:color/materialColorOnPrimaryContainer"
+                android:textColor="?androidprv:attr/materialColorOnPrimaryContainer"
                 android:ellipsize="marquee"
                 android:fadingEdge="horizontal"
                 android:hyphenationFrequency="normalFast"
@@ -78,7 +78,7 @@
                 android:layout_alignStart="@android:id/title"
                 android:layout_alignLeft="@android:id/title"
                 android:textAppearance="?android:attr/textAppearanceSmall"
-                android:textColor="@androidprv:color/materialColorOnPrimaryContainer"
+                android:textColor="?androidprv:attr/materialColorOnPrimaryContainer"
                 android:hyphenationFrequency="normalFast"
                 android:lineBreakWordStyle="phrase"
                 android:maxLines="4"
diff --git a/res/layout/preference_circular_icons_plus_item.xml b/res/layout/preference_circular_icons_plus_item.xml
index 3527088..9882086 100644
--- a/res/layout/preference_circular_icons_plus_item.xml
+++ b/res/layout/preference_circular_icons_plus_item.xml
@@ -26,7 +26,7 @@
     android:padding="4dp"
     android:drawablePadding="0dp"
     android:background="@drawable/preference_circular_icons_plus_item_background"
-    android:textColor="@androidprv:color/materialColorOnSecondaryContainer"
+    android:textColor="?androidprv:attr/materialColorOnSecondaryContainer"
     android:maxLines="1"
     android:autoSizeTextType="uniform"
     android:autoSizeMinTextSize="6sp" />
\ No newline at end of file
diff --git a/res/layout/preference_widget_arrow.xml b/res/layout/preference_widget_arrow.xml
index 50edb3c..f36f693 100644
--- a/res/layout/preference_widget_arrow.xml
+++ b/res/layout/preference_widget_arrow.xml
@@ -23,5 +23,5 @@
     android:layout_gravity="center_vertical"
     android:contentDescription="@null"
     android:scaleType="center"
-    android:tint="@androidprv:color/materialColorOnPrimaryContainer"
+    android:tint="?androidprv:attr/materialColorOnPrimaryContainer"
     android:src="@drawable/ic_arrow_forward" />
\ No newline at end of file
diff --git a/res/layout/trackpad_gesture_preview.xml b/res/layout/trackpad_gesture_preview.xml
index 978da06..15cc743 100644
--- a/res/layout/trackpad_gesture_preview.xml
+++ b/res/layout/trackpad_gesture_preview.xml
@@ -82,7 +82,7 @@
             android:paddingVertical="14dp"
             android:drawablePadding="9dp"
             style="@style/TrackpadButtonDone"
-            android:textColor="@androidprv:color/materialColorOnPrimary"
+            android:textColor="?androidprv:attr/materialColorOnPrimary"
             android:text="@string/gesture_button_next"/>
 
         <Button
@@ -96,7 +96,7 @@
             android:paddingVertical="14dp"
             android:drawablePadding="9dp"
             style="@style/TrackpadButtonDone"
-            android:textColor="@androidprv:color/materialColorOnPrimary"
+            android:textColor="?androidprv:attr/materialColorOnPrimary"
             android:text="@string/gesture_button_done"/>
     </RelativeLayout>
 
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index a117e47..69f17f6 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -19,7 +19,7 @@
     <color name="homepage_accessibility_background">#783BE5</color>
     <color name="homepage_support_background">#3F5FBD</color>
     <color name="contextual_card_background">@*android:color/material_grey_900</color>
-    <color name="search_bar_background">@androidprv:color/materialColorSurfaceBright</color>
+    <color name="search_bar_background">?androidprv:attr/materialColorSurfaceBright</color>
     <color name="notification_importance_button_unselected">#5F6368</color>
 
     <!-- Palette list preference colors. -->
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 0b7e0c1..91598fe 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -94,7 +94,7 @@
     <color name="icon_launcher_setting_color">@*android:color/accent_device_default_light</color>
 
     <!-- Search bar background color -->
-    <color name="search_bar_background">@androidprv:color/materialColorSurfaceBright</color>
+    <color name="search_bar_background">?androidprv:attr/materialColorSurfaceBright</color>
 
     <color name="face_enroll_icon_color">#42a5f5</color> <!-- Blue 400 -->
 
@@ -166,7 +166,7 @@
     <color name="battery_info_error_color_black">@*android:color/primary_text_default_material_light</color>
 
     <!-- Background for multiple user settings page avatars -->
-    <color name="user_avatar_color_bg">@androidprv:color/materialColorSurfaceContainer</color>
+    <color name="user_avatar_color_bg">?androidprv:attr/materialColorSurfaceContainer</color>
 
     <!-- Icon tint color for battery usage system icon -->
     <color name="battery_usage_system_icon_color">?android:attr/textColorPrimary</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c656e13..5bcb805 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -249,7 +249,7 @@
         <item name="android:layout_gravity">center</item>
         <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
         <item name="android:textSize">@dimen/search_bar_text_size</item>
-        <item name="android:textColor">@androidprv:color/materialColorOnSurfaceVariant</item>
+        <item name="android:textColor">?androidprv:attr/materialColorOnSurfaceVariant</item>
         <item name="android:singleLine">true</item>
     </style>
 
@@ -448,7 +448,7 @@
         <item name="android:layout_marginBottom">@dimen/contextual_card_vertical_margin</item>
         <item name="android:layout_marginStart">@dimen/contextual_card_side_margin</item>
         <item name="android:layout_marginEnd">@dimen/contextual_card_side_margin</item>
-        <item name="cardBackgroundColor">@androidprv:color/materialColorSurfaceContainer</item>
+        <item name="cardBackgroundColor">?androidprv:attr/materialColorSurfaceContainer</item>
         <item name="cardCornerRadius">@dimen/contextual_card_corner_radius</item>
         <item name="cardElevation">0dp</item>
         <item name="rippleColor">?android:attr/colorControlHighlight</item>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 9d416f7..4f20d8c 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -67,12 +67,12 @@
         <item name="sliceViewStyle">@style/Widget.SliceView.Settings</item>
 
         <item name="notification_importance_button_background_color_unselected">@android:color/transparent</item>
-        <item name="notification_importance_button_border_color_unselected">@androidprv:color/materialColorOutlineVariant</item>
-        <item name="notification_importance_button_foreground_color_unselected">@androidprv:color/materialColorOnSurfaceVariant</item>
+        <item name="notification_importance_button_border_color_unselected">?androidprv:attr/materialColorOutlineVariant</item>
+        <item name="notification_importance_button_foreground_color_unselected">?androidprv:attr/materialColorOnSurfaceVariant</item>
 
-        <item name="notification_importance_button_background_color_selected">@androidprv:color/materialColorSecondaryContainer</item>
-        <item name="notification_importance_button_border_color_selected">@androidprv:color/materialColorOnSecondaryContainer</item>
-        <item name="notification_importance_button_foreground_color_selected">@androidprv:color/materialColorOnSecondaryContainer</item>
+        <item name="notification_importance_button_background_color_selected">?androidprv:attr/materialColorSecondaryContainer</item>
+        <item name="notification_importance_button_border_color_selected">?androidprv:attr/materialColorOnSecondaryContainer</item>
+        <item name="notification_importance_button_foreground_color_selected">?androidprv:attr/materialColorOnSecondaryContainer</item>
 
         <!-- For AppCompat widgets, e.g. TextInputLayout -->
         <item name="colorAccent">?android:attr/colorAccent</item>
diff --git a/res/values/themes_expressive.xml b/res/values/themes_expressive.xml
index 0a8b45d..8342fe0 100644
--- a/res/values/themes_expressive.xml
+++ b/res/values/themes_expressive.xml
@@ -59,12 +59,12 @@
         <item name="sliceViewStyle">@style/Widget.SliceView.Settings</item>
 
         <item name="notification_importance_button_background_color_unselected">@android:color/transparent</item>
-        <item name="notification_importance_button_border_color_unselected">@androidprv:color/materialColorOutlineVariant</item>
-        <item name="notification_importance_button_foreground_color_unselected">@androidprv:color/materialColorOnSurfaceVariant</item>
+        <item name="notification_importance_button_border_color_unselected">?androidprv:attr/materialColorOutlineVariant</item>
+        <item name="notification_importance_button_foreground_color_unselected">?androidprv:attr/materialColorOnSurfaceVariant</item>
 
-        <item name="notification_importance_button_background_color_selected">@androidprv:color/materialColorSecondaryContainer</item>
-        <item name="notification_importance_button_border_color_selected">@androidprv:color/materialColorOnSecondaryContainer</item>
-        <item name="notification_importance_button_foreground_color_selected">@androidprv:color/materialColorOnSecondaryContainer</item>
+        <item name="notification_importance_button_background_color_selected">?androidprv:attr/materialColorSecondaryContainer</item>
+        <item name="notification_importance_button_border_color_selected">?androidprv:attr/materialColorOnSecondaryContainer</item>
+        <item name="notification_importance_button_foreground_color_selected">?androidprv:attr/materialColorOnSecondaryContainer</item>
 
         <!-- For AppCompat widgets, e.g. TextInputLayout -->
         <item name="colorAccent">?android:attr/colorAccent</item>
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index c8011ee..b3da71e 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -1330,7 +1330,8 @@
      */
     @ColorInt
     public static int getHomepageIconColor(Context context) {
-        return context.getColor(com.android.internal.R.color.materialColorOnSurface);
+        return getColorAttrDefaultColor(
+                context, com.android.internal.R.attr.materialColorOnSurface);
     }
 
     /**
diff --git a/src/com/android/settings/dashboard/profileselector/UserAdapter.java b/src/com/android/settings/dashboard/profileselector/UserAdapter.java
index b9f585f..54887d7 100644
--- a/src/com/android/settings/dashboard/profileselector/UserAdapter.java
+++ b/src/com/android/settings/dashboard/profileselector/UserAdapter.java
@@ -39,6 +39,7 @@
 import com.android.internal.util.UserIcons;
 import com.android.internal.widget.RecyclerView;
 import com.android.settings.R;
+import com.android.settingslib.Utils;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -61,8 +62,8 @@
             mUserHandle = userHandle;
             mUserManager = um;
             UserInfo userInfo = um.getUserInfo(mUserHandle.getIdentifier());
-            int tintColor = context.getColor(com.android.internal.R.color.materialColorPrimary);
-
+            int tintColor = Utils.getColorAttrDefaultColor(context,
+                    com.android.internal.R.attr.materialColorPrimary);
             if (userInfo.isManagedProfile()
                     || (android.os.Flags.allowPrivateProfile()
                         && android.multiuser.Flags.enablePrivateSpaceFeatures()
diff --git a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java
index 88f99c3..4acaeea 100644
--- a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java
+++ b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java
@@ -332,8 +332,9 @@
         setBackgroundColor(Color.TRANSPARENT);
         mTrapezoidSolidColor = Utils.getColorAccentDefaultColor(context);
         mTrapezoidColor = Utils.getDisabled(context, mTrapezoidSolidColor);
-        mTrapezoidHoverColor = context.getColor(
-                com.android.internal.R.color.materialColorSecondaryContainer);
+        mTrapezoidHoverColor =
+                Utils.getColorAttrDefaultColor(
+                        context, com.android.internal.R.attr.materialColorSecondaryContainer);
         // Initializes the divider line paint.
         final Resources resources = getContext().getResources();
         mDividerWidth = resources.getDimensionPixelSize(R.dimen.chartview_divider_width);
diff --git a/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java b/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java
index 9683b87..fa7b372 100644
--- a/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java
+++ b/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java
@@ -316,6 +316,7 @@
     }
 
     private int getColorOfMaterialColorPrimary() {
-        return mActivity.getColor(com.android.internal.R.color.materialColorPrimary);
+        return Utils.getColorAttrDefaultColor(
+                mActivity, com.android.internal.R.attr.materialColorPrimary);
     }
 }
diff --git a/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java b/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java
index 58e49bf..5a5b69e 100644
--- a/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java
+++ b/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java
@@ -36,6 +36,7 @@
 import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
+import com.android.settingslib.Utils;
 import com.android.settingslib.widget.LayoutPreference;
 
 import java.util.ArrayList;
@@ -201,7 +202,8 @@
     }
 
     private int getColorOfMaterialColorPrimary() {
-        return mContext.getColor(com.android.internal.R.color.materialColorPrimary);
+        return Utils.getColorAttrDefaultColor(
+                mContext, com.android.internal.R.attr.materialColorPrimary);
     }
 
     private static boolean isCtrl(int keyCode) {
diff --git a/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java b/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java
index 20defa9..4bb1069 100644
--- a/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java
+++ b/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java
@@ -28,6 +28,7 @@
 
 import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
+import com.android.settingslib.Utils;
 
 public class ModifierKeysRestorePreferenceController extends BasePreferenceController {
 
@@ -87,6 +88,7 @@
     }
 
     private int getColorOfMaterialColorPrimary() {
-        return mParent.getActivity().getColor(com.android.internal.R.color.materialColorPrimary);
+        return Utils.getColorAttrDefaultColor(
+                mParent.getActivity(), com.android.internal.R.attr.materialColorPrimary);
     }
 }
diff --git a/src/com/android/settings/notification/modes/IconUtil.java b/src/com/android/settings/notification/modes/IconUtil.java
index b589a0b..23817cb 100644
--- a/src/com/android/settings/notification/modes/IconUtil.java
+++ b/src/com/android/settings/notification/modes/IconUtil.java
@@ -23,7 +23,6 @@
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
-import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Rect;
 import android.graphics.Typeface;
@@ -37,7 +36,6 @@
 import android.view.Gravity;
 
 import androidx.annotation.AttrRes;
-import androidx.annotation.ColorInt;
 import androidx.annotation.DrawableRes;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
@@ -83,19 +81,21 @@
         Drawable base = composeIcons(
                 context.getResources(),
                 background,
-                context.getColor(com.android.internal.R.color.materialColorSecondaryContainer),
+                Utils.getColorAttr(context,
+                        com.android.internal.R.attr.materialColorSecondaryContainer),
                 outerSizePx,
                 modeIcon,
-                context.getColor(com.android.internal.R.color.materialColorOnSecondaryContainer),
+                Utils.getColorAttr(context,
+                        com.android.internal.R.attr.materialColorOnSecondaryContainer),
                 innerSizePx);
 
         Drawable selected = composeIcons(
                 context.getResources(),
                 background,
-                context.getColor(com.android.internal.R.color.materialColorPrimary),
+                Utils.getColorAttr(context, com.android.internal.R.attr.materialColorPrimary),
                 outerSizePx,
                 modeIcon,
-                context.getColor(com.android.internal.R.color.materialColorOnPrimary),
+                Utils.getColorAttr(context, com.android.internal.R.attr.materialColorOnPrimary),
                 innerSizePx);
 
         StateListDrawable result = new StateListDrawable();
@@ -114,11 +114,13 @@
     static Drawable makeIconPickerHeader(@NonNull Context context, Drawable icon) {
         return composeIconCircle(
                 context.getResources(),
-                context.getColor(com.android.internal.R.color.materialColorSecondaryContainer),
+                Utils.getColorAttr(context,
+                        com.android.internal.R.attr.materialColorSecondaryContainer),
                 context.getResources().getDimensionPixelSize(
                         R.dimen.zen_mode_icon_list_header_circle_diameter),
                 icon,
-                context.getColor(com.android.internal.R.color.materialColorOnSecondaryContainer),
+                Utils.getColorAttr(context,
+                        com.android.internal.R.attr.materialColorOnSecondaryContainer),
                 context.getResources().getDimensionPixelSize(
                         R.dimen.zen_mode_icon_list_header_icon_size));
     }
@@ -149,11 +151,13 @@
             @DrawableRes int iconResId) {
         return composeIconCircle(
                 context.getResources(),
-                context.getColor(com.android.internal.R.color.materialColorSecondaryContainer),
+                Utils.getColorAttr(context,
+                        com.android.internal.R.attr.materialColorSecondaryContainer),
                 context.getResources().getDimensionPixelSize(
                         R.dimen.zen_mode_circular_icon_diameter),
                 checkNotNull(context.getDrawable(iconResId)),
-                context.getColor(com.android.internal.R.color.materialColorOnSecondaryContainer),
+                Utils.getColorAttr(context,
+                        com.android.internal.R.attr.materialColorOnSecondaryContainer),
                 context.getResources().getDimensionPixelSize(
                         R.dimen.zen_mode_circular_icon_inner_icon_size));
     }
@@ -168,10 +172,12 @@
         if (Strings.isNullOrEmpty(displayName)) {
             return composeIconCircle(
                     context.getResources(),
-                    context.getColor(com.android.internal.R.color.materialColorTertiaryContainer),
+                    Utils.getColorAttr(context,
+                            com.android.internal.R.attr.materialColorTertiaryContainer),
                     res.getDimensionPixelSize(R.dimen.zen_mode_circular_icon_diameter),
                     checkNotNull(context.getDrawable(R.drawable.ic_zen_mode_generic_contact)),
-                    context.getColor(com.android.internal.R.color.materialColorOnTertiaryContainer),
+                    Utils.getColorAttr(context,
+                            com.android.internal.R.attr.materialColorOnTertiaryContainer),
                     res.getDimensionPixelSize(R.dimen.zen_mode_circular_icon_inner_icon_size));
         }
 
@@ -181,14 +187,14 @@
         Canvas canvas = new Canvas(bitmap);
 
         Paint circlePaint = new Paint();
-        circlePaint.setColor(context.getColor(
-                com.android.internal.R.color.materialColorTertiaryContainer));
+        circlePaint.setColor(Utils.getColorAttrDefaultColor(context,
+                com.android.internal.R.attr.materialColorTertiaryContainer));
         circlePaint.setFlags(Paint.ANTI_ALIAS_FLAG);
         canvas.drawCircle(diameter / 2f, diameter / 2f, diameter / 2f, circlePaint);
 
         Paint textPaint = new Paint();
-        textPaint.setColor(context.getColor(
-                com.android.internal.R.color.materialColorOnTertiaryContainer));
+        textPaint.setColor(Utils.getColorAttrDefaultColor(context,
+                com.android.internal.R.attr.materialColorOnTertiaryContainer));
         textPaint.setTypeface(Typeface.create("sans-serif", Typeface.NORMAL));
         textPaint.setTextAlign(Paint.Align.LEFT);
         textPaint.setTextSize(res.getDimensionPixelSize(R.dimen.zen_mode_circular_icon_text_size));
@@ -204,24 +210,12 @@
         return new BitmapDrawable(context.getResources(), bitmap);
     }
 
-    private static Drawable composeIconCircle(Resources res, @ColorInt int circleColor,
-            @Px int circleDiameterPx, Drawable icon, @ColorInt int iconColor, @Px int iconSizePx) {
-        return composeIconCircle(res, ColorStateList.valueOf(circleColor), circleDiameterPx, icon,
-                ColorStateList.valueOf(iconColor), iconSizePx);
-    }
-
     private static Drawable composeIconCircle(Resources res, ColorStateList circleColor,
             @Px int circleDiameterPx, Drawable icon, ColorStateList iconColor, @Px int iconSizePx) {
         return composeIcons(res, new ShapeDrawable(new OvalShape()), circleColor, circleDiameterPx,
                 icon, iconColor, iconSizePx);
     }
 
-    private static Drawable composeIcons(Resources res, Drawable outer, @ColorInt int outerColor,
-            @Px int outerSizePx, Drawable icon, @ColorInt int iconColor, @Px int iconSizePx) {
-        return composeIcons(res, outer, ColorStateList.valueOf(outerColor), outerSizePx, icon,
-                ColorStateList.valueOf(iconColor), iconSizePx);
-    }
-
     private static Drawable composeIcons(Resources res, Drawable outer, ColorStateList outerColor,
             @Px int outerSizePx, Drawable icon, ColorStateList iconColor, @Px int iconSizePx) {
         Drawable background = mutateDrawable(res, outer);
diff --git a/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt b/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt
index c185e02..931583a 100644
--- a/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt
+++ b/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt
@@ -100,7 +100,7 @@
             .toIntent()
 
     override fun isEnabled(context: Context) =
-        wifiHotspotStore.dataSaverStore.getBoolean(DATA_SAVER_KEY) == true &&
+        wifiHotspotStore.dataSaverStore.getBoolean(DATA_SAVER_KEY) != true &&
             super<PreferenceRestrictionMixin>.isEnabled(context)
 
     override val restrictionKeys
@@ -193,6 +193,7 @@
         super.bind(preference, metadata)
         (preference as PrimarySwitchPreference).apply {
             isChecked = preferenceDataStore!!.getBoolean(key, false)
+            isSwitchEnabled = isEnabled
         }
     }