From c8e84e540f941559d96fc0e0a8d154fdb94f4c9b Mon Sep 17 00:00:00 2001 From: Daniel Chapin Date: Tue, 10 Dec 2024 18:34:33 +0000 Subject: [PATCH] Revert "Migrate materialColor* attributes into colors" Revert submission 29910036-color-rewrite Reason for revert: DF Blocking bug:b/383230490 . Reverts will be cherry picked for a .003 release build. Reverted changes: /q/submissionid:29910036-color-rewrite (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ed8074008f149acf8e1d472866803ff74c7a5d20) Merged-In: I1229283119cbebb6f6e837b7bbd65480299086c4 Change-Id: I1229283119cbebb6f6e837b7bbd65480299086c4 --- res/color/dream_card_color_state_list.xml | 4 +- .../dream_card_icon_color_state_list.xml | 4 +- .../dream_card_summary_color_state_list.xml | 4 +- .../dream_card_text_color_state_list.xml | 4 +- .../modes_icon_selectable_background.xml | 6 +-- res/color/modes_icon_selectable_icon.xml | 6 +-- ...cessibility_contrast_button_background.xml | 8 +-- res/drawable/broadcast_button_outline.xml | 2 +- .../color_contrast_preview_background.xml | 2 +- ...trast_preview_bottom_appbar_background.xml | 2 +- ...lor_contrast_preview_button_background.xml | 2 +- ...lor_contrast_preview_dialog_background.xml | 2 +- ..._contrast_preview_icon_edit_background.xml | 2 +- ...contrast_preview_icon_group_background.xml | 2 +- ...contrast_preview_icon_inbox_background.xml | 2 +- ..._contrast_preview_icon_star_background.xml | 2 +- .../color_contrast_preview_tag_background.xml | 2 +- res/drawable/dream_default_preview_icon.xml | 2 +- res/drawable/dream_preview_rounded_bg.xml | 2 +- res/drawable/ic_article_24dp.xml | 2 +- res/drawable/ic_article_filled_24dp.xml | 2 +- res/drawable/ic_chat_bubble_24dp.xml | 2 +- res/drawable/ic_edit_24dp.xml | 2 +- res/drawable/ic_group_24dp.xml | 2 +- res/drawable/ic_inbox_24dp.xml | 2 +- res/drawable/ic_modifier_keys_reset.xml | 2 +- res/drawable/ic_star_24dp.xml | 2 +- res/drawable/modifier_key_bordered.xml | 2 +- res/drawable/modifier_key_colored.xml | 2 +- .../modifier_key_lisetview_background.xml | 2 +- ...pointer_icon_fill_container_background.xml | 2 +- ...ce_circular_icons_plus_item_background.xml | 2 +- res/drawable/rounded_bg.xml | 2 +- .../sim_confirm_dialog_btn_outline.xml | 2 +- res/drawable/trackpad_bordered.xml | 2 +- res/drawable/trackpad_button_done_colored.xml | 2 +- res/drawable/user_select_background.xml | 4 +- ...olume_dialog_button_background_outline.xml | 2 +- .../accessibility_color_contrast_preview.xml | 14 +++--- .../accessibility_color_contrast_selector.xml | 6 +-- res/layout/homepage_preference.xml | 2 +- res/layout/homepage_preference_v2.xml | 2 +- res/layout/modifier_key_item.xml | 2 +- res/layout/modifier_key_picker_dialog.xml | 2 +- .../notification_ls_minimalism_selector.xml | 4 +- res/layout/pointer_icon_fill_style_layout.xml | 2 +- .../pointer_icon_stroke_style_layout.xml | 2 +- res/layout/preference_background.xml | 4 +- .../preference_circular_icons_plus_item.xml | 2 +- res/layout/preference_widget_arrow.xml | 2 +- res/layout/trackpad_gesture_preview.xml | 4 +- res/values-night/colors.xml | 2 +- res/values/colors.xml | 4 +- res/values/styles.xml | 4 +- res/values/themes.xml | 10 ++-- res/values/themes_expressive.xml | 10 ++-- src/com/android/settings/Utils.java | 3 +- .../profileselector/UserAdapter.java | 5 +- .../batteryusage/BatteryChartView.java | 5 +- .../ModifierKeysPickerDialogFragment.java | 3 +- .../ModifierKeysPreferenceController.java | 4 +- ...difierKeysRestorePreferenceController.java | 4 +- .../settings/notification/modes/IconUtil.java | 50 ++++++++----------- 63 files changed, 127 insertions(+), 125 deletions(-) diff --git a/res/color/dream_card_color_state_list.xml b/res/color/dream_card_color_state_list.xml index 44ed589004f..082408d1583 100644 --- a/res/color/dream_card_color_state_list.xml +++ b/res/color/dream_card_color_state_list.xml @@ -17,6 +17,6 @@ - - + + \ 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 f3e08721b92..ed34ae39357 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 @@ - - + + \ 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 7252abed0cb..a1845f44d95 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 @@ - - + + \ 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 c4b3ef5f414..b39bbed75c9 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 @@ - - + + \ 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 b3b393562d3..f9280c60d6c 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"> - - - + + + diff --git a/res/color/modes_icon_selectable_icon.xml b/res/color/modes_icon_selectable_icon.xml index a5ab92b1d5b..8a517d5f474 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"> - - - + + + diff --git a/res/drawable/accessibility_contrast_button_background.xml b/res/drawable/accessibility_contrast_button_background.xml index 5f0f5ad09ec..7e41aaebee4 100644 --- a/res/drawable/accessibility_contrast_button_background.xml +++ b/res/drawable/accessibility_contrast_button_background.xml @@ -22,9 +22,9 @@ - + @@ -41,7 +41,7 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> @@ -55,7 +55,7 @@ android:left="@dimen/contrast_button_stroke_width" android:right="@dimen/contrast_button_stroke_width"> - + diff --git a/res/drawable/broadcast_button_outline.xml b/res/drawable/broadcast_button_outline.xml index 1645ad07a25..c8658a9fccd 100644 --- a/res/drawable/broadcast_button_outline.xml +++ b/res/drawable/broadcast_button_outline.xml @@ -29,7 +29,7 @@ - - + \ 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 7ffe3742c56..f3392fb01b5 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 @@ - + - + diff --git a/res/drawable/color_contrast_preview_dialog_background.xml b/res/drawable/color_contrast_preview_dialog_background.xml index 61219ac36d7..f60a271ec3d 100644 --- a/res/drawable/color_contrast_preview_dialog_background.xml +++ b/res/drawable/color_contrast_preview_dialog_background.xml @@ -17,6 +17,6 @@ - + \ 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 b6b2930f134..61fe4fef8f6 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 @@ - + \ 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 284d9caea88..46cd40d9acf 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 @@ - + \ 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 b63d9181cfa..45d82852456 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 @@ - + \ 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 027d3e15904..335ee886f7f 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 @@ - + \ 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 91b090cd963..a7b051aa280 100644 --- a/res/drawable/color_contrast_preview_tag_background.xml +++ b/res/drawable/color_contrast_preview_tag_background.xml @@ -17,6 +17,6 @@ - + \ 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 be3f128a39d..8989929fdd7 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"> - \ 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 c7034e7fbef..7cae599b6c8 100644 --- a/res/drawable/dream_preview_rounded_bg.xml +++ b/res/drawable/dream_preview_rounded_bg.xml @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/res/drawable/ic_article_24dp.xml b/res/drawable/ic_article_24dp.xml index bf9d2f7f8c7..0b38daaf643 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"> diff --git a/res/drawable/ic_article_filled_24dp.xml b/res/drawable/ic_article_filled_24dp.xml index 9e5f24c0aad..e22d151beb7 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"> diff --git a/res/drawable/ic_chat_bubble_24dp.xml b/res/drawable/ic_chat_bubble_24dp.xml index 5b6536b9655..c7ad6bf28a1 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"> diff --git a/res/drawable/ic_edit_24dp.xml b/res/drawable/ic_edit_24dp.xml index fdd82f579d3..e663b5275c0 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"> diff --git a/res/drawable/ic_group_24dp.xml b/res/drawable/ic_group_24dp.xml index 1c65fc26a4f..92815c2cc2f 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"> diff --git a/res/drawable/ic_inbox_24dp.xml b/res/drawable/ic_inbox_24dp.xml index 18cc3e951ae..7800ea145ef 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"> diff --git a/res/drawable/ic_modifier_keys_reset.xml b/res/drawable/ic_modifier_keys_reset.xml index 9fdbab0b53a..5345c2578f9 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"> diff --git a/res/drawable/ic_star_24dp.xml b/res/drawable/ic_star_24dp.xml index 449067875c4..667db94e0fd 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"> diff --git a/res/drawable/modifier_key_bordered.xml b/res/drawable/modifier_key_bordered.xml index a3c7cc5d318..2931679685d 100644 --- a/res/drawable/modifier_key_bordered.xml +++ b/res/drawable/modifier_key_bordered.xml @@ -25,7 +25,7 @@ + android:color="?androidprv:attr/materialColorPrimary"/> diff --git a/res/drawable/modifier_key_colored.xml b/res/drawable/modifier_key_colored.xml index 4610738127e..995d7336564 100644 --- a/res/drawable/modifier_key_colored.xml +++ b/res/drawable/modifier_key_colored.xml @@ -22,7 +22,7 @@ - + diff --git a/res/drawable/modifier_key_lisetview_background.xml b/res/drawable/modifier_key_lisetview_background.xml index a0d8c03bfac..3353cfdaab2 100644 --- a/res/drawable/modifier_key_lisetview_background.xml +++ b/res/drawable/modifier_key_lisetview_background.xml @@ -22,7 +22,7 @@ - + diff --git a/res/drawable/pointer_icon_fill_container_background.xml b/res/drawable/pointer_icon_fill_container_background.xml index 7f6bf533073..ca930a74540 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"> - + diff --git a/res/drawable/preference_circular_icons_plus_item_background.xml b/res/drawable/preference_circular_icons_plus_item_background.xml index e261c76af46..faaa1fd11fe 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 @@ - + \ No newline at end of file diff --git a/res/drawable/rounded_bg.xml b/res/drawable/rounded_bg.xml index 0e2743de1c3..ae12af895dc 100644 --- a/res/drawable/rounded_bg.xml +++ b/res/drawable/rounded_bg.xml @@ -17,7 +17,7 @@ - + - + android:color="?androidprv:attr/materialColorPrimary"/> diff --git a/res/drawable/trackpad_button_done_colored.xml b/res/drawable/trackpad_button_done_colored.xml index 4610738127e..995d7336564 100644 --- a/res/drawable/trackpad_button_done_colored.xml +++ b/res/drawable/trackpad_button_done_colored.xml @@ -22,7 +22,7 @@ - + diff --git a/res/drawable/user_select_background.xml b/res/drawable/user_select_background.xml index 490246c49fe..7b75160213d 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"> - + - + diff --git a/res/drawable/volume_dialog_button_background_outline.xml b/res/drawable/volume_dialog_button_background_outline.xml index f8df90e604b..36ffb93f7a4 100644 --- a/res/drawable/volume_dialog_button_background_outline.xml +++ b/res/drawable/volume_dialog_button_background_outline.xml @@ -21,7 +21,7 @@ + android:textColor="?androidprv:attr/materialColorOnSurface"/> + android:textColor="?androidprv:attr/materialColorOnSurface"/> + android:textColor="?androidprv:attr/materialColorOnSurface"/> + android:tint="?androidprv:attr/materialColorPrimary"/> diff --git a/res/layout/notification_ls_minimalism_selector.xml b/res/layout/notification_ls_minimalism_selector.xml index cf34561082d..d37ad5401a2 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"/> + android:textColor="?androidprv:attr/materialColorOnSurface"/> diff --git a/res/layout/pointer_icon_stroke_style_layout.xml b/res/layout/pointer_icon_stroke_style_layout.xml index a68b5967357..01b58b294ce 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 1c69be4ac7e..51718b8fd5c 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 352708806b7..98820863410 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 50edb3c0bd6..f36f693f012 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 978da06319c..15cc743196d 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"/>