[automerge] [a11y] Fix disabled profile dialog for PhotoPicker 2p: 543b9f0107

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/17292743

Bug: 224388055
Bug: 205814763
Change-Id: I6837934aaf43e46614d09281b3da7aabacc2274c
diff --git a/res/values-night-v31/styles.xml b/res/values-night-v31/styles.xml
index 4034fa3..7e0cff3 100644
--- a/res/values-night-v31/styles.xml
+++ b/res/values-night-v31/styles.xml
@@ -30,6 +30,9 @@
         <item name="pickerTabBackgroundColor">?android:attr/colorBackground</item>
         <item name="pickerTextColor">?android:attr/textColorSecondary</item>
         <item name="pickerSelectedColor">@android:color/system_accent1_300</item>
+        <item name="pickerProfileDialogButtonAndIconColor">@android:color/system_accent1_300</item>
+        <item name="pickerProfileDialogTitleColor">?android:attr/textColorPrimaryInverse</item>
+        <item name="pickerProfileDialogBodyColor">?android:attr/textColorSecondaryInverse</item>
     </style>
 
 </resources>
diff --git a/res/values-night/styles.xml b/res/values-night/styles.xml
index 290e8af..37a0a93 100644
--- a/res/values-night/styles.xml
+++ b/res/values-night/styles.xml
@@ -49,6 +49,9 @@
         <item name="pickerTabBackgroundColor">@color/picker_background_color</item>
         <item name="pickerTextColor">?android:attr/textColorSecondary</item>
         <item name="pickerSelectedColor">?android:attr/colorAccent</item>
+        <item name="pickerProfileDialogButtonAndIconColor">#669DF6</item>
+        <item name="pickerProfileDialogTitleColor">#F1F3F4</item>
+        <item name="pickerProfileDialogBodyColor">#DADCE0</item>
     </style>
 
 </resources>
diff --git a/res/values-v31/dimens.xml b/res/values-v31/dimens.xml
index 0c0ad5e..f753376 100644
--- a/res/values-v31/dimens.xml
+++ b/res/values-v31/dimens.xml
@@ -27,4 +27,8 @@
 
     <dimen name="preview_mute_marginBottom">88dp</dimen>
 
+    <!-- PhotoPicker Work Profile -->
+    <dimen name="picker_profile_dialog_radius">28dp</dimen>
+    <dimen name="picker_profile_dialog_scrim">0.8</dimen>
+
 </resources>
diff --git a/res/values-v31/styles.xml b/res/values-v31/styles.xml
index c0f5623..ae55394 100644
--- a/res/values-v31/styles.xml
+++ b/res/values-v31/styles.xml
@@ -30,6 +30,9 @@
         <item name="pickerTabBackgroundColor">?android:attr/colorBackground</item>
         <item name="pickerTextColor">?android:attr/textColorPrimary</item>
         <item name="pickerSelectedColor">@android:color/system_accent1_600</item>
+        <item name="pickerProfileDialogButtonAndIconColor">@android:color/system_accent1_600</item>
+        <item name="pickerProfileDialogTitleColor">?android:attr/textColorPrimary</item>
+        <item name="pickerProfileDialogBodyColor">?android:attr/textColorSecondary</item>
     </style>
 
 </resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index e53d642..a21a99f 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -51,4 +51,13 @@
     <!-- The selected color of the view selected button and check icon -->
     <attr name="pickerSelectedColor" format="reference|color" />
 
+    <!-- Photo Picker Profile Dialog button and icon color. -->
+    <attr name="pickerProfileDialogButtonAndIconColor" format="reference|color" />
+
+    <!-- Photo Picker Profile Dialog title color. -->
+    <attr name="pickerProfileDialogTitleColor" format="reference|color" />
+
+    <!-- Photo Picker Profile Dialog body color. -->
+    <attr name="pickerProfileDialogBodyColor" format="reference|color" />
+
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 61e792e..7413aa9 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -94,6 +94,7 @@
     <!-- PhotoPicker Work Profile -->
     <dimen name="picker_profile_button_margin_bottom">16dp</dimen>
     <dimen name="picker_profile_dialog_radius">8dp</dimen>
+    <dimen name="picker_profile_dialog_scrim">0.6</dimen>
     <dimen name="picker_profile_dialog_title_text_size">14sp</dimen>
     <dimen name="picker_profile_dialog_icon_height">24dp</dimen>
     <dimen name="picker_profile_dialog_icon_width">24dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 04c80e4..14a357e 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -47,10 +47,21 @@
 
     <style name="ProfileDialogTheme"
            parent="@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog.Centered">
-        <item name="android:dialogCornerRadius">@dimen/picker_profile_dialog_radius</item>
+        <item name="shapeAppearanceOverlay">@style/ShapeAppearance</item>
+        <item name="android:backgroundDimAmount">@dimen/picker_profile_dialog_scrim</item>
         <item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialogTitleStyle</item>
         <item name="materialAlertDialogBodyTextStyle">@style/MaterialAlertDialogBodyStyle</item>
         <item name="materialAlertDialogTitleIconStyle">@style/MaterialAlertDialogIconStyle</item>
+        <item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
+    </style>
+
+    <style name="ShapeAppearance">
+        <item name="cornerFamily">rounded</item>
+        <item name="cornerSize">@dimen/picker_profile_dialog_radius</item>
+    </style>
+
+    <style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
+        <item name="android:textColor">?attr/pickerProfileDialogButtonAndIconColor</item>
     </style>
 
     <style name="MaterialAlertDialogTitleStyle"
@@ -67,7 +78,7 @@
 
     <style name="MaterialAlertDialogIconStyle"
            parent="@style/MaterialAlertDialog.MaterialComponents.Title.Icon.CenterStacked">
-        <item name="android:tint">?android:attr/colorAccent</item>
+        <item name="android:tint">?attr/pickerProfileDialogButtonAndIconColor</item>
         <item name="android:importantForAccessibility">no</item>
         <item name="android:layout_width">@dimen/picker_profile_dialog_icon_width</item>
         <item name="android:layout_height">@dimen/picker_profile_dialog_icon_height</item>
@@ -97,6 +108,9 @@
         <item name="pickerTabBackgroundColor">@color/picker_background_color</item>
         <item name="pickerTextColor">?android:attr/textColorPrimary</item>
         <item name="pickerSelectedColor">?android:attr/colorAccent</item>
+        <item name="pickerProfileDialogButtonAndIconColor">#1A73E8</item>
+        <item name="pickerProfileDialogTitleColor">#202124</item>
+        <item name="pickerProfileDialogBodyColor">#5F6368</item>
     </style>
 
 </resources>
diff --git a/res/values/styles_text.xml b/res/values/styles_text.xml
index bb8e245..f19fe71 100644
--- a/res/values/styles_text.xml
+++ b/res/values/styles_text.xml
@@ -54,13 +54,13 @@
     <style name="PickerProfileDialogTitle"
            parent="@android:style/TextAppearance.DeviceDefault.DialogWindowTitle">
         <item name="android:textAllCaps">false</item>
-        <item name="android:textColor">?attr/pickerTextColor</item>
+        <item name="android:textColor">?attr/pickerProfileDialogTitleColor</item>
         <item name="android:textSize">@dimen/picker_profile_dialog_title_text_size</item>
     </style>
 
     <style name="PickerProfileDialogBody" parent="@android:style/TextAppearance.Material.Body2">
         <item name="android:textAllCaps">false</item>
-        <item name="android:textColor">?attr/pickerTextColor</item>
+        <item name="android:textColor">?attr/pickerProfileDialogBodyColor</item>
     </style>
 
 </resources>