Update Car Intent Resolver UI

Bug: 329451873 (Hudson)
Bug: 329452468 (CW)
Test: Manual

Updates the UI across both Hudson and CW, adding a blurred background
and new styling to match Design System 2.0. The changes were made with car theming in mind, using “car-ified” widgets and car styles/attributes as much as possible.

Topic includes changes to:
- CarActivityResolver app
- frameworks/…/res car_resolver_list layouts
- frameworks/…/res build time base RRO (Hudson)
- frameworks/…/res build time RRO (CW on top of Hudson)

HSVs:
Hudson unselected (before):  https://hsv.googleplex.com/6608441803014144
Hudson selected (before):    https://hsv.googleplex.com/6729418717265920
Hudson preselected (before): https://hsv.googleplex.com/5858668019974144
Hudson unselected (after):   https://hsv.googleplex.com/5842426366263296
Hudson selected (after):     https://hsv.googleplex.com/5364547064954880
Hudson preselected (after):  https://hsv.googleplex.com/6455601056972800
CW unselected (before):      https://hsv.googleplex.com/6539239947763712
CW selected (before):        https://hsv.googleplex.com/4713227354112000
CW preselected (before):     https://hsv.googleplex.com/6722643641237504
CW unselected (after):       https://hsv.googleplex.com/6490446971797504
CW selected (after):         https://hsv.googleplex.com/4735209802039296
CW preselected (after):      https://hsv.googleplex.com/5959860402257920

Change-Id: Iebf04b8e8d81e4784ed33444c4077a5950f34dbb
diff --git a/core/res/res/drawable-car/car_activity_resolver_list_background.xml b/core/res/res/drawable-car/car_activity_resolver_list_background.xml
new file mode 100644
index 0000000..dbbadd8
--- /dev/null
+++ b/core/res/res/drawable-car/car_activity_resolver_list_background.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2024 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.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="?attr/colorBackgroundFloating" />
+    <corners android:radius="@dimen/car_activity_resolver_corner_radius" />
+</shape>
\ No newline at end of file
diff --git a/core/res/res/layout-car/car_resolver_list.xml b/core/res/res/layout-car/car_resolver_list.xml
index 755cbfe..75266b2 100644
--- a/core/res/res/layout-car/car_resolver_list.xml
+++ b/core/res/res/layout-car/car_resolver_list.xml
@@ -18,147 +18,129 @@
 -->
 <com.android.internal.widget.ResolverDrawerLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
+    android:layout_width="@dimen/car_activity_resolver_width"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center"
     android:id="@id/contentPanel">
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:weightSum="5"
-        android:layout_alwaysShow="true"
-        android:orientation="vertical"
-        android:background="?attr/colorBackgroundFloating"
-        android:elevation="8dp">
+        android:layout_height="wrap_content"
+        android:weightSum="2"
+        android:orientation="vertical" >
+
+        <View android:id="@+id/empty_top"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@android:color/transparent" />
 
         <LinearLayout
-            android:id="@+id/button_bar"
-            android:visibility="gone"
-            style="?attr/buttonBarStyle"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_ignoreOffset="true"
-            android:layout_alwaysShow="true"
-            android:layout_hasNestedScrollIndicator="true"
-            android:background="?attr/colorBackgroundFloating"
-            android:orientation="horizontal"
-            android:paddingTop="8dp"
-            android:paddingStart="12dp"
-            android:weightSum="4"
-            android:paddingEnd="12dp"
-            android:elevation="8dp">
+            android:orientation="vertical"
+            android:background="@drawable/car_activity_resolver_list_background">
 
-            <TextView
-                android:id="@+id/profile_button"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginEnd="8dp"
-                android:paddingStart="8dp"
-                android:paddingEnd="8dp"
-                android:textSize="40sp"
-                android:layout_weight="4"
-                android:layout_gravity="left"
-                android:visibility="gone"
-                android:textColor="?attr/colorAccent"
-                android:singleLine="true"/>
-
-            <TextView
-                android:id="@+id/title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="left"
-                android:layout_weight="3"
-                android:paddingTop="8dp"
-                android:layout_below="@id/profile_button"
-                android:textAppearance="?android:attr/textAppearanceLarge"
-                android:paddingBottom="8dp"/>
-
-            <Button
-                android:id="@+id/button_once"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:enabled="false"
-                android:layout_gravity="right"
-                style="?attr/buttonBarButtonStyle"
-                android:text="@string/activity_resolver_use_once"
-                android:layout_weight="0.5"
-                android:onClick="onButtonClick"/>
-
-            <Button
-                android:id="@+id/button_always"
-                android:layout_marginLeft="2dp"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:enabled="false"
-                android:layout_gravity="right"
-                style="?attr/buttonBarButtonStyle"
-                android:text="@string/activity_resolver_use_always"
-                android:layout_weight="0.5"
-                android:onClick="onButtonClick"/>
-        </LinearLayout>
-
-        <FrameLayout
-            android:id="@+id/stub"
-            android:visibility="gone"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="?attr/colorBackgroundFloating"/>
-
-        <TabHost
-            android:id="@+id/profile_tabhost"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_alignParentTop="true"
-            android:layout_centerHorizontal="true"
-            android:background="?attr/colorBackgroundFloating">
             <LinearLayout
-                android:orientation="vertical"
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-                <TabWidget
-                    android:id="@android:id/tabs"
-                    android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/car_activity_resolver_list_background"
+                android:orientation="horizontal"
+                android:paddingVertical="@dimen/car_padding_4"
+                android:paddingHorizontal="@dimen/car_padding_4" >
+                <TextView
+                    android:id="@+id/profile_button"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:visibility="gone">
-                </TabWidget>
-                <View
-                    android:id="@+id/resolver_tab_divider"
-                    android:visibility="gone"
-                    android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:background="?attr/colorBackgroundFloating"
-                    android:foreground="?attr/dividerVertical"
-                    android:layout_marginBottom="8dp"/>
-                <FrameLayout
-                    android:id="@android:id/tabcontent"
+                    android:visibility="gone" />
+
+                <TextView
+                    android:id="@+id/title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="start"
+                    android:textAppearance="@android:style/TextAppearance.DeviceDefault.DialogWindowTitle" />
+            </LinearLayout>
+
+            <FrameLayout
+                android:id="@+id/stub"
+                android:visibility="gone"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"/>
+
+            <TabHost
+                android:id="@+id/profile_tabhost"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_alignParentTop="true"
+                android:layout_centerHorizontal="true"
+                android:background="?android:attr/colorBackgroundFloating">
+                <LinearLayout
+                    android:orientation="vertical"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content">
-                    <com.android.internal.app.ResolverViewPager
-                        android:id="@+id/profile_pager"
+                    <TabWidget
+                        android:id="@android:id/tabs"
+                        android:visibility="gone"
                         android:layout_width="match_parent"
-                        android:layout_height="wrap_content"/>
-                </FrameLayout>
+                        android:layout_height="wrap_content">
+                    </TabWidget>
+                    <View
+                        android:id="@+id/resolver_tab_divider"
+                        android:visibility="gone"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content" />
+                    <FrameLayout
+                        android:id="@android:id/tabcontent"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+                        <com.android.internal.app.ResolverViewPager
+                            android:id="@+id/profile_pager"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"/>
+                    </FrameLayout>
+                </LinearLayout>
+            </TabHost>
+
+            <LinearLayout
+                android:id="@+id/button_bar"
+                android:visibility="gone"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginVertical="@dimen/car_padding_4"
+                android:layout_marginHorizontal="@dimen/car_padding_4"
+                android:padding="0dp"
+                android:gravity="center"
+                android:background="@drawable/car_activity_resolver_list_background"
+                android:orientation="vertical">
+
+                <Button
+                    android:id="@+id/button_once"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/car_button_height"
+                    android:enabled="false"
+                    android:layout_gravity="center"
+                    android:layout_marginBottom="@dimen/car_padding_2"
+                    android:text="@string/activity_resolver_use_once"
+                    android:onClick="onButtonClick"/>
+
+                <Button
+                    android:id="@+id/button_always"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/car_button_height"
+                    android:enabled="false"
+                    android:layout_gravity="center"
+                    android:text="@string/activity_resolver_use_always"
+                    android:onClick="onButtonClick"/>
             </LinearLayout>
-        </TabHost>
+        </LinearLayout>
 
-        <View
-            android:layout_alwaysShow="true"
+        <View android:id="@+id/empty_bottom"
             android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:background="?attr/colorBackgroundFloating"
-            android:foreground="?attr/dividerVertical"/>
-
-        <TextView android:id="@+id/empty"
-                  android:layout_width="match_parent"
-                  android:layout_height="wrap_content"
-                  android:background="?attr/colorBackgroundFloating"
-                  android:elevation="8dp"
-                  android:layout_alwaysShow="true"
-                  android:text="@string/noApplications"
-                  android:padding="32dp"
-                  android:gravity="center"
-                  android:visibility="gone"/>
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@android:color/transparent" />
 
     </LinearLayout>
 
-</com.android.internal.widget.ResolverDrawerLayout>
+</com.android.internal.widget.ResolverDrawerLayout>
\ No newline at end of file
diff --git a/core/res/res/layout-car/car_resolver_list_with_default.xml b/core/res/res/layout-car/car_resolver_list_with_default.xml
index 5e450b2..0beb95b 100644
--- a/core/res/res/layout-car/car_resolver_list_with_default.xml
+++ b/core/res/res/layout-car/car_resolver_list_with_default.xml
@@ -18,179 +18,162 @@
 -->
 <com.android.internal.widget.ResolverDrawerLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:maxCollapsedHeight="200dp"
+    android:layout_width="@dimen/car_activity_resolver_width"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center"
     android:id="@id/contentPanel">
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:weightSum="5"
-        android:layout_alwaysShow="true"
-        android:orientation="vertical"
-        android:background="?attr/colorBackgroundFloating"
-        android:elevation="8dp">
+        android:layout_height="wrap_content"
+        android:weightSum="2"
+        android:orientation="vertical" >
+
+        <View android:id="@+id/empty_top"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@android:color/transparent" />
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_weight="0.5"
-            android:orientation="horizontal">
+            android:orientation="vertical"
+            android:layout_gravity="center"
+            android:background="@drawable/car_activity_resolver_list_background">
 
-            <ImageView
-                android:id="@+id/icon"
-                android:layout_width="60dp"
-                android:layout_height="60dp"
-                android:layout_gravity="start|top"
-                android:layout_marginStart="10dp"
-                android:layout_marginEnd="5dp"
-                android:layout_marginTop="10dp"
-                android:src="@drawable/resolver_icon_placeholder"
-                android:scaleType="fitCenter"/>
+            <FrameLayout
+                android:id="@+id/stub"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/car_activity_resolver_list_background"/>
 
-            <TextView
-                android:id="@+id/title"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="?attr/listPreferredItemHeight"
-                android:layout_marginStart="16dp"
-                android:textAppearance="?android:attr/textAppearanceLarge"
-                android:gravity="start|center_vertical"
-                android:paddingEnd="16dp"/>
 
             <LinearLayout
-                android:id="@+id/profile_button"
-                android:layout_width="wrap_content"
-                android:layout_height="48dp"
-                android:layout_marginTop="4dp"
-                android:layout_marginEnd="4dp"
-                android:paddingStart="8dp"
-                android:paddingEnd="8dp"
-                android:paddingTop="4dp"
-                android:paddingBottom="4dp"
-                android:focusable="true"
-                android:visibility="gone"
-                style="?attr/borderlessButtonStyle">
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:minHeight="@dimen/car_activity_resolver_list_item_height"
+                android:orientation="horizontal">
+
+                <RadioButton
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:focusable="false"
+                    android:clickable="false"
+                    android:layout_marginStart="?attr/listPreferredItemPaddingStart"
+                    android:layout_gravity="start|center_vertical"
+                    android:checked="true"/>
 
                 <ImageView
                     android:id="@+id/icon"
-                    android:layout_width="24dp"
-                    android:layout_height="24dp"
+                    android:layout_width="@dimen/car_icon_size"
+                    android:layout_height="@dimen/car_icon_size"
                     android:layout_gravity="start|center_vertical"
-                    android:layout_marginEnd="?attr/listPreferredItemPaddingEnd"
-                    android:layout_marginTop="12dp"
-                    android:layout_marginBottom="12dp"
+                    android:layout_marginStart="@dimen/car_padding_4"
+                    android:src="@drawable/resolver_icon_placeholder"
                     android:scaleType="fitCenter"/>
 
                 <TextView
-                    android:id="@id/text1"
+                    android:id="@+id/title"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="start|center_vertical"
-                    android:layout_marginEnd="?attr/listPreferredItemPaddingEnd"
-                    android:textAppearance="?attr/textAppearanceButton"
-                    android:textColor="?attr/textColorPrimary"
-                    android:minLines="1"
-                    android:maxLines="1"
-                    android:ellipsize="marquee"/>
-            </LinearLayout>
-        </LinearLayout>
+                    android:layout_marginHorizontal="?attr/listPreferredItemPaddingStart"
+                    style="?android:attr/textAppearanceListItem"
+                    android:layout_gravity="start|center_vertical" />
 
-        <LinearLayout
-            android:id="@+id/button_bar"
-            android:visibility="gone"
-            style="?attr/buttonBarStyle"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_alwaysShow="true"
-            android:gravity="end|center_vertical"
-            android:layout_weight="0.5"
-            android:orientation="horizontal"
-            android:layoutDirection="locale"
-            android:measureWithLargestChild="true"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:paddingStart="12dp"
-            android:paddingEnd="12dp"
-            android:elevation="8dp">
-
-            <Button
-                android:id="@+id/button_once"
-                android:layout_width="wrap_content"
-                android:layout_gravity="start"
-                android:maxLines="2"
-                style="?attr/buttonBarButtonStyle"
-                android:minHeight="@dimen/alert_dialog_button_bar_height"
-                android:layout_height="wrap_content"
-                android:enabled="false"
-                android:text="@string/activity_resolver_use_once"
-                android:onClick="onButtonClick"/>
-
-            <Button
-                android:id="@+id/button_always"
-                android:layout_width="wrap_content"
-                android:layout_gravity="end"
-                android:maxLines="2"
-                android:minHeight="@dimen/alert_dialog_button_bar_height"
-                style="?attr/buttonBarButtonStyle"
-                android:layout_height="wrap_content"
-                android:enabled="false"
-                android:text="@string/activity_resolver_use_always"
-                android:onClick="onButtonClick"/>
-        </LinearLayout>
-
-        <FrameLayout
-            android:id="@+id/stub"
-            android:layout_alwaysShow="true"
-            android:visibility="gone"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="?attr/colorBackgroundFloating"/>
-
-        <TabHost
-            android:layout_alwaysShow="true"
-            android:id="@+id/profile_tabhost"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_alignParentTop="true"
-            android:layout_centerHorizontal="true"
-            android:background="?attr/colorBackgroundFloating">
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-                <TabWidget
-                    android:id="@android:id/tabs"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:visibility="gone">
-                </TabWidget>
-                <View
-                    android:id="@+id/resolver_tab_divider"
+                <LinearLayout
+                    android:id="@+id/profile_button"
                     android:visibility="gone"
-                    android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:background="?attr/colorBackgroundFloating"
-                    android:foreground="?attr/dividerVertical"
-                    android:layout_marginBottom="8dp"/>
-                <FrameLayout
-                    android:id="@android:id/tabcontent"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content">
+
+                    <ImageView
+                        android:id="@+id/icon"
+                        android:visibility="gone"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content" />
+
+                    <TextView
+                        android:id="@id/text1"
+                        android:visibility="gone"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content" />
+                </LinearLayout>
+            </LinearLayout>
+
+            <TabHost
+                android:id="@+id/profile_tabhost"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_alignParentTop="true"
+                android:layout_centerHorizontal="true"
+                android:background="?attr/colorBackgroundFloating">
+                <LinearLayout
+                    android:orientation="vertical"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content">
-                    <com.android.internal.app.ResolverViewPager
-                        android:id="@+id/profile_pager"
+                    <TabWidget
+                        android:id="@android:id/tabs"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:visibility="gone">
+                    </TabWidget>
+                    <View
+                        android:id="@+id/resolver_tab_divider"
+                        android:visibility="gone"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content" />
+                    <FrameLayout
+                        android:id="@android:id/tabcontent"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content">
-                    </com.android.internal.app.ResolverViewPager>
-                </FrameLayout>
-            </LinearLayout>
-        </TabHost>
+                        <com.android.internal.app.ResolverViewPager
+                            android:id="@+id/profile_pager"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content">
+                        </com.android.internal.app.ResolverViewPager>
+                    </FrameLayout>
+                </LinearLayout>
+            </TabHost>
 
-        <View
+            <LinearLayout
+                android:id="@+id/button_bar"
+                android:visibility="gone"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginVertical="@dimen/car_padding_4"
+                android:layout_marginHorizontal="@dimen/car_padding_4"
+                android:gravity="center"
+                android:background="@drawable/car_activity_resolver_list_background"
+                android:orientation="vertical">
+
+                <Button
+                    android:id="@+id/button_once"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/car_button_height"
+                    android:enabled="false"
+                    android:layout_gravity="center"
+                    android:layout_marginBottom="@dimen/car_padding_2"
+                    android:text="@string/activity_resolver_use_once"
+                    android:onClick="onButtonClick"/>
+
+                <Button
+                    android:id="@+id/button_always"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/car_button_height"
+                    android:enabled="false"
+                    android:layout_gravity="center"
+                    android:text="@string/activity_resolver_use_always"
+                    android:onClick="onButtonClick"/>
+            </LinearLayout>
+        </LinearLayout>
+
+        <View android:id="@+id/empty_bottom"
             android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:background="?attr/dividerVertical"/>
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@android:color/transparent" />
+
     </LinearLayout>
 
 </com.android.internal.widget.ResolverDrawerLayout>
diff --git a/core/res/res/values/dimens_car.xml b/core/res/res/values/dimens_car.xml
index c5dddb8..99377ff 100644
--- a/core/res/res/values/dimens_car.xml
+++ b/core/res/res/values/dimens_car.xml
@@ -151,4 +151,10 @@
     <dimen name="action_bar_button_margin">@*android:dimen/car_padding_4</dimen>
     <dimen name="action_bar_button_max_width">268dp</dimen>
     <dimen name="action_bar_toggle_internal_padding">@*android:dimen/car_padding_3</dimen>
+
+    <!-- Intent Resolver -->
+    <dimen name="car_activity_resolver_width">706dp</dimen>
+    <dimen name="car_activity_resolver_list_item_height">96dp</dimen>
+    <dimen name="car_activity_resolver_list_max_height">256dp</dimen>
+    <dimen name="car_activity_resolver_corner_radius">24dp</dimen>
 </resources>