Fix themed settings icons.

- Added android prefix for homeAsUpIndicator attribute
- Override ic_arrow_down_24dp from androidx
- Remove ic_lock drawable overlay
- Update date and time icon
- Dedupe ic_menu_add and ic_add_24dp

Bug: 131346125
Test: mp settings;
Change-Id: I7223249f2adccc5569a37e8b68cae5499e7c7620
diff --git a/res/drawable/ic_arrow_down_24dp.xml b/res/drawable/ic_arrow_down_24dp.xml
new file mode 100644
index 0000000..8503511
--- /dev/null
+++ b/res/drawable/ic_arrow_down_24dp.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 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="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="?android:attr/colorControlNormal"
+        android:pathData="M12,16.41l-6.71,-6.7l1.42,-1.42l5.29,5.3l5.29,-5.3l1.42,1.42z"/>
+</vector>
diff --git a/res/drawable/ic_menu_add.xml b/res/drawable/ic_menu_add.xml
deleted file mode 100644
index 0313d62..0000000
--- a/res/drawable/ic_menu_add.xml
+++ /dev/null
@@ -1,28 +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.
--->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="24dp"
-    android:height="24dp"
-    android:viewportWidth="24.0"
-    android:viewportHeight="24.0"
-    android:tint="?android:attr/colorControlNormal">
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M18,13h-5v5c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-5H6c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h5V6c0-0.55,0.45-1,1-1h0
-c0.55,0,1,0.45,1,1v5h5c0.55,0,1,0.45,1,1v0C19,12.55,18.55,13,18,13z"/>
-</vector>
diff --git a/res/drawable/ic_menu_add_activated_tint.xml b/res/drawable/ic_menu_add_activated_tint.xml
index e5d1384..afe6e10 100644
--- a/res/drawable/ic_menu_add_activated_tint.xml
+++ b/res/drawable/ic_menu_add_activated_tint.xml
@@ -14,15 +14,7 @@
   ~ 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="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0"
-        android:tint="?android:attr/colorControlActivated">
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M18,13h-5v5c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-5H6c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h5V6c0-0.55,0.45-1,1-1h0
-c0.55,0,1,0.45,1,1v5h5c0.55,0,1,0.45,1,1v0C19,12.55,18.55,13,18,13z"/>
-</vector>
+<com.android.settings.widget.TintDrawable
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:drawable="@drawable/ic_add_24dp"
+    android:tint="?android:attr/colorControlActivated" />
\ No newline at end of file
diff --git a/res/drawable/ic_settings_date_time.xml b/res/drawable/ic_settings_date_time.xml
index 1d2f3d3..c6fbbf9 100644
--- a/res/drawable/ic_settings_date_time.xml
+++ b/res/drawable/ic_settings_date_time.xml
@@ -20,6 +20,9 @@
         android:viewportHeight="24.0"
         android:tint="?android:attr/colorControlNormal">
     <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM11.75,6.1c-0.5,0 -0.75,0.32 -0.75,0.72L11,13l4.64,2.78c0.34,0.2 0.78,0.1 0.98,-0.24a0.71,0.71 0,0 0,-0.25 -0.99l-3.87,-2.3L12.5,6.82c0,-0.4 -0.25,-0.72 -0.75,-0.72z"/>
+        android:fillColor="@android:color/white"
+        android:pathData="M11.99,2.0C6.47,2.0 2.0,6.48 2.0,12.0s4.47,10.0 9.99,10.0C17.52,22.0 22.0,17.52 22.0,12.0S17.52,2.0 11.99,2.0zM12.0,20.0c-4.42,0.0 -8.0,-3.58 -8.0,-8.0s3.58,-8.0 8.0,-8.0 8.0,3.58 8.0,8.0 -3.58,8.0 -8.0,8.0z"/>
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M12.5,7.0L11.0,7.0l0.0,6.0l5.25,3.1 0.75,-1.23 -4.5,-2.67z"/>
 </vector>
diff --git a/res/menu/vpn.xml b/res/menu/vpn.xml
index a3b8090..cb11cad 100644
--- a/res/menu/vpn.xml
+++ b/res/menu/vpn.xml
@@ -18,6 +18,6 @@
     <item
         android:id="@+id/vpn_create"
         android:title="@string/vpn_create"
-        android:icon="@drawable/ic_menu_add"
+        android:icon="@drawable/ic_add_24dp"
         android:showAsAction="always" />
 </menu>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 26d4aa8..951bb04 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -28,7 +28,7 @@
     <style name="Theme.Settings" parent="Theme.SettingsBase">
         <item name="preferenceTheme">@style/PreferenceTheme</item>
         <item name="android:listPreferredItemHeight">72dip</item>
-        <item name="homeAsUpIndicator">@drawable/ic_arrow_back</item>
+        <item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
 
         <item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
         <item name="face_layout_theme">@style/FaceLayoutTheme</item>
diff --git a/res/xml/bluetooth_screen.xml b/res/xml/bluetooth_screen.xml
index 5679cd4..42f71b3 100644
--- a/res/xml/bluetooth_screen.xml
+++ b/res/xml/bluetooth_screen.xml
@@ -28,7 +28,7 @@
     <com.android.settingslib.RestrictedPreference
         android:key="bluetooth_screen_add_bt_devices"
         android:title="@string/bluetooth_pairing_pref_title"
-        android:icon="@drawable/ic_menu_add"
+        android:icon="@drawable/ic_add_24dp"
         android:summary="@string/connected_device_add_device_summary"
         android:fragment="com.android.settings.bluetooth.BluetoothPairingDetail"
         settings:allowDividerAbove="true"
diff --git a/res/xml/connected_devices.xml b/res/xml/connected_devices.xml
index ae88d36..7acdc79 100644
--- a/res/xml/connected_devices.xml
+++ b/res/xml/connected_devices.xml
@@ -39,7 +39,7 @@
     <com.android.settingslib.RestrictedPreference
         android:key="add_bt_devices"
         android:title="@string/bluetooth_pairing_pref_title"
-        android:icon="@drawable/ic_menu_add"
+        android:icon="@drawable/ic_add_24dp"
         android:summary="@string/connected_device_add_device_summary"
         android:fragment="com.android.settings.bluetooth.BluetoothPairingDetail"
         settings:allowDividerAbove="true"
diff --git a/res/xml/user_settings.xml b/res/xml/user_settings.xml
index b01e1f3..269aa3a 100644
--- a/res/xml/user_settings.xml
+++ b/res/xml/user_settings.xml
@@ -30,7 +30,7 @@
     <com.android.settingslib.RestrictedPreference
         android:key="user_add"
         android:title="@string/user_add_user_or_profile_menu"
-        android:icon="@drawable/ic_menu_add"
+        android:icon="@drawable/ic_add_24dp"
         android:order="20"/>
 
     <com.android.settingslib.RestrictedSwitchPreference
diff --git a/res/xml/zen_mode_automation_settings.xml b/res/xml/zen_mode_automation_settings.xml
index dade454..467331d 100644
--- a/res/xml/zen_mode_automation_settings.xml
+++ b/res/xml/zen_mode_automation_settings.xml
@@ -27,7 +27,7 @@
 
     <Preference
         android:key="zen_mode_add_automatic_rule"
-        android:icon="@drawable/ic_menu_add"
+        android:icon="@drawable/ic_add_24dp"
         android:title="@string/zen_mode_add_rule"/>
 
 </PreferenceScreen>
diff --git a/src/com/android/settings/accounts/AccountPreferenceController.java b/src/com/android/settings/accounts/AccountPreferenceController.java
index 7130435..1309cc2 100644
--- a/src/com/android/settings/accounts/AccountPreferenceController.java
+++ b/src/com/android/settings/accounts/AccountPreferenceController.java
@@ -351,7 +351,7 @@
         RestrictedPreference preference =
             new RestrictedPreference(mParent.getPreferenceManager().getContext());
         preference.setTitle(R.string.add_account_label);
-        preference.setIcon(R.drawable.ic_menu_add);
+        preference.setIcon(R.drawable.ic_add_24dp);
         preference.setOnPreferenceClickListener(this);
         preference.setOrder(ORDER_NEXT_TO_NEXT_TO_LAST);
         return preference;
diff --git a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
index 49659ad..f1e7ac0 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
@@ -178,7 +178,7 @@
                     return true;
                 });
         preference.setTitle(R.string.print_menu_item_add_service);
-        preference.setIcon(R.drawable.ic_menu_add);
+        preference.setIcon(R.drawable.ic_add_24dp);
         preference.setOrder(Integer.MAX_VALUE -1);
         preference.setPersistent(false);
         return preference;
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java b/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
index 9a07821..ad0ae6f 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
@@ -396,7 +396,7 @@
             Preference addPreference = new Preference(root.getContext());
             addPreference.setKey(KEY_FINGERPRINT_ADD);
             addPreference.setTitle(R.string.fingerprint_add_title);
-            addPreference.setIcon(R.drawable.ic_menu_add);
+            addPreference.setIcon(R.drawable.ic_add_24dp);
             root.addPreference(addPreference);
             addPreference.setOnPreferenceChangeListener(this);
             updateAddPreference();
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingPreferenceController.java b/src/com/android/settings/bluetooth/BluetoothPairingPreferenceController.java
index 514c70f..c835586 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingPreferenceController.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingPreferenceController.java
@@ -76,7 +76,7 @@
     public Preference createBluetoothPairingPreference(int order) {
         mPreference = new Preference(mFragment.getPreferenceScreen().getContext());
         mPreference.setKey(KEY_PAIRING);
-        mPreference.setIcon(R.drawable.ic_menu_add);
+        mPreference.setIcon(R.drawable.ic_add_24dp);
         mPreference.setOrder(order);
         mPreference.setTitle(R.string.bluetooth_pairing_pref_title);
 
diff --git a/src/com/android/settings/inputmethod/UserDictionarySettings.java b/src/com/android/settings/inputmethod/UserDictionarySettings.java
index c8fb625..67420a2 100644
--- a/src/com/android/settings/inputmethod/UserDictionarySettings.java
+++ b/src/com/android/settings/inputmethod/UserDictionarySettings.java
@@ -154,7 +154,7 @@
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
         MenuItem actionItem =
                 menu.add(0, OPTIONS_MENU_ADD, 0, R.string.user_dict_settings_add_menu_title)
-                        .setIcon(R.drawable.ic_menu_add);
+                        .setIcon(R.drawable.ic_add_24dp);
         actionItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM |
                 MenuItem.SHOW_AS_ACTION_WITH_TEXT);
     }
diff --git a/src/com/android/settings/network/ApnSettings.java b/src/com/android/settings/network/ApnSettings.java
index c397600..f0603bb 100755
--- a/src/com/android/settings/network/ApnSettings.java
+++ b/src/com/android/settings/network/ApnSettings.java
@@ -351,7 +351,7 @@
             if (mAllowAddingApns) {
                 menu.add(0, MENU_NEW, 0,
                         getResources().getString(R.string.menu_new))
-                        .setIcon(R.drawable.ic_menu_add)
+                        .setIcon(R.drawable.ic_add_24dp)
                         .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
             }
             menu.add(0, MENU_RESTORE, 0,
diff --git a/src/com/android/settings/print/PrintSettingsFragment.java b/src/com/android/settings/print/PrintSettingsFragment.java
index 955d4f7..09a0a27 100644
--- a/src/com/android/settings/print/PrintSettingsFragment.java
+++ b/src/com/android/settings/print/PrintSettingsFragment.java
@@ -242,7 +242,7 @@
         }
         Preference preference = new Preference(getPrefContext());
         preference.setTitle(R.string.print_menu_item_add_service);
-        preference.setIcon(R.drawable.ic_menu_add);
+        preference.setIcon(R.drawable.ic_add_24dp);
         preference.setOrder(ORDER_LAST);
         preference.setIntent(addNewServiceIntent);
         preference.setPersistent(false);
diff --git a/src/com/android/settings/wifi/AddWifiNetworkPreference.java b/src/com/android/settings/wifi/AddWifiNetworkPreference.java
index 03a80a4..8216f86 100644
--- a/src/com/android/settings/wifi/AddWifiNetworkPreference.java
+++ b/src/com/android/settings/wifi/AddWifiNetworkPreference.java
@@ -43,7 +43,7 @@
 
         setLayoutResource(com.android.settingslib.R.layout.preference_access_point);
         setWidgetLayoutResource(R.layout.wifi_button_preference_widget);
-        setIcon(R.drawable.ic_menu_add);
+        setIcon(R.drawable.ic_add_24dp);
         setTitle(R.string.wifi_add_network);
 
         mScanIconDrawable = getDrawable(R.drawable.ic_scan_24dp);
diff --git a/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java b/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java
index 2bf411a..fa2dc99 100644
--- a/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java
+++ b/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java
@@ -148,7 +148,7 @@
         mFakeNetworkPreference.setTitle("fake network");
 
         mAddPreference = new Preference(getPrefContext());
-        mAddPreference.setIcon(R.drawable.ic_menu_add);
+        mAddPreference.setIcon(R.drawable.ic_add_24dp);
         mAddPreference.setTitle(R.string.wifi_add_network);
 
         mUserBadgeCache = new AccessPointPreference.UserBadgeCache(getPackageManager());
diff --git a/tests/robotests/res/values/overlayable_icons_test.xml b/tests/robotests/res/values/overlayable_icons_test.xml
index 575f798..bf87f3b 100644
--- a/tests/robotests/res/values/overlayable_icons_test.xml
+++ b/tests/robotests/res/values/overlayable_icons_test.xml
@@ -24,6 +24,7 @@
     <item>@drawable/ic_android</item>
     <item>@drawable/ic_apps</item>
     <item>@drawable/ic_arrow_back</item>
+    <item>@drawable/ic_arrow_down_24dp</item>
     <item>@drawable/ic_battery_charging_full</item>
     <item>@drawable/ic_battery_saver_accent_24dp</item>
     <item>@drawable/ic_battery_status_bad_24dp</item>
@@ -33,6 +34,7 @@
     <item>@drawable/ic_cancel</item>
     <item>@drawable/ic_cast_24dp</item>
     <item>@drawable/ic_cellular_off</item>
+    <item>@drawable/ic_chevron_right_24dp</item>
     <item>@drawable/ic_content_copy_grey600_24dp</item>
     <item>@drawable/ic_data_saver</item>
     <item>@drawable/ic_delete</item>
@@ -48,10 +50,11 @@
     <item>@drawable/ic_gray_scale_24dp</item>
     <item>@drawable/ic_headset_24dp</item>
     <item>@drawable/ic_help</item>
+    <item>@drawable/ic_help_actionbar</item>
     <item>@drawable/ic_homepage_search</item>
+    <item>@drawable/ic_info_outline_24</item>
     <item>@drawable/ic_local_movies</item>
     <item>@drawable/ic_local_phone_24_lib</item>
-    <item>@drawable/ic_lock</item>
     <item>@drawable/ic_media_stream</item>
     <item>@drawable/ic_media_stream_off</item>
     <item>@drawable/ic_network_cell</item>
@@ -59,8 +62,11 @@
     <item>@drawable/ic_notifications_off_24dp</item>
     <item>@drawable/ic_phone_info</item>
     <item>@drawable/ic_photo_library</item>
+    <item>@drawable/ic_search_24dp</item>
+    <item>@drawable/ic_settings_accent</item>
     <item>@drawable/ic_settings_accessibility</item>
     <item>@drawable/ic_settings_accounts</item>
+    <item>@drawable/ic_settings_backup</item>
     <item>@drawable/ic_settings_battery_white</item>
     <item>@drawable/ic_settings_data_usage</item>
     <item>@drawable/ic_settings_date_time</item>
@@ -77,12 +83,14 @@
     <item>@drawable/ic_settings_system_dashboard_white</item>
     <item>@drawable/ic_settings_wireless</item>
     <item>@drawable/ic_settings_wireless_white</item>
+    <item>@drawable/ic_storage</item>
     <item>@drawable/ic_storage_white</item>
     <item>@drawable/ic_suggestion_night_display</item>
+    <item>@drawable/ic_sync</item>
+    <item>@drawable/ic_system_update</item>
     <item>@drawable/ic_videogame_vd_theme_24</item>
     <item>@drawable/ic_volume_ringer_vibrate</item>
     <item>@drawable/ic_volume_up_24dp</item>
     <item>@drawable/ic_vpn_key</item>
-    <item>@drawable/ic_wifi_tethering</item>
   </array>
 </resources>
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingPreferenceControllerTest.java
index dfad37a..36f01e0 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingPreferenceControllerTest.java
@@ -73,7 +73,7 @@
         Preference pref = mController.createBluetoothPairingPreference(ORDER);
 
         assertThat(pref.getKey()).isEqualTo(BluetoothPairingPreferenceController.KEY_PAIRING);
-        DrawableTestHelper.assertDrawableResId(pref.getIcon(), R.drawable.ic_menu_add);
+        DrawableTestHelper.assertDrawableResId(pref.getIcon(), R.drawable.ic_add_24dp);
         assertThat(pref.getOrder()).isEqualTo(ORDER);
         assertThat(pref.getTitle())
                 .isEqualTo(mContext.getString(R.string.bluetooth_pairing_pref_title));