Update button background

1. Update the background of primary and secondary button to support
rotary controller
2. Update the size of favorite list item

Bug: 161483726
Test: manual
Change-Id: Ibbd04926fda1d4d44cf2c0a9ee037858a7320baa
Merged-In: Ibbd04926fda1d4d44cf2c0a9ee037858a7320baa
diff --git a/res/drawable/dialer_ripple_background.xml b/res/drawable/dialer_ripple_background.xml
index e7086ee..a7a8a88 100644
--- a/res/drawable/dialer_ripple_background.xml
+++ b/res/drawable/dialer_ripple_background.xml
@@ -13,6 +13,28 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-        android:color="@*android:color/car_card_ripple_background">
-</ripple>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_focused="true" android:state_pressed="true">
+        <shape android:shape="oval">
+            <solid android:color="@color/car_ui_rotary_focus_pressed_fill_color"/>
+            <stroke android:width="@dimen/car_ui_rotary_focus_pressed_stroke_width"
+                    android:color="@color/car_ui_rotary_focus_pressed_stroke_color"/>
+        </shape>
+    </item>
+    <item android:state_focused="true">
+        <shape android:shape="oval">
+            <solid android:color="@color/car_ui_rotary_focus_fill_color"/>
+            <stroke android:width="@dimen/car_ui_rotary_focus_stroke_width"
+                    android:color="@color/car_ui_rotary_focus_stroke_color"/>
+        </shape>
+    </item>
+    <item>
+        <ripple android:color="@*android:color/car_card_ripple_background">
+            <item android:id="@android:id/mask">
+                <shape android:shape="oval">
+                    <solid android:color="@*android:color/white"/>
+                </shape>
+            </item>
+        </ripple>
+    </item>
+</selector>
diff --git a/res/drawable/icon_call_button.xml b/res/drawable/icon_call_button.xml
index 016f9c9..c569aec 100644
--- a/res/drawable/icon_call_button.xml
+++ b/res/drawable/icon_call_button.xml
@@ -26,8 +26,4 @@
         </shape>
     </item>
     <item android:drawable="@drawable/ic_phone" android:gravity="center"/>
-    <item>
-        <ripple android:color="@*android:color/car_card_ripple_background"
-                android:radius="@dimen/fab_ripple_radius"/>
-    </item>
 </layer-list>
\ No newline at end of file
diff --git a/res/layout/add_favorite_list_item.xml b/res/layout/add_favorite_list_item.xml
index 2150ea0..564d545 100644
--- a/res/layout/add_favorite_list_item.xml
+++ b/res/layout/add_favorite_list_item.xml
@@ -25,8 +25,7 @@
     android:singleLine="true"
     android:gravity="top|center_horizontal"
     android:background="?android:attr/selectableItemBackground"
-    android:paddingStart="0dp"
-    android:paddingEnd="0dp"
+    android:padding="@dimen/favorite_item_padding"
     android:drawableTop="@drawable/ic_add_favorite"
     android:drawablePadding="@dimen/favorites_avatar_margin_bottom"
     app:carUxRestrictions="UX_RESTRICTIONS_NO_SETUP"/>
diff --git a/res/layout/favorite_contact_list_item.xml b/res/layout/favorite_contact_list_item.xml
index 032a153..b8b24b3 100644
--- a/res/layout/favorite_contact_list_item.xml
+++ b/res/layout/favorite_contact_list_item.xml
@@ -19,6 +19,7 @@
     android:id="@+id/text_container"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:padding="@dimen/favorite_item_padding"
     android:background="?android:attr/selectableItemBackground">
 
     <ImageView
diff --git a/res/layout/on_going_call_controller_bar_fragment.xml b/res/layout/on_going_call_controller_bar_fragment.xml
index 8061b71..04356cd 100644
--- a/res/layout/on_going_call_controller_bar_fragment.xml
+++ b/res/layout/on_going_call_controller_bar_fragment.xml
@@ -56,6 +56,7 @@
         android:id="@+id/voice_channel_view"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:background="@drawable/dialer_ripple_background"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toEndOf="@+id/end_call_button"
         app:layout_constraintEnd_toStartOf="@+id/button_wrapper"
@@ -65,7 +66,6 @@
             android:id="@+id/voice_channel_button"
             android:layout_width="@dimen/in_call_button_size"
             android:layout_height="@dimen/in_call_button_size"
-            android:background="@drawable/dialer_ripple_background"
             android:scaleType="center"
             android:src="@drawable/ic_audio_route_vehicle_activatable"/>
 
diff --git a/res/layout/ongoing_call_fragment.xml b/res/layout/ongoing_call_fragment.xml
index 7981e79..168369f 100644
--- a/res/layout/ongoing_call_fragment.xml
+++ b/res/layout/ongoing_call_fragment.xml
@@ -76,6 +76,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginBottom="@dimen/in_call_controller_bar_margin_bottom"
+            app:defaultFocus="@+id/end_call_button"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent">
diff --git a/res/values-h610dp/dimens.xml b/res/values-h610dp/dimens.xml
index 7e70374..aaa10d9 100644
--- a/res/values-h610dp/dimens.xml
+++ b/res/values-h610dp/dimens.xml
@@ -18,7 +18,7 @@
 <resources>
     <!-- Keypad dimensions -->
     <dimen name="keypad_margin_x">@*android:dimen/car_padding_4</dimen>
-    <dimen name="keypad_margin_y">@*android:dimen/car_padding_2</dimen>
+    <dimen name="keypad_margin_y">@*android:dimen/car_padding_1</dimen>
     <dimen name="keypad_margin">@*android:dimen/car_padding_5</dimen>
 
     <!-- Control bar bottom padding -->
@@ -26,9 +26,12 @@
 
     <dimen name="type_down_list_item_height">@dimen/list_item_height</dimen>
 
+    <dimen name="fab_button_size">128dp</dimen>
     <dimen name="fab_outline_size">104dp</dimen>
     <dimen name="fab_ripple_radius">52dp</dimen>
 
+    <dimen name="in_call_button_size">128dp</dimen>
+
     <!-- Components -->
     <dimen name="control_bar_height">128dp</dimen>
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 2ab877c..694db85 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -96,6 +96,7 @@
     <dimen name="favorite_card_space_horizontal">@dimen/car_ui_padding_3</dimen>
     <dimen name="favorite_card_space_vertical">@dimen/car_ui_padding_2</dimen>
     <dimen name="favorites_avatar_margin_bottom">@dimen/car_ui_padding_3</dimen>
+    <dimen name="favorite_item_padding">@dimen/car_ui_padding_2</dimen>
 
     <dimen name="call_fab_elevation">8dp</dimen>
     <dimen name="bksp_button_width">@dimen/touch_target_size</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index b34518b..11a2df4 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -60,6 +60,7 @@
     <style name="DialpadPrimaryButton">
         <item name="android:layout_width">@dimen/fab_button_size</item>
         <item name="android:layout_height">@dimen/fab_button_size</item>
+        <item name="android:background">@drawable/dialer_ripple_background</item>
         <item name="android:elevation">@dimen/call_fab_elevation</item>
         <item name="android:scaleType">center</item>
     </style>