Fix background colors to point directly to theme attribute

BUG: 17520824
Change-Id: I77fcbc2a5535f4916053cf1668cbe2e432b2dc95
diff --git a/res/drawable/default_preference_background.xml b/res/drawable/default_preference_background.xml
index bea5d3d..7f7b560 100644
--- a/res/drawable/default_preference_background.xml
+++ b/res/drawable/default_preference_background.xml
@@ -15,15 +15,8 @@
 -->
 
 <inset xmlns:android="http://schemas.android.com/apk/res/android"
-        android:insetLeft="0dip"
-        android:insetTop="0dip"
-        android:insetRight="0dip"
-        android:insetBottom="0dip">
+    android:inset="0dip">
 
-    <shape android:shape="rectangle">
-
-        <solid android:color="@color/default_preference_background_color" />
-
-    </shape>
+    <color android:color="?android:attr/colorBackground" />
 
 </inset>
diff --git a/res/drawable/preference_background.xml b/res/drawable/preference_background.xml
index f47bcf5..7f7b560 100644
--- a/res/drawable/preference_background.xml
+++ b/res/drawable/preference_background.xml
@@ -15,13 +15,8 @@
 -->
 
 <inset xmlns:android="http://schemas.android.com/apk/res/android"
-        android:insetLeft="0dip"
-        android:insetTop="0dip"
-        android:insetRight="0dip"
-        android:insetBottom="0dip">
+    android:inset="0dip">
 
-    <shape android:shape="rectangle">
-        <solid android:color="@color/preference_background_color" />
-    </shape>
+    <color android:color="?android:attr/colorBackground" />
 
 </inset>
diff --git a/res/drawable/search_panel_list_background.xml b/res/drawable/search_panel_list_background.xml
index a31e322..7f7b560 100644
--- a/res/drawable/search_panel_list_background.xml
+++ b/res/drawable/search_panel_list_background.xml
@@ -15,15 +15,8 @@
 -->
 
 <inset xmlns:android="http://schemas.android.com/apk/res/android"
-        android:insetLeft="0dip"
-        android:insetTop="0dip"
-        android:insetRight="0dip"
-        android:insetBottom="0dip">
+    android:inset="0dip">
 
-    <shape android:shape="rectangle">
-
-        <solid android:color="@color/search_panel_list_background_color" />
-
-    </shape>
+    <color android:color="?android:attr/colorBackground" />
 
 </inset>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 1c299f5..246a13f 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -73,13 +73,6 @@
     <color name="switchbar_background_color">#ff37474f</color>
     <color name="switch_accent_color">#ff7fcac3</color>
 
-    <color name="default_preference_background_color">@*android:color/background_material_light</color>
-    <color name="preference_background_color">@color/default_preference_background_color</color>
-    <color name="search_panel_list_background_color">@color/default_preference_background_color</color>
-
-    <color name="setup_wizard_preference_background_color_dark">@*android:color/background_material_dark</color>
-    <color name="setup_wizard_preference_background_color_light">@*android:color/background_material_light</color>
-
     <color name="wifi_divider">#ffe0e0e0</color>
 
 </resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index e9d4297..b4fb388 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -42,7 +42,7 @@
         <item name="setup_divider_color">@color/setup_divider_color_dark</item>
         <item name="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>
         <item name="wifi_signal">@drawable/wifi_signal_teal</item>
-        <item name="preferenceBackgroundColor">@color/setup_wizard_preference_background_color_dark</item>
+        <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
     </style>
 
     <style name="SetupWizardWifiTheme.Light" parent="android:Theme.Material.Light.NoActionBar">
@@ -59,7 +59,7 @@
         <item name="setup_divider_color">@color/setup_divider_color_light</item>
         <item name="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>
         <item name="wifi_signal">@drawable/wifi_signal_teal</item>
-        <item name="preferenceBackgroundColor">@color/setup_wizard_preference_background_color_light</item>
+        <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
     </style>
 
     <style name="Theme.WifiDialog" parent="@*android:style/Theme.Material.Dialog.Alert">
@@ -145,6 +145,9 @@
     </style>
 
     <style name="Theme.DialogWhenLarge" parent="@android:style/Theme.Material.Light.DialogWhenLarge">
+        <!-- Explicitly override the background color. -->
+        <item name="android:colorBackground">@android:color/white</item>
+
         <!-- Used by the ActionBar -->
         <item name="android:colorPrimary">@color/theme_primary</item>
         <!-- Used by the StatusBar -->
@@ -179,6 +182,9 @@
     <style name="Theme.AlertDialog" parent="@*android:style/Theme.Material.Light.Dialog.Alert">
         <item name="android:windowSoftInputMode">adjustResize</item>
 
+        <!-- Explicitly override the background color. -->
+        <item name="android:colorBackground">@android:color/white</item>
+
         <!-- Used by the ActionBar -->
         <item name="android:colorPrimary">@color/theme_primary</item>
         <!-- Used by the StatusBar -->