LineageParts: Sync preference theme with AOSP Settings

Change-Id: Ieaabfeaccd97ec9e019a0cd4ff8d6819be9be743
diff --git a/res/layout/preference_dropdown_material_settings.xml b/res/layout/preference_dropdown_material_settings.xml
deleted file mode 100644
index 3912188..0000000
--- a/res/layout/preference_dropdown_material_settings.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2016 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.
-  -->
-
-
-<!-- Based off frameworks/base/core/res/res/layout/preference_dropdown_material.xml
-     except that icon space in this layout is always reserved -->
-<FrameLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content">
-
-    <Spinner
-        android:id="@+id/spinner"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/preference_no_icon_padding_start"
-        android:visibility="invisible" />
-
-    <include layout="@layout/preference_material_settings"/>
-
-</FrameLayout>
diff --git a/res/layout/preference_material_settings.xml b/res/layout/preference_material_settings.xml
deleted file mode 100644
index 9682e32..0000000
--- a/res/layout/preference_material_settings.xml
+++ /dev/null
@@ -1,86 +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.
--->
-
-<!-- Based off frameworks/base/core/res/res/layout/preference_material.xml
-     except that this has the negative margin on the image removed. -->
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeightSmall"
-    android:gravity="center_vertical"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:background="?android:attr/selectableItemBackground"
-    android:clipToPadding="false">
-
-    <LinearLayout
-        android:id="@+id/icon_container"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:minWidth="56dp"
-        android:gravity="start|center_vertical"
-        android:orientation="horizontal"
-        android:paddingEnd="12dp"
-        android:paddingTop="4dp"
-        android:paddingBottom="4dp">
-        <com.android.internal.widget.PreferenceImageView
-            android:id="@android:id/icon"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:maxWidth="48dp"
-            android:maxHeight="48dp"/>
-    </LinearLayout>
-
-    <RelativeLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:paddingTop="12dp"
-        android:paddingBottom="12dp">
-
-        <TextView
-            android:id="@android:id/title"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:minHeight="24dp"
-            android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceListItem"
-            android:ellipsize="marquee"/>
-
-        <TextView
-            android:id="@android:id/summary"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:minHeight="24dp"
-            android:layout_below="@android:id/title"
-            android:layout_alignStart="@android:id/title"
-            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
-            android:textColor="?android:attr/textColorSecondary"
-            android:maxLines="10"/>
-
-    </RelativeLayout>
-
-    <!-- Preference should place its actual preference widget here. -->
-    <LinearLayout
-        android:id="@android:id/widget_frame"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:gravity="end|center_vertical"
-        android:paddingStart="16dp"
-        android:orientation="vertical"/>
-
-</LinearLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f2bd2e4..82764fe 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -37,16 +37,6 @@
     <style name="DialogPreferenceStyle" parent="@*android:style/Preference.DeviceDefault.DialogPreference">
         <item name="allowDividerAbove">false</item>
         <item name="allowDividerBelow">true</item>
-        <item name="singleLineTitle">false</item>
-        <item name="android:iconSpaceReserved">true</item>
-    </style>
-
-    <style name="DropdownPreferenceStyle" parent="@style/PreferenceStyle">
-        <item name="android:layout">@layout/preference_dropdown_material_settings</item>
-    </style>
-
-    <style name="EditTextPreference" parent="@*android:style/Preference.Material.DialogPreference.EditTextPreference">
-        <item name="android:dialogLayout">@layout/preference_dialog_edittext</item>
     </style>
 
     <style name="PreferenceFragmentStyle" parent="@*android:style/PreferenceFragment.Material">
@@ -54,17 +44,14 @@
         <item name="android:layout">@layout/preference_list_fragment</item>
     </style>
 
-    <style name="PreferenceStyle" parent="@*android:style/Preference.DeviceDefault">
+    <style name="PreferenceScreenStyle" parent="@*android:style/Preference.DeviceDefault.PreferenceScreen">
         <item name="allowDividerAbove">false</item>
         <item name="allowDividerBelow">true</item>
-        <item name="singleLineTitle">false</item>
-        <item name="android:layout">@layout/preference_material_settings</item>
     </style>
 
-    <style name="PreferenceTheme" parent="@style/PreferenceThemeOverlay.SettingsBase">
-        <item name="preferenceCategoryTitleTextAppearance">@style/TextAppearance.CategoryTitle
-        </item>
-        <item name="preferenceCategoryTitleTextColor">?android:attr/textColorSecondary</item>
+    <style name="PreferenceTheme" parent="@style/PreferenceTheme.SettingsLib">
+        <item name="dialogPreferenceStyle">@style/DialogPreferenceStyle</item>
+        <item name="preferenceScreenStyle">@style/PreferenceScreenStyle</item>
     </style>
 
     <style name="PreferenceHeaderPanelSinglePane">
@@ -102,14 +89,6 @@
         <item name="android:scrollbarStyle">outsideOverlay</item>
     </style>
 
-    <style name="CheckBoxPreferenceStyle" parent="@style/PreferenceStyle">
-        <item name="widgetLayout">@*android:layout/preference_widget_checkbox</item>
-    </style>
-
-    <style name="SwitchPreferenceStyle" parent="@style/PreferenceStyle">
-        <item name="widgetLayout">@*android:layout/preference_widget_switch</item>
-    </style>
-
     <style name="TextAppearance.PagerTabs" parent="@android:style/TextAppearance.Material.Widget.TabWidget" />
 
     <style name="TextAppearance.Medium" parent="@android:style/TextAppearance.Material.Medium" />
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 3a37ef0..660b161 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -25,16 +25,9 @@
     <style name="Theme.SettingsBase" parent="@android:style/Theme.DeviceDefault.Settings" />
 
     <style name="Theme.Settings" parent="Theme.SettingsBase">
-        <item name="dialogPreferenceStyle">@style/DialogPreferenceStyle</item>
-        <item name="dropdownPreferenceStyle">@style/DropdownPreferenceStyle</item>
-        <item name="editTextPreferenceStyle">@style/EditTextPreference</item>
         <item name="preferenceFragmentStyle">@style/PreferenceFragmentStyle</item>
         <item name="preferenceFragmentListStyle">@style/PreferenceFragmentListSinglePane</item>
-        <item name="preferenceScreenStyle">@style/PreferenceStyle</item>
-        <item name="preferenceStyle">@style/PreferenceStyle</item>
         <item name="preferenceTheme">@style/PreferenceTheme</item>
-        <item name="checkBoxPreferenceStyle">@style/CheckBoxPreferenceStyle</item>
-        <item name="switchPreferenceStyle">@style/SwitchPreferenceStyle</item>
 
         <item name="wifi_signal_color">?android:attr/colorAccent</item>
         <item name="side_margin">@dimen/settings_side_margin</item>