Keyguard update Cancel button style

Change-Id: If961e3f2a8061ae1c0df0a4fee7ee0bc6556d1a7
Fixes: 79169588
Test: In head unit
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_backspace.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_backspace.xml
new file mode 100644
index 0000000..f3a2f0f
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_backspace.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2018, 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="36dp"
+        android:height="36dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59L17.59,17L14,13.41L10.41,17L9,15.59zM21,6H8l-4.5,6L8,18h13V6M21,4c1.1,0 2,0.9 2,2v12c0,1.1 -0.9,2 -2,2H8c-0.63,0 -1.22,-0.3 -1.6,-0.8L1,12l5.4,-7.2C6.78,4.3 7.37,4 8,4H21L21,4z"/>
+</vector>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_done_wht.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_done.xml
similarity index 61%
rename from car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_done_wht.xml
rename to car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_done.xml
index 9e265d4..ef0aac2 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_done_wht.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/ic_done.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  Copyright 2017, The Android Open Source Project
+  Copyright 2018, 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.
@@ -14,15 +14,13 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="64dp"
-    android:height="64dp"
-    android:viewportWidth="48"
-    android:viewportHeight="48">
 
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="36dp"
+        android:height="36dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
     <path
-        android:pathData="M0 0h48v48H0z" />
-    <path
-        android:fillColor="#ffffff"
-        android:pathData="M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z" />
+        android:fillColor="#FF000000"
+        android:pathData="M9,16.2l-3.5,-3.5a0.984,0.984 0,0 0,-1.4 0,0.984 0.984,0 0,0 0,1.4l4.19,4.19c0.39,0.39 1.02,0.39 1.41,0L20.3,7.7a0.984,0.984 0,0 0,0 -1.4,0.984 0.984,0 0,0 -1.4,0L9,16.2z"/>
 </vector>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/keyguard_button_background.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/keyguard_button_background.xml
new file mode 100644
index 0000000..b428931
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/drawable/keyguard_button_background.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2018, 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true">
+        <shape android:shape="rectangle">
+            <corners android:radius="@dimen/car_button_radius"/>
+            <solid android:color="#131315"/>
+        </shape>
+    </item>
+    <item>
+        <shape android:shape="rectangle">
+            <corners android:radius="@dimen/car_button_radius"/>
+            <solid android:color="@color/button_background"/>
+        </shape>
+    </item>
+</selector>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout-land/keyguard_pin_view.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout-land/keyguard_pin_view.xml
index 730c21f..0bca46b 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout-land/keyguard_pin_view.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout-land/keyguard_pin_view.xml
@@ -89,7 +89,7 @@
                 android:id="@+id/delete_button"
                 style="@style/NumPadKeyButton"
                 android:gravity="center_vertical"
-                android:src="@drawable/ic_backspace_black_24dp"
+                android:src="@drawable/ic_backspace"
                 android:clickable="true"
                 android:tint="@android:color/white"
                 android:background="@drawable/ripple_drawable"
@@ -101,7 +101,8 @@
             <ImageButton
                 android:id="@+id/key_enter"
                 style="@style/NumPadKeyButton"
-                android:src="@drawable/ic_done_wht"
+                android:src="@drawable/ic_done"
+                android:tint="@android:color/white"
                 android:background="@drawable/ripple_drawable"
                 android:contentDescription="@string/keyboardview_keycode_enter" />
         </GridLayout>
@@ -130,21 +131,23 @@
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_margin="@dimen/num_pad_key_margin"
+                android:layout_margin="@dimen/car_padding_2"
                 android:gravity="center"
                 android:textColor="@android:color/white"
-                android:textSize="@dimen/keyguard_pin_prompt_text_size"
+                android:textSize="@dimen/car_body1_size"
                 android:text="@string/keyguard_enter_your_pin" />
 
             <include layout="@layout/keyguard_message_area"
                  android:layout_width="wrap_content"
-                 android:layout_height="wrap_content"/>
+                 android:layout_height="wrap_content"
+                 android:layout_marginBottom="@dimen/car_padding_4"/>
 
             <Button
                 android:id="@+id/cancel_button"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
+                style="@style/KeyguardButton"
                 android:text="@string/cancel"/>
         </LinearLayout>
     </FrameLayout>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
index 1c82bf1..cab52e8 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
@@ -38,7 +38,7 @@
         layout="@layout/keyguard_message_area"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="12dp"/>
+        android:layout_marginBottom="@dimen/car_padding_2"/>
 
     <!-- Password entry field -->
     <LinearLayout
@@ -56,7 +56,7 @@
             android:singleLine="true"
             android:textStyle="normal"
             android:inputType="textPassword"
-            android:textSize="@dimen/keyguard_pin_prompt_text_size"
+            android:textSize="@dimen/car_body1_size"
             android:textColor="?attr/wallpaperTextColor"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:imeOptions="flagForceAscii|actionDone"
@@ -66,10 +66,10 @@
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_margin="@dimen/num_pad_key_margin"
+            android:layout_margin="@dimen/car_padding_2"
             android:gravity="center"
             android:textColor="@android:color/white"
-            android:textSize="@dimen/keyguard_pin_prompt_text_size"
+            android:textSize="@dimen/car_body1_size"
             android:text="@string/keyguard_enter_your_password" />
 
         <Button
@@ -77,7 +77,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:textColor="@color/keyguard_button_text_color"
+            style="@style/KeyguardButton"
             android:text="@string/cancel"/>
 
         <ImageView android:id="@+id/switch_ime_button"
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
index d664ada..de879e0 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
@@ -46,10 +46,10 @@
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_margin="@dimen/num_pad_key_margin"
+                android:layout_margin="@dimen/car_padding_2"
                 android:gravity="center"
                 android:textColor="@android:color/white"
-                android:textSize="@dimen/keyguard_pin_prompt_text_size"
+                android:textSize="@dimen/car_body1_size"
                 android:text="@string/keyguard_enter_your_pattern" />
 
             <include layout="@layout/keyguard_message_area"
@@ -69,6 +69,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
+                style="@style/KeyguardButton"
                 android:text="@string/cancel"/>
 
           <include layout="@layout/keyguard_eca"
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
index 4b32148..657595b 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
@@ -59,10 +59,10 @@
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_margin="@dimen/num_pad_key_margin"
+                android:layout_margin="@dimen/car_padding_2"
                 android:gravity="center"
                 android:textColor="@android:color/white"
-                android:textSize="@dimen/keyguard_pin_prompt_text_size"
+                android:textSize="@dimen/car_body1_size"
                 android:text="@string/keyguard_enter_your_pin" />
 
             <include
@@ -125,7 +125,7 @@
                 android:id="@+id/delete_button"
                 style="@style/NumPadKeyButton"
                 android:gravity="center_vertical"
-                android:src="@drawable/ic_backspace_black_24dp"
+                android:src="@drawable/ic_backspace"
                 android:clickable="true"
                 android:tint="@android:color/white"
                 android:background="@drawable/ripple_drawable"
@@ -137,7 +137,8 @@
             <ImageButton
                 android:id="@+id/key_enter"
                 style="@style/NumPadKeyButton"
-                android:src="@drawable/ic_done_wht"
+                android:src="@drawable/ic_done"
+                android:tint="@android:color/white"
                 android:background="@drawable/ripple_drawable"
                 android:contentDescription="@string/keyboardview_keycode_enter" />
         </GridLayout>
@@ -147,6 +148,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
+            style="@style/KeyguardButton"
             android:text="@string/cancel"/>
 
     </LinearLayout>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/colors.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/colors.xml
new file mode 100644
index 0000000..a75dd88
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/colors.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2018, 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.
+-->
+
+<resources>
+    <color name="button_background">@color/car_dark_blue_grey_600</color>
+    <color name="button_text">@color/car_action1_dark</color>
+</resources>
\ No newline at end of file
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/dimens.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/dimens.xml
index 14919ca..ea9f5bd 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -20,7 +20,6 @@
     <dimen name="num_pad_key_width">120dp</dimen>
     <dimen name="num_pad_key_height">80dp</dimen>
     <dimen name="num_pad_key_margin">12dp</dimen>
-    <dimen name="keyguard_pin_prompt_text_size">24sp</dimen>
     <dimen name="pin_entry_height">@dimen/num_pad_key_height</dimen>
     <dimen name="divider_height">1dp</dimen>
     <dimen name="key_enter_margin_top">128dp</dimen>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/integers.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/integers.xml
index 9137313..bad1346 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/integers.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/integers.xml
@@ -15,6 +15,6 @@
   limitations under the License.
 -->
 <resources>
-    <integer name="password_text_view_scale">72</integer>
+    <integer name="password_text_view_scale">40</integer>
     <integer name="password_max_length">500</integer>
 </resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/styles.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/styles.xml
index f5c6ece..e26c515 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/styles.xml
@@ -26,6 +26,12 @@
         <item name="textView">@id/pinEntry</item>
     </style>
 
+    <style name="KeyguardButton" parent="Widget.Car.Button">
+        <item name="android:background">@drawable/keyguard_button_background</item>
+        <item name="android:textColor">@color/button_text</item>
+        <item name="android:textAllCaps">false</item>
+    </style>
+
     <style name="Widget.TextView.NumPadKey" parent="@android:style/Widget.TextView">
         <!-- Only replaces the text size. -->
         <item name="android:textSize">@dimen/car_body1_size</item>