Merge "Apply AnimationModule to SurroundView Service" into rvc-dev
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_button_bar_material.xml b/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_button_bar_material.xml
deleted file mode 100644
index b227bec..0000000
--- a/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_button_bar_material.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2014 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.
--->
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-            android:id="@*android:id/buttonPanel"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:scrollbarAlwaysDrawVerticalTrack="true"
-            android:scrollIndicators="top|bottom"
-            android:fillViewport="true"
-            style="?android:attr/buttonBarStyle">
-    <com.android.internal.widget.ButtonBarLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingStart="@*android:dimen/button_bar_layout_start_padding"
-        android:paddingEnd="@*android:dimen/button_bar_layout_end_padding"
-        android:paddingTop="@*android:dimen/button_bar_layout_top_padding"
-        android:layoutDirection="locale"
-        android:orientation="horizontal"
-        android:gravity="left|center_vertical">
-
-        <Button
-            android:id="@*android:id/button3"
-            style="@*android:style/CarAction1"
-            android:background="@*android:drawable/car_dialog_button_background"
-            android:layout_marginRight="@*android:dimen/button_end_margin"
-            android:layout_width="wrap_content"
-            android:layout_height="@*android:dimen/button_layout_height" />
-
-        <Button
-            android:id="@*android:id/button2"
-            style="@*android:style/CarAction1"
-            android:background="@*android:drawable/car_dialog_button_background"
-            android:layout_marginRight="@*android:dimen/button_end_margin"
-            android:layout_width="wrap_content"
-            android:layout_height="@*android:dimen/button_layout_height" />
-
-        <Button
-            android:id="@*android:id/button1"
-            style="@*android:style/CarAction1"
-            android:background="@*android:drawable/car_dialog_button_background"
-            android:layout_width="wrap_content"
-            android:layout_height="@*android:dimen/button_layout_height" />
-        <Space
-            android:id="@*android:id/spacer"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:visibility="invisible" />
-    </com.android.internal.widget.ButtonBarLayout>
-</ScrollView>
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_material.xml b/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_material.xml
deleted file mode 100644
index 7452026..0000000
--- a/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_material.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2014 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.
--->
-
-<com.android.internal.widget.AlertDialogLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@*android:id/parentPanel"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="start|top"
-    android:orientation="vertical">
-
-    <include layout="@*android:layout/alert_dialog_title_material" />
-
-    <FrameLayout
-        android:id="@*android:id/contentPanel"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:minHeight="48dp">
-
-        <ScrollView
-            android:id="@*android:id/scrollView"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:clipToPadding="false">
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical">
-
-                <Space
-                    android:id="@*android:id/textSpacerNoTitle"
-                    android:visibility="gone"
-                    android:layout_width="match_parent"
-                    android:layout_height="@*android:dimen/dialog_no_title_padding_top" />
-
-                <TextView
-                    android:id="@*android:id/message"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@*android:dimen/text_view_start_margin"
-                    android:layout_marginEnd="@*android:dimen/text_view_end_margin"
-                    style="@*android:style/CarBody2"/>
-
-                <!-- we don't need this spacer, but the id needs to be here for compatibility -->
-                <Space
-                    android:id="@*android:id/textSpacerNoButtons"
-                    android:visibility="gone"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp" />
-            </LinearLayout>
-        </ScrollView>
-    </FrameLayout>
-
-    <FrameLayout
-        android:id="@*android:id/customPanel"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:minHeight="48dp">
-
-        <FrameLayout
-            android:id="@*android:id/custom"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
-    </FrameLayout>
-
-    <include
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        layout="@*android:layout/alert_dialog_button_bar_material" />
-</com.android.internal.widget.AlertDialogLayout>
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_title_material.xml b/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_title_material.xml
deleted file mode 100644
index 92bd7d0..0000000
--- a/car_product/overlay/frameworks/base/core/res/res/layout/alert_dialog_title_material.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:id="@*android:id/topPanel"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content"
-              android:gravity="center_vertical"
-              android:orientation="vertical">
-
-    <!-- If the client uses a customTitle, it will be added here. -->
-
-    <RelativeLayout
-        android:id="@*android:id/title_template"
-        android:layout_width="match_parent"
-        android:layout_height="@*android:dimen/car_card_header_height"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:id="@*android:id/icon"
-            android:layout_width="@*android:dimen/image_size"
-            android:layout_height="@*android:dimen/image_size"
-            android:layout_marginStart="@*android:dimen/image_margin_start"
-            android:layout_alignParentStart="true"
-            android:layout_centerVertical="true"
-            android:scaleType="fitCenter"
-            android:src="@null" />
-
-        <com.android.internal.widget.DialogTitle
-            android:id="@*android:id/alertTitle"
-            android:maxLines="1"
-            android:ellipsize="none"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_toEndOf="@*android:id/icon"
-            android:textAlignment="viewStart"
-            android:layout_centerVertical="true"
-            android:layout_marginStart="@*android:dimen/text_view_start_margin"
-            android:layout_marginEnd="@*android:dimen/text_view_end_margin"
-            style="?android:attr/windowTitleStyle" />
-    </RelativeLayout>
-
-    <Space
-        android:id="@*android:id/titleDividerNoCustom"
-        android:visibility="gone"
-        android:layout_width="match_parent"
-        android:layout_height="0dp" />
-</LinearLayout>
diff --git a/car_product/overlay/frameworks/base/core/res/res/values/styles_device_default.xml b/car_product/overlay/frameworks/base/core/res/res/values/styles_device_default.xml
index be7e15a..08ea8dc 100644
--- a/car_product/overlay/frameworks/base/core/res/res/values/styles_device_default.xml
+++ b/car_product/overlay/frameworks/base/core/res/res/values/styles_device_default.xml
@@ -141,4 +141,9 @@
         <item name="android:layout">@*android:layout/car_preference</item>
     </style>
 
+    <!-- AlertDialog Style -->
+    <style name="AlertDialog.DeviceDefault" parent="*android:AlertDialog.Material">
+        <item name="android:layout">@*android:layout/car_alert_dialog</item>
+    </style>
+
 </resources>
diff --git a/car_product/overlay/frameworks/base/core/res/res/values/themes_device_defaults.xml b/car_product/overlay/frameworks/base/core/res/res/values/themes_device_defaults.xml
index 98b52dd..bb1917b 100644
--- a/car_product/overlay/frameworks/base/core/res/res/values/themes_device_defaults.xml
+++ b/car_product/overlay/frameworks/base/core/res/res/values/themes_device_defaults.xml
@@ -82,6 +82,7 @@
         <item name="android:textAppearanceMedium">@*android:style/TextAppearance.DeviceDefault.Medium</item>
         <item name="android:textAppearanceSmall">@*android:style/TextAppearance.DeviceDefault.Small</item>
         <item name="android:textAppearanceButton">@*android:style/Widget.DeviceDefault.Button</item>
+        <item name="android:alertDialogStyle">@*android:style/AlertDialog.DeviceDefault</item>
         <item name="android:borderlessButtonStyle">@*android:style/Widget.DeviceDefault.Button.Borderless.Colored</item>
         <item name="android:buttonBarButtonStyle">@*android:style/Widget.DeviceDefault.Button.ButtonBar.AlertDialog</item>
         <item name="android:buttonStyle">@*android:style/Widget.DeviceDefault.Button</item>
@@ -188,6 +189,10 @@
         <item name="android:textAppearanceListItem">@android:style/TextAppearance.DeviceDefault.Large</item>
         <item name="android:textAppearanceListItemSmall">@android:style/TextAppearance.DeviceDefault.Large</item>
         <item name="android:textAppearanceListItemSecondary">@android:style/TextAppearance.DeviceDefault.Small</item>
+
+        <!-- Icon sizes -->
+        <item name="*android:iconfactoryIconSize">@*android:dimen/resolver_icon_size</item>
+        <item name="*android:iconfactoryBadgeSize">@*android:dimen/resolver_badge_size</item>
     </style>