DO NOT MERGE - Merge Android 10 into master

Bug: 139893257
Change-Id: I97bbdae04e76ce32de0c25ed580b95ef2ec9a5ee
diff --git a/Android.bp b/Android.bp
index aaecc7d..73bbeb3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -22,7 +22,6 @@
     static_libs: [
         "android-common",
         "jsr305",
-        "androidx.car_car",
     ],
     // Include all the resources regardless of system supported locales
     aapt_include_all_resources: true,
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index dc3e435..24a5f4d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -24,7 +24,8 @@
             android:icon="@drawable/ic_launcher_keyboard"
             android:supportsRtl="true"
             android:allowBackup="true"
-            android:directBootAware="true">
+            android:directBootAware="true"
+            android:theme="@android:style/Theme.DeviceDefault.InputMethod">
 
         <!-- Services -->
         <service android:name="CarLatinIME"
diff --git a/res/layout/input_keyboard.xml b/res/layout/input_keyboard.xml
index 27121da..5a721b1 100644
--- a/res/layout/input_keyboard.xml
+++ b/res/layout/input_keyboard.xml
@@ -19,7 +19,7 @@
         xmlns:app="http://schemas.android.com/apk/res-auto"
         android:layout_height="wrap_content"
         android:layout_width="match_parent"
-        android:background="@color/ime_background_letters" >
+        android:background="?android:attr/colorBackground" >
     <FrameLayout
             android:id="@+id/keyboard_wrapper"
             android:layout_width="match_parent"
@@ -30,7 +30,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:focusable="true"
-                app:keyTextColorPrimary="@color/ime_foreground_numbers"
+                app:keyTextColorPrimary="?android:attr/textColorPrimary"
                 android:layout_gravity="center_horizontal"
                 style="@style/Keyboard" />
         <com.android.inputmethod.latin.car.KeyboardView
@@ -39,7 +39,7 @@
                 android:layout_height="wrap_content"
                 android:layout_marginTop="@dimen/keyboard_popup_offset"
                 android:visibility="gone"
-                app:keyTextColorPrimary="@color/ime_foreground_numbers"
+                app:keyTextColorPrimary="?android:attr/textColorPrimary"
                 android:layout_gravity="top|center"
                 style="@style/Keyboard" />
     </FrameLayout>
@@ -53,9 +53,9 @@
                 android:id="@+id/lockout_label"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:fontFamily="sans-serif-condensed"
+                android:fontFamily="sans-serif"
                 android:layout_gravity="center"
-                android:textColor="@color/ime_foreground_letters"
+                android:textColor="?android:attr/textColorPrimary"
                 android:textSize="@dimen/keyboard_lockout_text_size"
                 android:text="@string/park_to_use_keyboard" />
     </FrameLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 6555151..758e5eb 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <!-- IME -->
-    <color name="ime_foreground_letters">#fff1f1f1</color>
     <color name="ime_foreground_symbols">#99f1f1f1</color>
-    <color name="ime_foreground_spacebar">#4df1f1f1</color>
-    <color name="ime_foreground_spacebar_pressed">#74f1f1f1</color>
-    <color name="ime_background_letters">@color/car_dark_blue_grey_700</color>
+    <color name="ime_foreground_spacebar">@*android:color/car_keyboard_text_secondary_color</color>
+    <color name="ime_foreground_spacebar_pressed">@*android:color/car_keyboard_text_primary_color</color>
+    <color name="ime_background_letters">@*android:color/car_dark_blue_grey_700</color>
     <color name="ime_background_pressed">#26ffffff</color>
-    <color name="ime_foreground_numbers">@color/ime_foreground_letters</color>
-    <color name="ime_symbol_tint_accent">#ff80cbc4</color>
+    <color name="ime_symbol_tint_accent">@*android:color/accent_device_default_light</color>
     <color name="ime_symbol_tint">@color/ime_foreground_symbols</color>
     <color name="transparent_black">#00000000</color>
     <color name="ime_hwr_background">#e6172026</color>
     <color name="ime_hwr_stroke">#ff1de9b6</color>
-</resources>
\ No newline at end of file
+    <color name="car_teal_200">#ff80cbc4</color>
+    <color name="car_teal_700">#ff00796b</color>
+</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 43ab585..2f646a1 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -2,12 +2,12 @@
 <resources>
     <!-- IME -->
     <style name="Keyboard">
-        <item name="fontFamily">sans-serif-condensed</item>
+        <item name="fontFamily">sans-serif</item>
         <item name="textStyle">normal</item>
         <item name="keyTextSize">@dimen/keyboard_key_letter_height</item>
         <item name="labelTextSize">@dimen/keyboard_key_letter_height</item>
-        <item name="keyTextColorPrimary">@color/ime_foreground_letters</item>
-        <item name="keyTextColorSecondary">@color/ime_foreground_symbols</item>
+        <item name="keyTextColorPrimary">?android:attr/textColorPrimary</item>
+        <item name="keyTextColorSecondary">?android:attr/textColorSecondary</item>
         <item name="keyBackground">@drawable/keyboard_key_background</item>
     </style>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/src/com/android/inputmethod/latin/car/KeyboardView.java b/src/com/android/inputmethod/latin/car/KeyboardView.java
index 0888a9b..974b3af 100644
--- a/src/com/android/inputmethod/latin/car/KeyboardView.java
+++ b/src/com/android/inputmethod/latin/car/KeyboardView.java
@@ -385,7 +385,7 @@
         mAccessibilityManager =
             (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
 
-        int color = getResources().getColor(R.color.car_dark_blue_grey_700);
+        int color = getResources().getColor(R.color.ime_background_letters);
         mPopupScrimColor = Color.argb(
                 SCRIM_ALPHA, Color.red(color), Color.green(color), Color.blue(color));
         mBackgroundColor = Color.TRANSPARENT;