Merge "Refactor Work sounds in SoundSettings."
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 3c35428..87b6372 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -276,21 +276,6 @@
                 android:value="true" />
         </activity>
 
-        <activity android:name=".wifi.WifiSetupActivity"
-                android:taskAffinity="com.android.wizard"
-                android:theme="@style/SetupWizardDisableAppStartingTheme"
-                android:label="@string/wifi_setup_wizard_title"
-                android:icon="@drawable/empty_icon"
-                android:clearTaskOnLaunch="true"
-                android:windowSoftInputMode="adjustNothing">
-            <intent-filter android:priority="1">
-                <action android:name="com.android.net.wifi.SETUP_WIFI_NETWORK" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
-                android:value="true" />
-        </activity>
-
         <activity android:name="Settings$AdvancedWifiSettingsActivity"
                 android:taskAffinity="com.android.settings"
                 android:label="@string/wifi_advanced_settings_label"
@@ -2565,16 +2550,6 @@
             </intent-filter>
         </activity>
 
-        <activity android:name=".ActiveNetworkScorerDialog"
-                  android:label="@string/wifi_assistant_title"
-                  android:excludeFromRecents="true"
-                  android:theme="@android:style/Theme.DeviceDefault.Light.Dialog.Alert">
-            <intent-filter android:priority="1">
-                <action android:name="android.net.scoring.CHANGE_ACTIVE" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
         <activity android:name="Settings$NotificationAccessSettingsActivity"
                   android:label="@string/manage_notification_access_title"
                   android:taskAffinity="">
@@ -3083,10 +3058,22 @@
                        android:value="com.android.settings.datausage.DataUsageSummary"/>
         </activity-alias>
 
+        <activity android:name=".Settings$ConnectedDeviceDashboardActivity"
+                  android:label="@string/connected_devices_dashboard_title"
+                  android:icon="@drawable/ic_bt_laptop">
+            <intent-filter android:priority="10">
+                <action android:name="com.android.settings.action.SETTINGS"/>
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                       android:value="com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment"/>
+            <meta-data android:name="com.android.settings.category"
+                       android:value="com.android.settings.category.ia.homepage"/>
+        </activity>
+
         <activity android:name=".Settings$AppAndNotificationDashboardActivity"
                   android:label="@string/app_and_notification_dashboard_title"
                   android:icon="@drawable/ic_settings_applications">
-            <intent-filter android:priority="8">
+            <intent-filter android:priority="9">
                 <action android:name="com.android.settings.action.SETTINGS"/>
             </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
@@ -3097,7 +3084,7 @@
 
         <activity-alias android:name="BatteryDashboardAlias"
                         android:targetActivity="Settings$PowerUsageSummaryActivity">
-            <intent-filter android:priority="7">
+            <intent-filter android:priority="8">
                 <action android:name="com.android.settings.action.SETTINGS"/>
             </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
@@ -3108,7 +3095,7 @@
 
         <activity-alias android:name="DisplayDashboardAlias"
                         android:targetActivity="Settings$DisplaySettingsActivity">
-            <intent-filter android:priority="6">
+            <intent-filter android:priority="7">
                 <action android:name="com.android.settings.action.SETTINGS" />
             </intent-filter>
             <meta-data android:name="com.android.settings.category"
@@ -3121,7 +3108,7 @@
 
         <activity-alias android:name="SoundDashboardAlias"
                         android:targetActivity="Settings$SoundSettingsActivity">
-            <intent-filter android:priority="5">
+            <intent-filter android:priority="6">
                 <action android:name="com.android.settings.action.SETTINGS" />
             </intent-filter>
             <meta-data android:name="com.android.settings.category"
@@ -3135,7 +3122,7 @@
         <activity android:name=".Settings$StorageDashboardActivity"
                   android:label="@string/storage_settings"
                   android:icon="@drawable/ic_settings_storage">
-            <intent-filter android:priority="4">
+            <intent-filter android:priority="5">
                 <action android:name="com.android.settings.action.SETTINGS" />
             </intent-filter>
             <meta-data android:name="com.android.settings.category"
@@ -3162,7 +3149,7 @@
 
         <activity-alias android:name="SecurityDashboardAlias"
                 android:targetActivity="Settings$SecuritySettingsActivity">
-            <intent-filter android:priority="3">
+            <intent-filter android:priority="4">
                 <action android:name="com.android.settings.action.SETTINGS" />
             </intent-filter>
             <meta-data android:name="com.android.settings.category"
@@ -3173,6 +3160,18 @@
                        android:value="true" />
         </activity-alias>
 
+        <activity android:name=".Settings$UserAndAccountDashboardActivity"
+                  android:label="@string/account_dashboard_title"
+                  android:icon="@drawable/ic_settings_accounts">
+            <intent-filter android:priority="3">
+                <action android:name="com.android.settings.action.SETTINGS"/>
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                       android:value="com.android.settings.accounts.UserAndAccountDashboardFragment"/>
+            <meta-data android:name="com.android.settings.category"
+                       android:value="com.android.settings.category.ia.homepage"/>
+        </activity>
+
         <activity-alias android:name="LocationDashboardAlias"
                         android:targetActivity="Settings$LocationSettingsActivity">
             <intent-filter>
@@ -3186,6 +3185,19 @@
                        android:value="true" />
         </activity-alias>
 
+        <activity-alias android:name="AccessibilityDashboardAlias"
+                        android:targetActivity="Settings$AccessibilitySettingsActivity">
+            <intent-filter android:priority="2">
+                <action android:name="com.android.settings.action.SETTINGS" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.category"
+                       android:value="com.android.settings.category.ia.homepage" />
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                       android:value="com.android.settings.accessibility.AccessibilitySettings" />
+            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+                       android:value="true" />
+        </activity-alias>
+
         <activity android:name=".Settings$SystemDashboardActivity"
                   android:label="@string/header_category_system"
                   android:icon="@drawable/ic_settings_about">
@@ -3257,19 +3269,6 @@
                        android:value="true" />
         </activity-alias>
 
-        <activity-alias android:name="AccessibilityDashboardAlias"
-                    android:targetActivity="Settings$AccessibilitySettingsActivity">
-            <intent-filter android:priority="150">
-                <action android:name="com.android.settings.action.SETTINGS" />
-            </intent-filter>
-            <meta-data android:name="com.android.settings.category"
-                       android:value="com.android.settings.category.ia.system" />
-            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                       android:value="com.android.settings.accessibility.AccessibilitySettings" />
-            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
-                       android:value="true" />
-        </activity-alias>
-
         <activity-alias android:name="PrivacyDashboardAlias"
             android:targetActivity="Settings$PrivacySettingsActivity">
             <intent-filter android:priority="60">
@@ -3334,18 +3333,6 @@
                        android:value="com.android.settings.applications.ProcessStatsSummary" />
         </activity-alias>
 
-        <activity android:name=".Settings$ConnectedDeviceDashboardActivity"
-                  android:label="@string/connected_devices_dashboard_title"
-                  android:icon="@drawable/ic_bt_laptop">
-            <intent-filter android:priority="9">
-                <action android:name="com.android.settings.action.SETTINGS"/>
-            </intent-filter>
-            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                       android:value="com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment"/>
-            <meta-data android:name="com.android.settings.category"
-                       android:value="com.android.settings.category.ia.homepage"/>
-        </activity>
-
         <activity-alias android:name="BluetoothDashboardAlias"
                         android:targetActivity="Settings$BluetoothSettingsActivity">
             <intent-filter android:priority="7">
@@ -3416,18 +3403,6 @@
                        android:value="true" />
         </activity-alias>
 
-        <activity android:name=".Settings$UserAndAccountDashboardActivity"
-                  android:label="@string/account_dashboard_title"
-                  android:icon="@drawable/ic_settings_accounts">
-            <intent-filter android:priority="2">
-                <action android:name="com.android.settings.action.SETTINGS"/>
-            </intent-filter>
-            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                       android:value="com.android.settings.accounts.UserAndAccountDashboardFragment"/>
-            <meta-data android:name="com.android.settings.category"
-                       android:value="com.android.settings.category.ia.homepage"/>
-        </activity>
-
         <activity-alias android:name="UserDashboardAlias"
                         android:targetActivity="Settings$UserSettingsActivity">
             <intent-filter android:priority="8">
diff --git a/res/drawable-hdpi/setup_illustration_horizontal_tile.jpg b/res/drawable-hdpi/setup_illustration_horizontal_tile.jpg
deleted file mode 100644
index 8d330ce..0000000
--- a/res/drawable-hdpi/setup_illustration_horizontal_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/setup_illustration_lock_screen.jpg b/res/drawable-hdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index 263d33e..0000000
--- a/res/drawable-hdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/setup_illustration_tile.jpg b/res/drawable-hdpi/setup_illustration_tile.jpg
deleted file mode 100644
index d518abd..0000000
--- a/res/drawable-hdpi/setup_illustration_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/setup_illustration_wifi.jpg b/res/drawable-hdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index 2e7241d..0000000
--- a/res/drawable-hdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/setup_illustration_horizontal_tile.jpg b/res/drawable-mdpi/setup_illustration_horizontal_tile.jpg
deleted file mode 100644
index 2b9b04b..0000000
--- a/res/drawable-mdpi/setup_illustration_horizontal_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/setup_illustration_lock_screen.jpg b/res/drawable-mdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index 004fa9e..0000000
--- a/res/drawable-mdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/setup_illustration_tile.jpg b/res/drawable-mdpi/setup_illustration_tile.jpg
deleted file mode 100644
index f2e1bcb..0000000
--- a/res/drawable-mdpi/setup_illustration_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/setup_illustration_wifi.jpg b/res/drawable-mdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index 4a9b8a5..0000000
--- a/res/drawable-mdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/setup_illustration_lock_screen.jpg b/res/drawable-sw600dp-hdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index 933e986..0000000
--- a/res/drawable-sw600dp-hdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/setup_illustration_wifi.jpg b/res/drawable-sw600dp-hdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index 7359f56..0000000
--- a/res/drawable-sw600dp-hdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/setup_illustration_lock_screen.jpg b/res/drawable-sw600dp-mdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index 57e0385..0000000
--- a/res/drawable-sw600dp-mdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/setup_illustration_wifi.jpg b/res/drawable-sw600dp-mdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index 9b13e51..0000000
--- a/res/drawable-sw600dp-mdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/setup_illustration_lock_screen.jpg b/res/drawable-sw600dp-xhdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index e329a96..0000000
--- a/res/drawable-sw600dp-xhdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/setup_illustration_wifi.jpg b/res/drawable-sw600dp-xhdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index dc9e385..0000000
--- a/res/drawable-sw600dp-xhdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/setup_illustration_lock_screen.jpg b/res/drawable-sw600dp-xxhdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index 7934e8a..0000000
--- a/res/drawable-sw600dp-xxhdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/setup_illustration_wifi.jpg b/res/drawable-sw600dp-xxhdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index b57bc17..0000000
--- a/res/drawable-sw600dp-xxhdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxxhdpi/setup_illustration_lock_screen.jpg b/res/drawable-sw600dp-xxxhdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index ab61328..0000000
--- a/res/drawable-sw600dp-xxxhdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxxhdpi/setup_illustration_wifi.jpg b/res/drawable-sw600dp-xxxhdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index b940a9b..0000000
--- a/res/drawable-sw600dp-xxxhdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/setup_illustration_horizontal_tile.jpg b/res/drawable-xhdpi/setup_illustration_horizontal_tile.jpg
deleted file mode 100644
index ae67f38..0000000
--- a/res/drawable-xhdpi/setup_illustration_horizontal_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/setup_illustration_lock_screen.jpg b/res/drawable-xhdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index b78a59d..0000000
--- a/res/drawable-xhdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/setup_illustration_tile.jpg b/res/drawable-xhdpi/setup_illustration_tile.jpg
deleted file mode 100644
index 8beeda8..0000000
--- a/res/drawable-xhdpi/setup_illustration_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/setup_illustration_wifi.jpg b/res/drawable-xhdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index c03f4dd..0000000
--- a/res/drawable-xhdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/setup_illustration_horizontal_tile.jpg b/res/drawable-xxhdpi/setup_illustration_horizontal_tile.jpg
deleted file mode 100644
index 18b885d..0000000
--- a/res/drawable-xxhdpi/setup_illustration_horizontal_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/setup_illustration_lock_screen.jpg b/res/drawable-xxhdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index 875e55e..0000000
--- a/res/drawable-xxhdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/setup_illustration_tile.jpg b/res/drawable-xxhdpi/setup_illustration_tile.jpg
deleted file mode 100644
index 05d4804..0000000
--- a/res/drawable-xxhdpi/setup_illustration_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/setup_illustration_wifi.jpg b/res/drawable-xxhdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index e0791cd..0000000
--- a/res/drawable-xxhdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/setup_illustration_horizontal_tile.jpg b/res/drawable-xxxhdpi/setup_illustration_horizontal_tile.jpg
deleted file mode 100644
index 6d97626..0000000
--- a/res/drawable-xxxhdpi/setup_illustration_horizontal_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/setup_illustration_lock_screen.jpg b/res/drawable-xxxhdpi/setup_illustration_lock_screen.jpg
deleted file mode 100644
index 8ac85a4..0000000
--- a/res/drawable-xxxhdpi/setup_illustration_lock_screen.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/setup_illustration_tile.jpg b/res/drawable-xxxhdpi/setup_illustration_tile.jpg
deleted file mode 100644
index 9d5c4c9..0000000
--- a/res/drawable-xxxhdpi/setup_illustration_tile.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/setup_illustration_wifi.jpg b/res/drawable-xxxhdpi/setup_illustration_wifi.jpg
deleted file mode 100644
index 62352d3..0000000
--- a/res/drawable-xxxhdpi/setup_illustration_wifi.jpg
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_info_outline_24dp.xml b/res/drawable/ic_info_outline_24dp.xml
new file mode 100644
index 0000000..3fe1e9e
--- /dev/null
+++ b/res/drawable/ic_info_outline_24dp.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+<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/textColorSecondary">
+    <path
+        android:fillColor="#000000"
+        android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
+</vector>
diff --git a/res/drawable/setup_ic_add_another_network.xml b/res/drawable/setup_ic_add_another_network.xml
deleted file mode 100644
index fd716d1..0000000
--- a/res/drawable/setup_ic_add_another_network.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-    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="25.0dp"
-        android:height="32.0dp"
-        android:viewportWidth="38.0"
-        android:viewportHeight="48.0">
-
-    <group android:translateX="5.0" android:translateY="10.0">
-
-        <path
-            android:fillColor="?android:attr/colorControlNormal"
-            android:pathData="M28.0,16.0L16.0,16.0l0.0,12.0l-4.0,0.0L12.0,16.0L0.0,16.0l0.0,-4.0l12.0,0.0L12.0,0.0l4.0,0.0l0.0,12.0l12.0,0.0l0.0,4.0z"/>
-
-    </group>
-
-</vector>
diff --git a/res/layout/choose_lock_pattern_common.xml b/res/layout/choose_lock_pattern_common.xml
index 6557e6a..c50aa5b 100644
--- a/res/layout/choose_lock_pattern_common.xml
+++ b/res/layout/choose_lock_pattern_common.xml
@@ -22,7 +22,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:icon="@drawable/ic_lock"
-    settings:suwHeaderText="@string/wifi_setup_wizard_title">
+    settings:suwHeaderText="@string/lockpassword_choose_your_pattern_header">
 
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
         android:id="@+id/topLayout"
diff --git a/res/layout/fingerprint_enroll_introduction.xml b/res/layout/fingerprint_enroll_introduction.xml
index 2348b6a..ccd1f62 100644
--- a/res/layout/fingerprint_enroll_introduction.xml
+++ b/res/layout/fingerprint_enroll_introduction.xml
@@ -35,6 +35,12 @@
             android:layout_height="wrap_content"
             android:text="@string/security_settings_fingerprint_enroll_introduction_message" />
 
+        <com.android.setupwizardlib.view.RichTextView
+            android:id="@+id/error_text"
+            style="@style/SuwDescription.Glif"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
diff --git a/res/layout/fingerprint_settings_footer.xml b/res/layout/fingerprint_settings_footer.xml
deleted file mode 100644
index 8d17052..0000000
--- a/res/layout/fingerprint_settings_footer.xml
+++ /dev/null
@@ -1,26 +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
-  -->
-<com.android.settings.widget.LinkTextView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    style="@android:style/TextAppearance.Material.Body1"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:textColor="?android:attr/textColorSecondary"
-    android:paddingTop="32dp"
-    android:paddingStart="16dp"
-    android:paddingEnd="16dp"
-    android:selectable="false" />
diff --git a/res/layout/preference_category_material_settings.xml b/res/layout/preference_category_material_settings.xml
new file mode 100644
index 0000000..13cefdb
--- /dev/null
+++ b/res/layout/preference_category_material_settings.xml
@@ -0,0 +1,51 @@
+<?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_category_material.xml
+     except that this supports icon -->
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginBottom="16dp"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingTop="16dp">
+
+    <LinearLayout
+        android:id="@+id/icon_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="start|center_vertical"
+        android:orientation="horizontal">
+        <com.android.internal.widget.PreferenceImageView
+            android:id="@android:id/icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:maxWidth="18dp"
+            android:maxHeight="18dp"/>
+    </LinearLayout>
+
+    <TextView
+        android:id="@android:id/title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textAppearance="@android:style/TextAppearance.Material.Body2"
+        android:textColor="?android:attr/textColorPrimary"
+        android:paddingStart="60dp"
+        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"/>
+
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/preference_dropdown_material_settings.xml b/res/layout/preference_dropdown_material_settings.xml
new file mode 100644
index 0000000..ee4051d
--- /dev/null
+++ b/res/layout/preference_dropdown_material_settings.xml
@@ -0,0 +1,89 @@
+<?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 -->
+<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">
+
+    <Spinner
+        android:id="@+id/spinner"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:visibility="invisible" />
+
+    <LinearLayout
+        android:id="@+id/icon_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:minWidth="60dp"
+        android:gravity="start|center_vertical"
+        android:orientation="horizontal"
+        android:paddingEnd="12dp"
+        android:paddingTop="4dp"
+        android:paddingBottom="4dp">
+        <android.support.v7.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="16dp"
+        android:paddingBottom="16dp">
+
+        <TextView android:id="@android:id/title"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:singleLine="true"
+                  android:textAppearance="@style/Preference_TextAppearanceMaterialSubhead"
+                  android:ellipsize="marquee" />
+
+        <TextView android:id="@android:id/summary"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:layout_below="@android:id/title"
+                  android:layout_alignLeft="@android:id/title"
+                  android:textAppearance="?android:attr/textAppearanceSmall"
+                  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:paddingLeft="16dp"
+                  android:orientation="vertical" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/preference_footer.xml b/res/layout/preference_footer.xml
new file mode 100644
index 0000000..64fad74
--- /dev/null
+++ b/res/layout/preference_footer.xml
@@ -0,0 +1,55 @@
+<?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.
+  -->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    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="60dp"
+        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"/>
+    </LinearLayout>
+
+    <com.android.settings.widget.LinkTextView
+        android:id="@android:id/title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingBottom="16dp"
+        android:paddingTop="16dp"
+        android:maxLines="10"
+        android:textColor="?android:attr/textColorSecondary"
+        android:ellipsize="marquee"/>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/preference_material_settings.xml b/res/layout/preference_material_settings.xml
index b8a00f2..ae108da 100644
--- a/res/layout/preference_material_settings.xml
+++ b/res/layout/preference_material_settings.xml
@@ -16,18 +16,19 @@
 
 <!-- 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"
+<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:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
     android:paddingStart="?android:attr/listPreferredItemPaddingStart"
     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:background="?android:attr/activatedBackgroundIndicator"
+    android:background="?android:attr/selectableItemBackground"
     android:clipToPadding="false">
 
     <LinearLayout
-        android:id="@id/icon_frame"
+        android:id="@+id/icon_container"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:minWidth="60dp"
@@ -41,7 +42,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:maxWidth="48dp"
-            android:maxHeight="48dp" />
+            android:maxHeight="48dp"/>
     </LinearLayout>
 
     <RelativeLayout
@@ -51,30 +52,33 @@
         android:paddingTop="16dp"
         android:paddingBottom="16dp">
 
-        <TextView android:id="@android:id/title"
+        <TextView
+            android:id="@android:id/title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
             android:textAppearance="?android:attr/textAppearanceListItem"
-            android:ellipsize="marquee" />
+            android:ellipsize="marquee"/>
 
-        <TextView android:id="@android:id/summary"
+        <TextView
+            android:id="@android:id/summary"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             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" />
+            android:maxLines="10"/>
 
     </RelativeLayout>
 
     <!-- Preference should place its actual preference widget here. -->
-    <LinearLayout android:id="@android:id/widget_frame"
+    <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" />
+        android:orientation="vertical"/>
 
 </LinearLayout>
diff --git a/res/layout/preference_volume_slider.xml b/res/layout/preference_volume_slider.xml
index c5c7818..3eb0c97 100644
--- a/res/layout/preference_volume_slider.xml
+++ b/res/layout/preference_volume_slider.xml
@@ -14,14 +14,32 @@
      limitations under the License.
 -->
 
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:minHeight="?android:attr/listPreferredItemHeightSmall"
     android:gravity="center_vertical"
     android:paddingStart="?android:attr/listPreferredItemPaddingStart"
     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:clickable="false" >
+    android:clickable="false"
+    android:orientation="horizontal">
+
+    <LinearLayout
+        android:id="@+id/icon_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:minWidth="44dp"
+        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="24dp"
+            android:layout_height="24dp"/>
+    </LinearLayout>
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -31,24 +49,27 @@
         android:layout_marginBottom="8dip">
 
         <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-            <TextView android:id="@android:id/title"
-                android:layout_width="wrap_content"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:id="@android:id/title"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
+                android:paddingStart="16dp"
                 android:singleLine="true"
                 android:textAppearance="@android:style/TextAppearance.Material.Subhead"
                 android:textColor="?android:attr/textColorPrimary"
                 android:ellipsize="marquee"
-                android:fadingEdge="horizontal" />
+                android:fadingEdge="horizontal"/>
             <!-- Preference should place its actual preference widget here. -->
-            <LinearLayout android:id="@android:id/widget_frame"
+            <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" />
+                android:orientation="vertical"/>
         </LinearLayout>
 
         <FrameLayout
@@ -56,32 +77,24 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="6dp">
 
-            <ImageView
-                android:id="@android:id/icon"
-                android:layout_gravity="center_vertical|start"
-                android:layout_width="24dp"
-                android:layout_height="24dp" />
-
-            <SeekBar android:id="@*android:id/seekbar"
-                android:layout_marginStart="24dp"
+            <SeekBar
+                android:id="@*android:id/seekbar"
                 android:layout_gravity="center_vertical"
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
+                android:layout_height="wrap_content"/>
 
-            <TextView android:id="@+id/suppression_text"
+            <TextView
+                android:id="@+id/suppression_text"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_vertical|start"
                 android:textAlignment="viewStart"
-                android:layout_marginStart="24dp"
-                android:paddingStart="14dp"
                 android:singleLine="true"
                 android:ellipsize="end"
                 android:textAppearance="@android:style/TextAppearance.Material.Body1"
-                android:textColor="?android:attr/textColorSecondary" />
+                android:textColor="?android:attr/textColorSecondary"/>
 
         </FrameLayout>
-
     </LinearLayout>
 
-</FrameLayout>
+</LinearLayout>
diff --git a/res/layout/setup_wifi_add_network.xml b/res/layout/setup_wifi_add_network.xml
deleted file mode 100644
index 23577c5..0000000
--- a/res/layout/setup_wifi_add_network.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2014 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/other_network"
-    android:layout_width="match_parent"
-    android:layout_height="@dimen/setup_add_network_item_height"
-    android:background="?android:attr/selectableItemBackground"
-    android:gravity="center_vertical"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart">
-
-    <LinearLayout
-        android:layout_width="@dimen/setup_preference_icon_frame_width"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/setup_preference_icon_frame_margin_start"
-        android:gravity="start|center_vertical"
-        android:paddingEnd="@dimen/setup_preference_icon_frame_padding_end">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:src="@drawable/setup_ic_add_another_network" />
-
-    </LinearLayout>
-
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/wifi_other_network"
-        android:textAppearance="@style/TextAppearance.SetupWizardDescription" />
-
-</LinearLayout>
diff --git a/res/layout/setup_wifi_empty.xml b/res/layout/setup_wifi_empty.xml
deleted file mode 100644
index b1659d7..0000000
--- a/res/layout/setup_wifi_empty.xml
+++ /dev/null
@@ -1,24 +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.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:paddingTop="@dimen/setup_wizard_margin_top"
-    android:paddingStart="@dimen/suw_layout_margin_sides"
-    android:paddingEnd="@dimen/suw_layout_margin_sides"
-    android:textAppearance="@style/TextAppearance.SetupWizardDescription" />
diff --git a/res/layout/setup_wifi_layout.xml b/res/layout/setup_wifi_layout.xml
deleted file mode 100644
index 62bb6a1..0000000
--- a/res/layout/setup_wifi_layout.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright 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.
--->
-
-<com.android.setupwizardlib.SetupWizardListLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:settings="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    settings:suwBackgroundTile="@drawable/setup_illustration_tile"
-    settings:suwHeaderText="@string/wifi_setup_wizard_title"
-    settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
-    settings:suwIllustrationImage="@drawable/setup_illustration_wifi" />
diff --git a/res/layout/setup_wifi_mac_address.xml b/res/layout/setup_wifi_mac_address.xml
deleted file mode 100644
index 60f3212..0000000
--- a/res/layout/setup_wifi_mac_address.xml
+++ /dev/null
@@ -1,39 +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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="@dimen/setup_add_network_item_height"
-    android:gravity="center_vertical"
-    android:orientation="vertical"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:textDirection="locale">
-
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingStart="@dimen/setup_list_no_icon_padding"
-        android:text="@string/wifi_advanced_mac_address_title" />
-
-    <TextView
-        android:id="@+id/mac_address"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingStart="@dimen/setup_list_no_icon_padding" />
-
-</LinearLayout>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 5e908df..b641817 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Instellings"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Instellings"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Instellingskortpad"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Geen passende aktiwiteite gevind nie."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Vliegtuigmodus"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Nog"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Draadloos en netwerke"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 645093e..5486dce 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ቅንብሮች"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ቅንብሮች"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"የቅንብሮች አቋራጭ"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"ምንም ተመሳሳይ እንቅስቃሴዎች አልተገኙም።"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"የአውሮፕላን ሁነታ"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"ተጨማሪ"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ገመድ አልባ&amp; አውታረ መረቦች"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index b2d2c45..3b51a82 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -278,8 +278,7 @@
     <string name="settings_label" msgid="1626402585530130914">"الإعدادات"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"الإعدادات"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"اختصار الإعدادات"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"لم يتم العثور على أي أنشطة متطابقة."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"وضع الطائرة"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"المزيد"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"اللاسلكي والشبكات"</string>
diff --git a/res/values-az-rAZ/strings.xml b/res/values-az-rAZ/strings.xml
index ed6e36a..658c61b 100644
--- a/res/values-az-rAZ/strings.xml
+++ b/res/values-az-rAZ/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Ayarlar"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Ayarlar"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Ayarlar qısayolunu seçin"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Uyğun gələn fəaliyyət tapılmadı."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Uçuş rejimi"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Digər"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Simsiz &amp; şəbəkələr"</string>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index 4d1688c..24db5d3 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -272,8 +272,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Podešavanja"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Podešavanja"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Prečica podešavanja"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nije pronađena nijedna aktivnost koja se podudara."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Režim rada u avionu"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Još"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Bežična veza i mreže"</string>
diff --git a/res/values-be-rBY/strings.xml b/res/values-be-rBY/strings.xml
index b66744e..3bdf299 100644
--- a/res/values-be-rBY/strings.xml
+++ b/res/values-be-rBY/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Налады"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Налады"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Ярлык налад"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Адпаведныя дзеянні не знойдзены."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Рэжым самалёту"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Яшчэ"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Бесправадныя і правадныя сеткі"</string>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 17566c6..94523c5 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Настройки"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Настройки"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Пряк път за настройките"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Не бяха намерени съответстващи дейности."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Самолетен режим"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Още"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Кабелни и безжични мрежи"</string>
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn-rBD/strings.xml
index e4a1695..bacfe93 100644
--- a/res/values-bn-rBD/strings.xml
+++ b/res/values-bn-rBD/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"সেটিংস"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"সেটিংস"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"সেটিংস শর্টকাট"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"কোনো সমরূপ কার্যকলাপ খুঁজে পাওয়া যায়নি৷"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"বিমান মোড"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"আরো"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ওয়্যারলেস ও নেটওয়ার্ক"</string>
diff --git a/res/values-bs-rBA/strings.xml b/res/values-bs-rBA/strings.xml
index 530ce8d..5d2157e 100644
--- a/res/values-bs-rBA/strings.xml
+++ b/res/values-bs-rBA/strings.xml
@@ -272,8 +272,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Postavke"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Postavke"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Prečica za postavke"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nije pronađena nijedna odgovarajuća aktivnost."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Način rada u avionu"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Više"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Bežična veza i mreže"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 51a4c68..637ff6c 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Configuració"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Configuració"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Drecera de configuració"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"No s\'ha trobat cap activitat coincident."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Mode d\'avió"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Més"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Connexions sense fil i xarxes"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 9dc8292..3818456 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Nastavení"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Nastavení"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Zástupce nastavení"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nebyly nalezeny žádné odpovídající aktivity."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Režim Letadlo"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Další"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Bezdrátová připojení a sítě"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index fa51fdb..61e4dfe 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Indstillinger"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Indstillinger"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Genvej til Indstillinger"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Der blev ikke fundet nogen matchende aktiviteter."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Flytilstand"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mere"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Trådløs og netværk"</string>
@@ -1943,7 +1942,7 @@
     <string name="process_stats_type_foreground" msgid="7713118254089580536">"Forgrund"</string>
     <string name="process_stats_type_cached" msgid="6314925846944806511">"Cachelagret"</string>
     <string name="process_stats_os_label" msgid="4813434110442733392">"Android OS"</string>
-    <string name="process_stats_os_native" msgid="5322428494231768472">"Indbygget"</string>
+    <string name="process_stats_os_native" msgid="5322428494231768472">"Native"</string>
     <string name="process_stats_os_kernel" msgid="1938523592369780924">"Kerne"</string>
     <string name="process_stats_os_zram" msgid="677138324651671575">"Z-Ram"</string>
     <string name="process_stats_os_cache" msgid="6432533624875078233">"Cacher"</string>
@@ -1957,7 +1956,7 @@
     <string name="mem_state_subtitle" msgid="2407238869781011933">"Hukommelsestilstande"</string>
     <string name="mem_use_subtitle" msgid="7319468770222422412">"Anvendt hukommelse"</string>
     <string name="mem_use_kernel_type" msgid="8698327165935012484">"Kerne"</string>
-    <string name="mem_use_native_type" msgid="5976704902328347400">"Indbygget"</string>
+    <string name="mem_use_native_type" msgid="5976704902328347400">"Native"</string>
     <string name="mem_use_kernel_cache_type" msgid="6411475064463957513">"Kernecacher"</string>
     <string name="mem_use_zram_type" msgid="9087217476795358232">"ZRam-udskiftning"</string>
     <string name="mem_use_free_type" msgid="717708548454880840">"Tilgængelig"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index d14ebf7..42e708b 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -269,8 +269,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Einstellungen"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Einstellungen"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Einstellungsverknüpfung"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Keine passenden Aktivitäten gefunden."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Flugmodus"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mehr"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Drahtlos &amp; Netzwerke"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 7b3a118..99345ad 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Ρυθμίσεις"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Ρυθμίσεις"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Συντόμευση ρυθμίσεων"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Δεν βρέθηκαν δραστηριότητες οι οποίες να συμφωνούν με τα κριτήρια."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Λειτουργία πτήσης"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Περισσότερα"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Ασύρματο και δίκτυα"</string>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 5188e6b..bbce212 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Settings"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Settings"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Settings shortcut"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"No matching activities found."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Aeroplane mode"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"More"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wireless &amp; networks"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index c3dad02..0dff880 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Settings"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Settings"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Settings shortcut"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"No matching activities found."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Aeroplane mode"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"More"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wireless &amp; networks"</string>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index c3dad02..0dff880 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Settings"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Settings"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Settings shortcut"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"No matching activities found."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Aeroplane mode"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"More"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wireless &amp; networks"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 5804ec9..ef08313 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Configuración"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Configuración"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Configuración"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"No se encontraron actividades coincidentes."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modo avión"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Más"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Conexiones inalámbricas y redes"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 0d65ca9..b6bf476 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Ajustes"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Ajustes"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Acceso a Ajustes"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"No se ha encontrado ninguna actividad que coincida."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modo avión"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Más"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Conexiones inalámbricas y redes"</string>
@@ -1297,7 +1296,7 @@
     <string name="sms_change_default_dialog_title" msgid="1958688831875804286">"¿Cambiar aplicación de SMS?"</string>
     <string name="sms_change_default_dialog_text" msgid="1522783933230274787">"¿Usar <xliff:g id="NEW_APP">%1$s</xliff:g> en lugar de <xliff:g id="CURRENT_APP">%2$s</xliff:g> como aplicación de SMS?"</string>
     <string name="sms_change_default_no_previous_dialog_text" msgid="602683880284921998">"¿Usar <xliff:g id="NEW_APP">%s</xliff:g> como aplicación de SMS?"</string>
-    <string name="network_scorer_change_active_dialog_title" msgid="3776301550387574975">"¿Cambiar Asistente de Wi‑Fi?"</string>
+    <string name="network_scorer_change_active_dialog_title" msgid="3776301550387574975">"¿Cambiar asistente de Wi‑Fi?"</string>
     <string name="network_scorer_change_active_dialog_text" msgid="8035173880322990715">"¿Quieres usar <xliff:g id="NEW_APP">%1$s</xliff:g> en lugar de <xliff:g id="CURRENT_APP">%2$s</xliff:g> para administrar tus conexiones de red?"</string>
     <string name="network_scorer_change_active_no_previous_dialog_text" msgid="7444620909047611601">"¿Quieres usar <xliff:g id="NEW_APP">%s</xliff:g> para administrar tus conexiones de red?"</string>
     <string name="mobile_unknown_sim_operator" msgid="2156912373230276157">"Operador de SIM desconocido"</string>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml
index 8effb9e..ee5cb1e 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et-rEE/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Seaded"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Seaded"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Seadete otsetee"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Sobivat tegevust ei leitud."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Lennurežiim"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Rohkem"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Traadita ühendus ja võrgud"</string>
diff --git a/res/values-eu-rES/strings.xml b/res/values-eu-rES/strings.xml
index 2287d8f..6c34e5d 100644
--- a/res/values-eu-rES/strings.xml
+++ b/res/values-eu-rES/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Ezarpenak"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Ezarpenak"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Ezarpenen lasterbidea"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Ez da bat datorren jarduerarik aurkitu."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Hegaldi modua"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Gehiago"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Hari gabeko konexioak eta sareak"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 66c0a26..25a17ba 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"تنظیمات"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"تنظیمات"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"میان‌بر تنظیمات"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"فعالیتی مطابق با این مورد یافت نشد."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"حالت هواپیما"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"بیشتر"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"بی‌سیم و شبکه‌ها"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 8ad02b6..d8d67dd 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Asetukset"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Asetukset"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Asetukset-pikakuvake"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Sopivia toimintoja ei löytynyt."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Lentokonetila"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Lisää"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Langaton verkko ja verkot"</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index b6e5915..b502b7d 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -215,7 +215,7 @@
     <string name="oem_radio_info_label" msgid="6163141792477958941">"Infos/paramètres OEM"</string>
     <string name="band_mode_title" msgid="4071411679019296568">"Définir le mode de bande radio"</string>
     <string name="band_mode_loading" msgid="3555063585133586152">"Chargement de la liste de bandes en cours..."</string>
-    <string name="band_mode_set" msgid="5730560180249458484">"Paramètres"</string>
+    <string name="band_mode_set" msgid="5730560180249458484">"Définir"</string>
     <string name="band_mode_failed" msgid="1495968863884716379">"Échec"</string>
     <string name="band_mode_succeeded" msgid="2701016190055887575">"Opération effectuée"</string>
     <string name="sdcard_changes_instructions" msgid="4482324130377280131">"Les modifications prendront effet lors de la prochaine connexion du câble USB."</string>
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Paramètres"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Paramètres"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Raccourci vers les paramètres"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Aucune activité correspondante trouvée."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Mode avion"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Plus"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Sans fil et réseaux"</string>
@@ -2232,7 +2231,7 @@
     <string name="data_usage_auto_sync_off_dialog" msgid="4025938250775413864">"Cette action limite la consommation de données et l\'utilisation de la pile, mais vous devrez synchroniser manuellement chaque compte pour recueillir les informations récentes. Par ailleurs, vous ne recevrez pas de notifications en cas de mise à jour."</string>
     <string name="data_usage_cycle_editor_title" msgid="1373797281540188533">"Date de réinitialisation du cycle de consommation"</string>
     <string name="data_usage_cycle_editor_subtitle" msgid="5512903797979928416">"Jour du mois :"</string>
-    <string name="data_usage_cycle_editor_positive" msgid="8821760330497941117">"Paramètres"</string>
+    <string name="data_usage_cycle_editor_positive" msgid="8821760330497941117">"Définir"</string>
     <string name="data_usage_warning_editor_title" msgid="3704136912240060339">"Définir l\'avertissement d\'utilisation des données"</string>
     <string name="data_usage_limit_editor_title" msgid="9153595142385030015">"Définir la limite de consommation des données"</string>
     <string name="data_usage_limit_dialog_title" msgid="3023111643632996097">"Limitation de la consommation de données mobiles"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index a1562a3..361f771 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Paramètres"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Paramètres"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Raccourci vers les paramètres"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Aucune activité correspondante trouvée."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Mode Avion"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Plus"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Sans fil et réseaux"</string>
diff --git a/res/values-gl-rES/strings.xml b/res/values-gl-rES/strings.xml
index 086d187..dd12d53 100644
--- a/res/values-gl-rES/strings.xml
+++ b/res/values-gl-rES/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Configuración"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Configuración"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Atallo de configuración"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Non se atoparon actividades que coincidan."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modo avión"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Máis"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Sen fíos e redes"</string>
@@ -3293,7 +3292,7 @@
     <string name="automatic_storage_manager_activation_warning" msgid="6353100011690933254">"Agora o xestor de almacenamento administra o teu espazo"</string>
     <string name="account_for_section_header" msgid="5867553104728848377">"Contas"</string>
     <string name="configure_section_header" msgid="7391183586410814450">"Configurar"</string>
-    <string name="auto_sync_account_title" msgid="7647106425106072285">"Datos da conta de sincronización automática"</string>
+    <string name="auto_sync_account_title" msgid="7647106425106072285">"Sincronizar automaticamente os datos da conta"</string>
     <string name="auto_sync_personal_account_title" msgid="999536545686286287">"Datos da conta persoal de sincronización automática"</string>
     <string name="auto_sync_work_account_title" msgid="3073278154593727844">"Datos da conta laboral de sincronización automática"</string>
     <string name="account_sync_title" msgid="7214747784136106491">"Sincronización da conta"</string>
diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu-rIN/strings.xml
index 6bec17f..fded54d 100644
--- a/res/values-gu-rIN/strings.xml
+++ b/res/values-gu-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"સેટિંગ્સ"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"સેટિંગ્સ"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"સેટિંગ્સ શૉર્ટકટ"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"કોઈ મેળ ખાતી પ્રવૃત્તિઓ મળી નથી."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"એરપ્લેન મોડ"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"વધુ"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"વાયરલેસ અને નેટવર્ક્સ"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 747e00a..7b0ca4d 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"सेटिंग"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"सेटिंग"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"सेटिंग शॉर्टकट"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"कोई मिलती-जुलती गतिविधि नहीं मिली."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"हवाई जहाज मोड"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"अधिक"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"वायरलेस और नेटवर्क"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 018db7a..8707039 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -272,8 +272,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Postavke"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Postavke"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Prečac postavki"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nisu pronađene podudarne radnje."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Način rada u zrakoplovu"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Više"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Bežično povezivanje i mreže"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index c4aa8c1..1dc1dd9 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Beállítások"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Beállítások"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Beállítások parancsikon"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nincs megfelelő tevékenység."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Repülési üzemmód"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Továbbiak"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Vezeték nélküli és egyéb hálózatok"</string>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index a573849..f7967de 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Կարգավորումներ"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Կարգավորումներ"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Կարգավորումների դյուրանցում"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Համընկնող գործողություններ չգտնվեցին:"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Ինքնաթիռի ռեժիմ"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Ավելին"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Անլար կապ և ցանցեր"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index ea4f508..2827d07 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Setelan"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Setelan"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Pintasan setelan"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Tidak ditemukan aktivitas yang sesuai."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Mode pesawat"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Lainnya"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Jaringan &amp; nirkabel"</string>
diff --git a/res/values-is-rIS/strings.xml b/res/values-is-rIS/strings.xml
index e1763dd..f2fe89e 100644
--- a/res/values-is-rIS/strings.xml
+++ b/res/values-is-rIS/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Stillingar"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Stillingar"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Flýtileið stillinga"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Engar aðgerðir með samsvörun fundust."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Flugstilling"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Meira"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Þráðlaus net og símkerfi"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 78dbed0..b9d432f 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Impostazioni"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Impostazioni"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Scorciatoia Impostazioni"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nessuna attività corrispondente trovata."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modalità aereo"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Altro"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wireless e reti"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 85671ee..1b28fbb 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"הגדרות"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"הגדרות"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"קיצור דרך של הגדרות"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"לא נמצאו פעילויות תואמות."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"מצב טיסה"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"עוד"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"אלחוטי ורשתות"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index b69ff62..ea85477 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"設定"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"設定"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"設定のショートカット"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"一致するアクティビティが見つかりません。"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"機内モード"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"もっと見る"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"無線とネットワーク"</string>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml
index e25d2a2..f83c911 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka-rGE/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"პარამეტრები"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"პარამეტრები"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"პარამეტრების მალსახმობი"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"შესატყვისი აქტივობები ვერ მოიძებნა."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"თვითმფრინავის რეჟიმი"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"დამატებით"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"უსადენო კავშირი და ქსელები"</string>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index 1a04cb0..546db13 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Параметрлер"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Параметрлер"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Параметрлердің төте пернелері"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Сәйкес әрекеттер табылмады."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Ұшақ режимі"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Басқалары"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Сымсыз желілер"</string>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km-rKH/strings.xml
index b94b363..26802f3 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km-rKH/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ការ​កំណត់"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ការ​កំណត់"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"កំណត់​ផ្លូវកាត់"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"រកមិនឃើញសកម្មភាពផ្គូផ្គងទេ។"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"ពេលជិះយន្តហោះ"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"ច្រើន​ទៀត"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ឥត​ខ្សែ &amp; បណ្ដាញ"</string>
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml
index 0cc56fb..cbb5bc9 100644
--- a/res/values-kn-rIN/strings.xml
+++ b/res/values-kn-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"ಸೆಟ್ಟಿಂಗ್‌ಗಳ ಶಾರ್ಟ್‌ಕಟ್‌"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"ಯಾವುದೇ ಹೊಂದಾಣಿಕೆಯ ಚಟುವಟಿಕೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"ಏರ್‌ಪ್ಲೇನ್ ಮೋಡ್"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"ಇನ್ನಷ್ಟು"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ವಯರ್‌ಲೆಸ್ &amp; ನೆಟ್‌ವರ್ಕ್‌ಗಳು"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 7171d98..0775426 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"설정"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"설정"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"설정 바로가기"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"일치하는 활동이 없습니다."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"비행기 모드"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"더보기"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"무선 및 네트워크 설정"</string>
diff --git a/res/values-ky-rKG/strings.xml b/res/values-ky-rKG/strings.xml
index dbf39b6..18f7156 100644
--- a/res/values-ky-rKG/strings.xml
+++ b/res/values-ky-rKG/strings.xml
@@ -269,8 +269,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Жөндөөлөр"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Жөндөөлөр"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Жөндөөлөр"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Туура келген аракеттер табылган жок."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Учак режими"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Дагы"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Зымсыз тармактар"</string>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo-rLA/strings.xml
index 369b1b6..705aed1 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo-rLA/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ການຕັ້ງຄ່າ"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ການຕັ້ງຄ່າ"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"ທາງລັດການຕັ້ງຄ່າ"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"ບໍ່ພົບກິດຈະກຳທີ່ກົງກັນ."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"ໂໝດຢູ່ໃນຍົນ"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"ເພີ່ມເຕີມ"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ລະບົບໄຮ້ສາຍ &amp; ເຄືອຂ່າຍ"</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index bf00362..7d14305 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Nustatymai"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Nustatymai"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Spartusis nustatymų klavišas"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nerasta jokios atitinkančios veiklos."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Lėktuvo režimas"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Daugiau"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Belaidis ryšys ir tinklai"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 8489d15..254dafb 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -272,8 +272,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Iestatījumi"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Iestatījumi"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Saīsne Iestatījumi"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Netika atrasta neviena atbilstoša darbība."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Lidojuma režīms"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Vairāk"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Bezvadu sakari un tīkli"</string>
diff --git a/res/values-mk-rMK/strings.xml b/res/values-mk-rMK/strings.xml
index 33c0864..af2111d 100644
--- a/res/values-mk-rMK/strings.xml
+++ b/res/values-mk-rMK/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Поставки"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Поставки"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Кратенка за подесувања"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Не се пронајдени активности што се соовпаѓаат."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Режим на работа во авион"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Повеќе"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Безжичен и мрежи"</string>
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml
index e95e606..1358502 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ക്രമീകരണം"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ക്രമീകരണം"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"ക്രമീകരണങ്ങളിലേയ്ക്ക്"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"പൊരുത്തമുള്ള പ്രവർത്തനങ്ങളൊന്നും കണ്ടെത്തിയില്ല."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"ഫ്ലൈറ്റ് മോഡ്"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"കൂടുതൽ"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"വയർലസ്സും നെറ്റ്‌വർക്കും"</string>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index dc3823f..2ab8856 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Тохиргоо"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Тохиргоо"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Тохиргооны товчилбор"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Тохирох үйл ажиллагаа олдсонгүй."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Нислэгийн горим"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Цааш"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Утасгүй &amp; сүлжээ"</string>
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml
index 992259e..8d4792d 100644
--- a/res/values-mr-rIN/strings.xml
+++ b/res/values-mr-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"सेटिंग्ज"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"सेटिंग्ज"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"सेटिंग्ज शॉर्टकट"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"कोणतेही जुळणारे क्रियाकलाप आढळले नाहीत."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"विमान मोड"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"अधिक"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"वायरलेस आणि नेटवर्क"</string>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms-rMY/strings.xml
index 4c1152a..c705ed2 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms-rMY/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Tetapan"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Tetapan"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Pintasan tetapan"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Tiada aktiviti yang sepadan ditemui."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Mod pesawat"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Lagi"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wayarles &amp; rangkaian"</string>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index 7f8c287..640c881 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ဆက်တင်များ"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ဆက်တင်များ"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"ဆက်တင်အတိုကောက်"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"ကိုက်ညီမှုရှိသည့် လုပ်ဆောင်ချက်ကို မတွေ့ပါ။"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"လေယာဉ်ပေါ်သုံးစနစ်"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"နောက်ထပ်"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ကြိုးမဲ့နှင့် ကွန်ယက်များ"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 6c73b49..3588f52 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Innstillinger"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Innstillinger"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Snarvei for Innstillinger"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Finner ingen samsvarende aktiviteter."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Flymodus"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mer"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Trådløst og nettverk"</string>
diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne-rNP/strings.xml
index 872246d..4f7a2e9 100644
--- a/res/values-ne-rNP/strings.xml
+++ b/res/values-ne-rNP/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"सेटिङहरू"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"सेटिङहरू"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"सेटिङ सर्टकट"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"कुनै मिल्दो गतिविधि भेट्टिएन।"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"हवाइजहाज मोड"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"थप"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ताररहित सञ्जाल"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 7d075ed..5530050 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Instellingen"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Instellingen"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Snelle link voor instellingen"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Geen overeenkomende activiteiten gevonden."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Vliegtuigmodus"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Meer"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Draadloos en netwerken"</string>
diff --git a/res/values-pa-rIN/strings.xml b/res/values-pa-rIN/strings.xml
index c8e74e8..b13ff64 100644
--- a/res/values-pa-rIN/strings.xml
+++ b/res/values-pa-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ਸੈਟਿੰਗਾਂ"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ਸੈਟਿੰਗਾਂ"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"ਸੈਟਿੰਗਾਂ ਸ਼ਾਰਟਕੱਟ"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"ਕੋਈ ਮੇਲ ਖਾਂਦੀਆਂ ਸਰਗਰਮੀਆਂ ਨਹੀਂ ਮਿਲੀਆਂ।"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"ਹਵਾਈ ਜਹਾਜ਼ ਮੋਡ"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"ਹੋਰ"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ਵਾਇਰਲੈੱਸ ਅਤੇ ਨੈੱਟਵਰਕ"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index ae2f48c..3052fa1 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Ustawienia"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Ustawienia"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Skrót do ustawień"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nie znaleziono pasujących działań."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Tryb samolotowy"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Więcej"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Sieci zwykłe i bezprzewodowe"</string>
diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml
index 609e9a1..20ceab1 100644
--- a/res/values-pt-rBR/strings.xml
+++ b/res/values-pt-rBR/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Configurações"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Configurar"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Atalho para as configurações"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nenhuma atividade correspondente foi encontrada."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modo avião"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mais"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Redes sem fio e outras"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 90c6b45..4366577 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Definições"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Definições"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Atalho das definições"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Não foi encontrada qualquer atividade correspondente."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modo de voo"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mais"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Redes sem fios e outras"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 609e9a1..20ceab1 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Configurações"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Configurar"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Atalho para as configurações"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nenhuma atividade correspondente foi encontrada."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modo avião"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mais"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Redes sem fio e outras"</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 2625c33..1e531fc 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -272,8 +272,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Setări"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Setări"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Comandă rapidă pentru setări"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nu s-a găsit nicio activitate potrivită."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Mod Avion"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mai multe"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wireless și rețele"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index bee2f9f..2ec6fee 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Настройки"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Настройки"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Ярлык настроек"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Подходящих действий не найдено."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Режим полета"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Ещё"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Беспроводные сети"</string>
diff --git a/res/values-si-rLK/strings.xml b/res/values-si-rLK/strings.xml
index aec5022..e2aac51 100644
--- a/res/values-si-rLK/strings.xml
+++ b/res/values-si-rLK/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"සැකසීම්"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"සැකසීම්"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"සැකසීම කෙටිමඟ"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"ගැළපෙන ක්‍රියාකාරකම් හමු නොවීය."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"අහස්යානා ආකාරය"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"තවත්"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"නොරැහැන් සහ ජාල"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 4304d85..9b6a990 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Nastavenia"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Nastavenia"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Odkaz na nastavenia"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nenašli sa žiadne zodpovedajúce aktivity."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Režim v lietadle"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Ďalšie"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Bezdrôtové pripojenia a siete"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index f7607e3..f690866 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Nastavitve"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Nastavitve"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Bližnjica do nastavitev"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Ni ustreznih dejavnosti."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Način za letalo"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Več"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Brezžično in omrežja"</string>
diff --git a/res/values-sq-rAL/strings.xml b/res/values-sq-rAL/strings.xml
index 8cded4f..7bd6816 100644
--- a/res/values-sq-rAL/strings.xml
+++ b/res/values-sq-rAL/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Cilësimet"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Cilësimet"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Shkurtorja e cilësimeve"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Nuk u gjet asnjë aktivitet që përputhet."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Modaliteti i aeroplanit"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Më shumë"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wi-Fi dhe rrjetet"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 420a5c0..74614f7 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -272,8 +272,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Подешавања"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Подешавања"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Пречица подешавања"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Није пронађена ниједна активност која се подудара."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Режим рада у авиону"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Још"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Бежична веза и мреже"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 87a9935..8713580 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Inställningar"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Inställningar"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Genväg för inställningar"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Inga matchande aktiviteter hittades."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Flygplansläge"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mer"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Trådlöst och nätverk"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 6bec2cb..02a6553 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Mipangilio"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Mipangilio"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Mipangilio ya njia ya mkato"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Hakuna shughuli zinazolingana zilizopatikana."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Hali ya ndege"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Mengineyo"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Mitandao isiyotumia waya"</string>
diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta-rIN/strings.xml
index 50f84f2..8cbc303 100644
--- a/res/values-ta-rIN/strings.xml
+++ b/res/values-ta-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"அமைப்பு"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"அமைப்பு"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"அமைப்பு"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"பொருந்தும் செயல்பாடுகள் இல்லை."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"விமானப் பயன்முறை"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"மேலும்"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"வயர்லெஸ் &amp; நெட்வொர்க்குகள்"</string>
diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml
index e3b13b5..d5f4779 100644
--- a/res/values-te-rIN/strings.xml
+++ b/res/values-te-rIN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"సెట్టింగ్‌లు"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"సెట్టింగ్‌లు"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"సెట్టింగ్‌ల సత్వరమార్గం"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"సరిపోలే కార్యాచరణలు కనుగొనబడలేదు."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"ఎయిర్‌ప్లైన్ మోడ్"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"మరిన్ని"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"వైర్‌లెస్ &amp; నెట్‌వర్క్‌లు"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 4a29e11..d6f2f68 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"การตั้งค่า"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"การตั้งค่า"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"ทางลัดการตั้งค่า"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"ไม่พบกิจกรรมที่ตรงกัน"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"โหมดใช้งานบนเครื่องบิน"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"เพิ่มเติม"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"ระบบไร้สายและเครือข่าย"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 72a916c..16ba80b 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Mga Setting"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Mga Setting"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Shortcut ng Mga Setting"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Walang nahanap na tumutugmang aktibidad."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Airplane mode"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Higit pa"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Wireless at mga network"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index f45d2d3..3a2a3bf 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Ayarlar"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Ayarlar"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Ayarlar kısayolu"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Eşleşen hiçbir etkinlik bulunamadı."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Uçak modu"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Diğer"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Kablosuz özelliği ve ağlar"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 9657602..5a41f7a 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -274,8 +274,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Налаштування"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Налаштування"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Ярлик налаштувань"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Немає такої активності."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Режим польоту"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Більше"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Бездротовий зв\'язок і мережі"</string>
diff --git a/res/values-ur-rPK/strings.xml b/res/values-ur-rPK/strings.xml
index 7b3213e..b0a9f5d 100644
--- a/res/values-ur-rPK/strings.xml
+++ b/res/values-ur-rPK/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"ترتیبات"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"ترتیبات"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"ترتیبات کا شارٹ کٹ"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"کوئی مماثل سرگرمیاں نہیں ملیں۔"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"ہوائی جہاز وضع"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"مزید"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"وائرلیس اور نیٹ ورکس"</string>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index 3d361c9..0027a48 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Sozlamalar"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Sozlamalar"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Sozlamalar yorlig‘i"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Hech qanday mos faoliyat topilmadi."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Parvoz rejimi"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Yana"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Simsiz tarmoqlar"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 89c2c74..076f2df 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Cài đặt"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Cài đặt"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Lối tắt cài đặt"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Không tìm thấy hoạt động nào phù hợp."</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Chế độ trên máy bay"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Thêm"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Không dây &amp; mạng"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 81bd327..93864ba 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"设置"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"设置"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"设置快捷方式"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"未找到匹配的活动。"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"飞行模式"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"更多"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"无线和网络"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 20d4ca8..0028c00 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"設定"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"設定"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"設定捷徑"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"找不到相符的活動。"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"飛行模式"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"更多"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"無線與網絡"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index c29edf0..80e08d0 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"設定"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"設定"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"設定捷徑"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"找不到相符的活動。"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"飛航模式"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"更多"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"無線與網路"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index b3ba0c5..92c61c8 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -270,8 +270,7 @@
     <string name="settings_label" msgid="1626402585530130914">"Izilungiselelo"</string>
     <string name="settings_label_launcher" msgid="8344735489639482340">"Izilungiselelo"</string>
     <string name="settings_shortcut" msgid="3936651951364030415">"Isinqamuleli sezilungiselelo"</string>
-    <!-- no translation found for activity_list_empty (6428823323471264836) -->
-    <skip />
+    <string name="activity_list_empty" msgid="6428823323471264836">"Ayikho imisebenzi efanayo etholakele"</string>
     <string name="airplane_mode" msgid="8837269988154128601">"Imodi yendiza"</string>
     <string name="radio_controls_title" msgid="3447085191369779032">"Okuningi"</string>
     <string name="wireless_networks_settings_title" msgid="3643009077742794212">"Amanethiwekhi; nokungenantambo"</string>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 40f3f71..4b3dba9 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -40,18 +40,9 @@
 
     <dimen name="crypt_clock_size">100sp</dimen>
 
-    <dimen name="setup_add_network_item_height">56dp</dimen>
-    <!-- Size of padding to give in the wifi list when there is no icon -->
-    <dimen name="setup_list_no_icon_padding">56dp</dimen>
-    <dimen name="setup_preference_icon_frame_margin_start">-4dp</dimen>
-    <dimen name="setup_preference_icon_frame_padding_end">12dp</dimen>
-    <dimen name="setup_preference_icon_frame_width">60dp</dimen>
-    <dimen name="setup_wizard_margin_top">24dp</dimen>
-
     <dimen name="divider_height">3dip</dimen>
     <dimen name="divider_margin_top">6dip</dimen>
     <dimen name="divider_margin_bottom">7dip</dimen>
-    <dimen name="vert_divider_width">1dip</dimen>
 
     <!--  Size of icons in the top-level of settings  -->
     <dimen name="header_icon_width">28dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4d872b1..3d7a777 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -866,6 +866,10 @@
 
     <!-- Text shown when "Add fingerprint" button is disabled -->
     <string name="fingerprint_add_max">You can add up to <xliff:g id="count" example="5">%d</xliff:g> fingerprints</string>
+    <!-- Text shown when users has enrolled a maximum number of fingerprints [CHAR LIMIT=NONE] -->
+    <string name="fingerprint_intro_error_max">You\u2019ve added the maximum number of fingerprints</string>
+    <!-- Text shown when an unknown error caused the device to be unable to add fingerprints [CHAR LIMIT=NONE] -->
+    <string name="fingerprint_intro_error_unknown">Can\u2019t add more fingerprints</string>
 
     <!-- Title shown in a dialog which asks the user to confirm when the last fingerprint gets deleted by him. [CHAR LIMIT=50]-->
     <string name="fingerprint_last_delete_title">Remove all fingerprints?</string>
@@ -1471,9 +1475,6 @@
     <!-- Bluetooth settings.  Dock Setting Dialog - Remember setting and don't ask user again -->
     <string name="bluetooth_dock_settings_remember">Remember settings</string>
 
-    <!-- Wifi Assistant title.  [CHAR LIMIT=40] -->
-    <string name="wifi_assistant_title">Wi\u2011Fi Assistant</string>
-
     <!-- Wifi Display settings. The title of the screen. [CHAR LIMIT=40] -->
     <string name="wifi_display_settings_title">Cast</string>
     <!-- Wifi Display settings. The title of a menu item to enable wireless display [CHAR LIMIT=40] -->
@@ -1568,8 +1569,6 @@
     <string name="wifi_settings_title">Wi\u2011Fi</string>
     <!-- Summary text of the Wi-fi settings screen -->
     <string name="wifi_settings_summary">Set up &amp; manage wireless access points</string>
-    <!-- Used in the 1st-level settings screen to turn on Wi-Fi  [CHAR LIMIT=60] -->
-    <string name="wifi_setup_wizard_title">Select Wi\u2011Fi network</string>
     <!-- Used by Account creation for turning on Wi-Fi  [CHAR LIMIT=60] -->
     <string name="wifi_select_network">Select Wi\u2011Fi</string>
     <!-- Summary text when turning Wi-Fi or bluetooth on -->
@@ -1592,12 +1591,12 @@
     <string name="wifi_poor_network_detection_summary">Don\u2019t use a Wi\u2011Fi network unless it has a good Internet connection</string>
     <!-- Checkbox summary for option to toggle poor network detection [CHAR LIMIT=60] -->
     <string name="wifi_avoid_poor_network_detection_summary">Only use networks that have a good Internet connection</string>
-    <!-- Checkbox title for option to connect to open Wi-Fi automatically [CHAR LIMIT=40] -->
-    <string name="wifi_automatically_connect_title">Use open Wi\u2011Fi automatically</string>
-    <!-- Checkbox summary for option to connect to open Wi-Fi automatically  [CHAR LIMIT=100] -->
-    <string name="wifi_automatically_connect_summary">Let a Wi\u2011Fi assistant automatically connect to open networks determined to be high quality</string>
-    <!-- Dialog title for option to select an app which connects to open Wi-Fi automatically [CHAR LIMIT=40] -->
-    <string name="wifi_select_assistant_dialog_title">Choose assistant</string>
+
+    <!-- Network recommendations toggle -->
+    <!--TODO(jjoslin): Provide final strings and mark for translation. BUG: 32913919 -->
+    <string translatable="false" name="networking_allow_recommendations_title">Use network recommendations</string>
+    <string translatable="false" name="networking_allow_recommendations_summary">When enabled, use network recommendations when selecting the Wi\u2011Fi network to connect to</string>
+
     <!-- Preference title for option to install certificates -->
     <string name="wifi_install_credentials">Install certificates</string>
     <!-- Message to describe "Wi-Fi scan always available feature" when Wi-Fi is off. The
@@ -1663,8 +1662,6 @@
     <string name="wifi_empty_list_wifi_on">Searching for Wi\u2011Fi networks\u2026</string>
     <!-- Wifi Settings. text displayed when user has restriction DISALLOW_CONFIG_WIFI [CHAR LIMIT=NONE]-->
     <string name="wifi_empty_list_user_restricted">You don\u2019t have permission to change the Wi\u2011Fi network.</string>
-    <!-- Wi-Fi settings. title for setup other network button [CHAR LIMIT=35]-->
-    <string name="wifi_other_network">Add another network</string>
     <!-- Wi-Fi settings. content description for more button [CHAR LIMIT=50]-->
     <string name="wifi_more">More</string>
     <!-- Wi-Fi settings. wps menu title [CHAR LIMIT=25]-->
@@ -1813,30 +1810,6 @@
     <string name="wifi_failed_save_message">Failed to save network</string>
     <!-- Button label to dismiss the dialog -->
     <string name="wifi_cancel">Cancel</string>
-    <!-- Button for skipping a step after having been warned of a potential concern [CHAR LIMIT=30] -->
-    <string name="wifi_skip_anyway">Skip anyway</string>
-    <!-- Button for going to the previous screen or step [CHAR LIMIT=20] -->
-    <string name="wifi_dont_skip">Go back</string>
-
-    <!-- Text warning about skipping Wi-Fi with a mobile connect (tablet) [CHAR LIMIT=NONE]-->
-    <string name="wifi_skipped_message" product="tablet">WARNING: if you skip Wi\u2011Fi, your tablet will only use cellular data for initial downloads and updates. To avoid possible data charges, connect to Wi\u2011Fi.</string>
-    <!-- Text warning about skipping Wi-Fi with a mobile connect (device) [CHAR LIMIT=NONE]-->
-    <string name="wifi_skipped_message" product="device">WARNING: if you skip Wi\u2011Fi, your device will only use cellular data for initial downloads and updates. To avoid possible data charges, connect to Wi\u2011Fi.</string>
-    <!-- Text warning about skipping Wi-Fi with a mobile connect (phone) [CHAR LIMIT=NONE]-->
-    <string name="wifi_skipped_message" product="default">WARNING: if you skip Wi\u2011Fi, your phone will only use cellular data for initial downloads and updates. To avoid possible data charges, connect to Wi\u2011Fi.</string>
-
-    <!-- Text warning about skipping Wi-Fi without a mobile connect (tablet) [CHAR LIMIT=NONE] -->
-    <string name="wifi_and_mobile_skipped_message" product="tablet">If you skip Wi\u2011Fi:\n\n<li>Your tablet won\u2019t have an Internet connection.</li>\n\n<li>You won\u2019t get software updates until you connect to the Internet.</li>\n\n<li>You can\u2019t activate device protection features at this time.</li></string>
-    <!-- Text warning about skipping Wi-Fi without a mobile connect (device) [CHAR LIMIT=NONE] -->
-    <string name="wifi_and_mobile_skipped_message" product="device">If you skip Wi\u2011Fi:\n\n<li>Your device won\u2019t have an Internet connection.</li>\n\n<li>You won\u2019t get software updates until you connect to the Internet.</li>\n\n<li>You can\u2019t activate device protection features at this time.</li></string>
-    <!-- Text warning about skipping Wi-Fi without a mobile connect (phone) [CHAR LIMIT=NONE] -->
-    <string name="wifi_and_mobile_skipped_message" product="default">If you skip Wi\u2011Fi:\n\n<li>Your phone won\u2019t have an Internet connection.</li>\n\n<li>You won\u2019t get software updates until you connect to the Internet.</li>\n\n<li>You can\u2019t activate device protection features at this time.</li></string>
-    <!-- Text alerting that Wi-Fi couldn't connect (tablet) [CHAR LIMIT=NONE] -->
-    <string name="wifi_connect_failed_message" product="tablet">The tablet was unable to connect to this Wi\u2011Fi network.</string>
-    <!-- Text alerting that Wi-Fi couldn't connect (device) [CHAR LIMIT=NONE] -->
-    <string name="wifi_connect_failed_message" product="device">The device was unable to connect to this Wi\u2011Fi network.</string>
-    <!-- Text alerting that Wi-Fi couldn't connect (phone) [CHAR LIMIT=NONE] -->
-    <string name="wifi_connect_failed_message" product="default">The phone was unable to connect to this Wi\u2011Fi network.</string>
 
     <!-- Wi-Fi Advanced Settings --> <skip />
     <!-- Wi-Fi settings screen, Saved networks, settings section.  This is a header shown above Saved networks wifi settings. [CHAR LIMIT=30] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a18fde3..ce7ddaa 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -93,22 +93,6 @@
         <item name="android:windowContentOverlay">@null</item>
     </style>
 
-    <style name="Preference">
-        <item name="android:layout">@layout/preference_material_settings</item>
-    </style>
-
-    <style name="SyncSwitchPreference" parent="Preference">
-        <item name="android:widgetLayout">@layout/preference_widget_sync_toggle</item>
-    </style>
-
-    <style name="EditTextPreference" parent="@*android:style/Preference.Material.DialogPreference.EditTextPreference">
-        <item name="android:dialogLayout">@layout/preference_dialog_edittext</item>
-    </style>
-
-    <style name="PreferenceTheme" parent="@*android:style/PreferenceTheme">
-        <item name="android:scrollbars">vertical</item>
-    </style>
-
     <style name="PreferenceHeaderPanelSinglePane">
         <item name="android:layout_marginStart">0dp</item>
         <item name="android:layout_marginEnd">0dp</item>
@@ -156,21 +140,6 @@
         <item name="android:scrollbarStyle">outsideOverlay</item>
     </style>
 
-    <style name="PreferenceFragmentStyle" parent="@*android:style/PreferenceFragment.Material">
-        <item name="android:layout">@layout/preference_list_fragment</item>
-    </style>
-
-    <style name="VertDivider">
-        <item name="android:layout_width">@dimen/vert_divider_width</item>
-        <item name="android:layout_height">fill_parent</item>
-        <item name="android:background">@color/divider_color</item>
-        <item name="android:focusable">false</item>
-        <item name="android:clickable">false</item>
-    </style>
-
-    <style name="TextAppearance.SetupWizardDescription" parent="@android:style/TextAppearance.Material.Subhead">
-    </style>
-
     <style name="TrimmedHorizontalProgressBar" parent="android:Widget.Material.ProgressBar.Horizontal">
         <item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_material_trimmed</item>
         <item name="android:minHeight">3dip</item>
@@ -324,10 +293,6 @@
     <!-- Scrollbar style OUTSIDE_OVERLAY -->
     <integer name="preference_scrollbar_style">33554432</integer>
 
-    <style name="ApnPreference">
-        <item name="android:layout">@layout/apn_preference_layout</item>
-    </style>
-
     <style name="AppListSwitchPreference" parent="@*android:style/Preference.Material.DialogPreference">
         <item name="android:widgetLayout">@*android:layout/preference_widget_switch</item>
     </style>
diff --git a/res/values/styles_preference.xml b/res/values/styles_preference.xml
new file mode 100644
index 0000000..a504166
--- /dev/null
+++ b/res/values/styles_preference.xml
@@ -0,0 +1,58 @@
+<?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.
+  -->
+
+<!-- This file only contains custom attribute and style definition for preferences -->
+<!-- Things unrelated to preference framework UI customization should go to other styles files -->
+<resources>
+    <style name="ApnPreference">
+        <item name="android:layout">@layout/apn_preference_layout</item>
+    </style>
+
+    <style name="EditTextPreference"
+           parent="@style/Preference.DialogPreference.EditTextPreference.Material">
+        <item name="android:layout">@layout/preference_material_settings</item>
+        <item name="android:dialogLayout">@layout/preference_dialog_edittext</item>
+    </style>
+
+    <style name="PreferenceFragmentStyle" parent="@*android:style/PreferenceFragment.Material">
+        <item name="android:layout">@layout/preference_list_fragment</item>
+    </style>
+
+    <style name="SettingsPreference">
+        <item name="android:layout">@layout/preference_material_settings</item>
+    </style>
+
+    <style name="SettingsDropdownPreference">
+        <item name="android:layout">@layout/preference_dropdown_material_settings</item>
+    </style>
+
+    <style name="SettingsDialogPreference" parent="SettingsPreference"/>
+
+    <style name="SettingsPreferenceCategory" parent="@style/Preference.Category.Material">
+        <item name="android:layout">@layout/preference_category_material_settings</item>
+    </style>
+
+    <style name="SettingsSwitchPreference" parent="SettingsPreference">
+        <item name="widgetLayout">@*android:layout/preference_widget_switch</item>
+        <item name="switchTextOn">@*android:string/capital_on</item>
+        <item name="switchTextOff">@*android:string/capital_off</item>
+    </style>
+
+    <style name="SyncSwitchPreference" parent="SettingsPreference">
+        <item name="android:widgetLayout">@layout/preference_widget_sync_toggle</item>
+    </style>
+</resources>
\ No newline at end of file
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 6b765f7..02bf523 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -22,13 +22,6 @@
     <attr name="side_margin" format="reference|dimension" />
     <attr name="wifi_signal_color" format="reference" />
 
-    <style name="SetupWizardDisableAppStartingTheme">
-        <!-- Theme to disable the app starting window. The actual theme of the activity needs to
-             be then set in code via setTheme or onApplyThemeResource. -->
-        <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
-        <item name="android:windowBackground">@null</item>
-    </style>
-
     <style name="SetupWizardTheme" parent="SuwThemeGlif">
         <!-- For all Alert Dialogs -->
         <item name="android:alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
@@ -88,11 +81,16 @@
     </style>
 
     <style name="PreferenceTheme" parent="@style/PreferenceThemeOverlay.v14.Material">
-        <item name="android:preferenceStyle">@style/Preference</item>
-        <item name="android:editTextPreferenceStyle">@style/EditTextPreference</item>
-        <item name="dropdownPreferenceStyle">@style/Preference.DropDown.Material</item>
-        <item name="android:preferenceFragmentStyle">@style/PreferenceFragmentStyle</item>
+        <!-- Parent path frameworks/support/v14/preference/res/values/themes.xml -->
+        <item name="android:scrollbars">vertical</item>
         <item name="apnPreferenceStyle">@style/ApnPreference</item>
+        <item name="dialogPreferenceStyle">@style/SettingsDialogPreference</item>
+        <item name="dropdownPreferenceStyle">@style/SettingsDropdownPreference</item>
+        <item name="editTextPreferenceStyle">@style/EditTextPreference</item>
+        <item name="preferenceCategoryStyle">@style/SettingsPreferenceCategory</item>
+        <item name="preferenceFragmentStyle">@style/PreferenceFragmentStyle</item>
+        <item name="preferenceStyle">@style/SettingsPreference</item>
+        <item name="switchPreferenceStyle">@style/SettingsSwitchPreference</item>
     </style>
 
     <style name="PreferenceTheme.SetupWizard" parent="PreferenceTheme">
@@ -124,6 +122,7 @@
 
     <style name="Theme.Settings" parent="Theme.SettingsBase">
         <item name="preferenceTheme">@style/PreferenceTheme</item>
+        <item name="android:listPreferredItemHeight">72dip</item>
         <item name="*android:preferenceHeaderPanelStyle">@style/PreferenceHeaderPanelSinglePane</item>
         <item name="*android:preferencePanelStyle">@style/PreferencePanelSinglePane</item>
         <item name="*android:preferenceListStyle">@style/PreferenceHeaderListSinglePane</item>
diff --git a/res/xml/about_legal.xml b/res/xml/about_legal.xml
index 48e81f4..596effe 100644
--- a/res/xml/about_legal.xml
+++ b/res/xml/about_legal.xml
@@ -15,7 +15,7 @@
 -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-    android:title="@string/legal_information">
+                  android:title="@string/legal_information">
 
     <!-- Note: The titles given here probably won't be used.  Instead, we programmatically
        fill the title with the label of the activity with the corresponding action.
@@ -23,38 +23,37 @@
        list. -->
 
     <!-- Copyright information -->
-    <PreferenceScreen
+    <Preference
         android:key="copyright"
         android:title="@string/copyright_title">
-        <intent android:action="android.settings.COPYRIGHT" />
-    </PreferenceScreen>
+        <intent android:action="android.settings.COPYRIGHT"/>
+    </Preference>
 
     <!-- License information -->
-    <PreferenceScreen
+    <Preference
         android:key="license"
         android:title="@string/license_title">
-        <intent android:action="android.settings.LICENSE" />
-    </PreferenceScreen>
+        <intent android:action="android.settings.LICENSE"/>
+    </Preference>
 
     <!-- Terms and conditions -->
-    <PreferenceScreen
+    <Preference
         android:key="terms"
         android:title="@string/terms_title">
-        <intent android:action="android.settings.TERMS" />
-    </PreferenceScreen>
+        <intent android:action="android.settings.TERMS"/>
+    </Preference>
 
     <!-- System WebView License information -->
-    <PreferenceScreen
+    <Preference
         android:key="webview_license"
         android:title="@string/webview_license_title">
-        <intent android:action="android.settings.WEBVIEW_LICENSE" />
-    </PreferenceScreen>
+        <intent android:action="android.settings.WEBVIEW_LICENSE"/>
+    </Preference>
 
     <Preference
         android:key="wallpaper_attributions"
         android:title="@string/wallpaper_attributions"
-        android:summary="@string/wallpaper_attributions_values"
-        />
+        android:summary="@string/wallpaper_attributions_values"/>
 
 </PreferenceScreen>
 
diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index 11cde5e..8bb54c6 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -15,7 +15,6 @@
 -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
         android:title="@string/accessibility_settings"
         android:persistent="true">
 
@@ -28,17 +27,17 @@
             android:key="system_category"
             android:title="@string/accessibility_system_title">
 
-        <PreferenceScreen
+        <Preference
             android:fragment="com.android.settings.accessibility.CaptionPropertiesFragment"
             android:key="captioning_preference_screen"
             android:title="@string/accessibility_captioning_title" />
 
-        <PreferenceScreen
+        <Preference
             android:fragment="com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragment"
             android:key="screen_magnification_preference_screen"
             android:title="@string/accessibility_screen_magnification_title"/>
 
-        <PreferenceScreen
+        <Preference
             android:fragment="com.android.settings.accessibility.ToggleFontSizePreferenceFragment"
             android:key="font_size_preference_screen"
             android:title="@string/title_font_size"/>
@@ -47,7 +46,7 @@
             android:key="screen_zoom"
             android:title="@string/screen_zoom_title"/>
 
-        <PreferenceScreen
+        <Preference
             android:fragment="com.android.settings.accessibility.ToggleAutoclickPreferenceFragment"
             android:key="autoclick_preference_screen"
             android:title="@string/accessibility_autoclick_preference_title"/>
@@ -82,12 +81,13 @@
                 android:summary="@string/accessibility_toggle_master_mono_summary"
                 android:persistent="false"/>
 
-        <PreferenceScreen
+        <Preference
                 android:fragment="com.android.settings.accessibility.ToggleGlobalGesturePreferenceFragment"
                 android:key="enable_global_gesture_preference_screen"
                 android:title="@string/accessibility_global_gesture_preference_title"/>
 
-        <PreferenceScreen android:key="tts_settings_preference"
+        <Preference
+                android:key="tts_settings_preference"
                 android:fragment="com.android.settings.tts.TextToSpeechSettings"
                 android:title="@string/tts_settings_title"/>
 
@@ -107,7 +107,7 @@
             android:title="@string/accessibility_display_inversion_preference_title"
             android:summary="@string/accessibility_display_inversion_preference_subtitle"
             android:persistent="false" />
-        <PreferenceScreen
+        <Preference
             android:fragment="com.android.settings.accessibility.ToggleDaltonizerPreferenceFragment"
             android:key="daltonizer_preference_screen"
             android:title="@string/accessibility_display_daltonizer_preference_title" />
diff --git a/res/xml/advanced_apps.xml b/res/xml/advanced_apps.xml
index 7e2e9cd..c17da05 100644
--- a/res/xml/advanced_apps.xml
+++ b/res/xml/advanced_apps.xml
@@ -29,11 +29,10 @@
     <PreferenceCategory
         android:title="@string/default_apps_title">
 
-        <PreferenceScreen
+        <Preference
             android:key="domain_urls"
             android:title="@string/domain_urls_title"
-            android:fragment="com.android.settings.applications.ManageDomainUrls">
-        </PreferenceScreen>
+            android:fragment="com.android.settings.applications.ManageDomainUrls" />
 
         <Preference
             android:key="assist_and_voice_input"
diff --git a/res/xml/app_default_settings.xml b/res/xml/app_default_settings.xml
index 932fa60..5da5326 100644
--- a/res/xml/app_default_settings.xml
+++ b/res/xml/app_default_settings.xml
@@ -64,8 +64,7 @@
     <Preference
         android:key="domain_urls"
         android:title="@string/domain_urls_title"
-        android:fragment="com.android.settings.applications.ManageDomainUrls">
-    </Preference>
+        android:fragment="com.android.settings.applications.ManageDomainUrls"/>
 
     <com.android.settings.WorkOnlyCategory
         android:key="work_defaults"
diff --git a/res/xml/date_time_prefs.xml b/res/xml/date_time_prefs.xml
index e573bbd..34d48f1 100644
--- a/res/xml/date_time_prefs.xml
+++ b/res/xml/date_time_prefs.xml
@@ -43,7 +43,7 @@
         android:summary="12:00am"
         />
 
-    <PreferenceScreen
+    <Preference
         android:fragment="com.android.settings.ZonePicker"
         android:key="timezone"
         android:title="@string/date_time_set_timezone"
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index d84b008..804ede9 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -22,7 +22,7 @@
             android:title="@*android:string/bugreport_title"
             android:dialogTitle="@*android:string/bugreport_title" />
 
-    <PreferenceScreen
+    <Preference
             android:key="local_backup_password"
             android:title="@string/local_backup_password_title"
             android:summary="@string/local_backup_password_summary_none"
@@ -31,7 +31,7 @@
                 android:action="android.settings.privacy.SET_FULL_BACKUP_PASSWORD"
                 android:targetPackage="com.android.settings"
                 android:targetClass="com.android.settings.SetFullBackupPassword" />
-    </PreferenceScreen>
+    </Preference>
 
     <com.android.settingslib.RestrictedSwitchPreference
         android:key="keep_screen_on"
@@ -57,13 +57,13 @@
         android:summary="@string/oem_unlock_enable_summary"
         settings:useAdditionalSummary="true"/>
 
-    <PreferenceScreen
+    <Preference
         android:key="running_apps"
         android:title="@string/runningservices_settings_title"
         android:summary="@string/runningservices_settings_summary"
         android:fragment="com.android.settings.applications.RunningServices" />
 
-    <PreferenceScreen
+    <Preference
         android:key="convert_to_file_encryption"
         android:title="@string/convert_to_file_encryption"
         android:summary="@string/convert_to_file_encryption_enabled"
@@ -94,11 +94,11 @@
         android:key="ota_disable_automatic_update"
         android:title="@string/ota_disable_automatic_update" />
 
-    <PreferenceScreen
+    <Preference
         android:key="demo_mode"
         android:title="@string/demo_mode">
         <intent android:action="com.android.settings.action.DEMO_MODE" />
-    </PreferenceScreen>
+    </Preference>
 
     <PreferenceCategory android:key="debug_debugging_category"
             android:title="@string/debug_debugging_category">
@@ -121,14 +121,14 @@
             android:title="@string/bugreport_in_power"
             android:summary="@string/bugreport_in_power_summary"/>
 
-        <PreferenceScreen android:key="mock_location_app"
+        <Preference android:key="mock_location_app"
             android:title="@string/mock_location_app" />
 
         <SwitchPreference
                 android:key="debug_view_attributes"
                 android:title="@string/debug_view_attributes" />
 
-        <PreferenceScreen android:key="debug_app"
+        <Preference android:key="debug_app"
                 android:title="@string/debug_app" />
 
         <SwitchPreference
diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
index 66cf8f4..cee2e70 100644
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -19,56 +19,54 @@
         android:title="@string/about_settings">
 
         <!-- System update settings - launches activity -->
-        <PreferenceScreen android:key="system_update_settings"
+        <Preference android:key="system_update_settings"
                 android:title="@string/system_update_settings_list_item_title"
                 android:summary="@string/system_update_settings_list_item_summary">
             <intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
-        </PreferenceScreen>
+        </Preference>
 
 
-        <PreferenceScreen android:key="additional_system_update_settings"
+        <Preference android:key="additional_system_update_settings"
                           android:title="@string/additional_system_update_settings_list_item_title">
             <intent android:action="android.intent.action.MAIN"
                     android:targetPackage="@string/additional_system_update"
                     android:targetClass="@string/additional_system_update_menu" />
-        </PreferenceScreen>
+        </Preference>
 
         <!-- Device status - launches activity -->
-        <PreferenceScreen android:key="status_info"
+        <Preference android:key="status_info"
                 android:title="@string/device_status"
                 android:summary="@string/device_status_summary"
-                android:fragment="com.android.settings.deviceinfo.Status">
-        </PreferenceScreen>
+                android:fragment="com.android.settings.deviceinfo.Status"/>
 
         <!-- Manual -->
-        <PreferenceScreen
+        <Preference
                 android:key="manual"
                 android:title="@string/manual">
             <intent android:action="android.settings.SHOW_MANUAL" />
-        </PreferenceScreen>
+        </Preference>
 
         <!-- Legal Information -->
-        <PreferenceScreen
+        <Preference
                 android:key="container"
                 android:title="@string/legal_information"
                 android:fragment="com.android.settings.LegalSettings" />
 
-        <PreferenceScreen
+        <Preference
                 android:key="regulatory_info"
                 android:title="@string/regulatory_labels">
             <intent android:action="android.settings.SHOW_REGULATORY_INFO" />
-        </PreferenceScreen>
+        </Preference>
 
-        <PreferenceScreen
+        <Preference
                 android:key="safety_info"
                 android:title="@string/safety_and_regulatory_info">
                 <intent android:action="android.settings.SHOW_SAFETY_AND_REGULATORY_INFO" />
-        </PreferenceScreen>
+        </Preference>
 
         <!-- Feedback on the device -->
-        <PreferenceScreen android:key="device_feedback"
-                android:title="@string/device_feedback">
-        </PreferenceScreen>
+        <Preference android:key="device_feedback"
+                android:title="@string/device_feedback" />
 
         <!-- Device hardware model -->
         <com.android.settings.DividerPreference
@@ -89,12 +87,12 @@
                 android:summary="@string/device_info_default"/>
 
         <!-- Security patch level -->
-        <PreferenceScreen android:key="security_patch"
+        <Preference android:key="security_patch"
                 android:title="@string/security_patch"
                 android:summary="@string/device_info_default">
                 <intent android:action="android.intent.action.VIEW"
                         android:data="https://source.android.com/security/bulletin/" />
-        </PreferenceScreen>
+        </Preference>
 
         <!-- Device FCC equipment id -->
         <com.android.settings.DividerPreference
diff --git a/res/xml/ia_display_settings.xml b/res/xml/ia_display_settings.xml
index 31b524a..756d551 100644
--- a/res/xml/ia_display_settings.xml
+++ b/res/xml/ia_display_settings.xml
@@ -61,7 +61,7 @@
                 settings:keywords="@string/keywords_display_auto_brightness"
                 android:summary="@string/auto_brightness_summary" />
 
-        <PreferenceScreen
+        <Preference
             android:key="font_size"
             android:title="@string/title_font_size"
             android:fragment="com.android.settings.accessibility.ToggleFontSizePreferenceFragment"
@@ -72,7 +72,7 @@
             android:title="@string/screen_zoom_title"
             settings:keywords="@string/screen_zoom_keywords" />
 
-        <PreferenceScreen
+        <Preference
             android:key="screensaver"
             android:title="@string/screensaver_settings_title"
             android:fragment="com.android.settings.DreamSettings" />
@@ -105,7 +105,7 @@
                 android:title="@string/tap_to_wake"
                 android:summary="@string/tap_to_wake_summary" />
 
-        <PreferenceScreen
+        <Preference
                 android:key="wifi_display"
                 android:title="@string/wifi_display_settings_title"
                 settings:keywords="@string/keywords_display_cast_screen"
diff --git a/res/xml/security_settings_misc.xml b/res/xml/security_settings_misc.xml
index 68a867e..d724b74 100644
--- a/res/xml/security_settings_misc.xml
+++ b/res/xml/security_settings_misc.xml
@@ -114,7 +114,7 @@
                 android:persistent="false"
                 android:fragment="com.android.settings.TrustAgentSettings"/>
 
-        <PreferenceScreen
+        <Preference
                 android:key="screen_pinning_settings"
                 android:title="@string/screen_pinning_title"
                 android:summary="@string/switch_off_text"
diff --git a/res/xml/sound_settings.xml b/res/xml/sound_settings.xml
index 227a650..c74d1f1 100644
--- a/res/xml/sound_settings.xml
+++ b/res/xml/sound_settings.xml
@@ -16,9 +16,9 @@
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                   xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
-        android:title="@string/sound_settings"
-        android:key="sound_settings"
-        settings:keywords="@string/keywords_sounds">
+          android:title="@string/sound_settings"
+          android:key="sound_settings"
+          settings:keywords="@string/keywords_sounds">
 
         <!-- Media volume -->
         <com.android.settings.notification.VolumeSeekBarPreference
@@ -87,7 +87,7 @@
                 android:key="cell_broadcast_settings"
                 android:title="@string/cell_broadcast_settings"
                 settings:useAdminDisabledSummary="true">
-                <intent
+                    <intent
                         android:action="android.intent.action.MAIN"
                         android:targetPackage="com.android.cellbroadcastreceiver"
                         android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastSettings" />
@@ -101,7 +101,7 @@
                 android:fragment="com.android.settings.notification.OtherSoundSettings" />
 
         <!-- Cast -->
-        <PreferenceScreen
+        <Preference
                 android:key="wifi_display"
                 android:title="@string/wifi_display_settings_title"
                 android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
diff --git a/res/xml/wifi_configure_settings.xml b/res/xml/wifi_configure_settings.xml
index 863007c..53fda71 100644
--- a/res/xml/wifi_configure_settings.xml
+++ b/res/xml/wifi_configure_settings.xml
@@ -35,11 +35,10 @@
         android:entries="@array/wifi_sleep_policy_entries"
         android:entryValues="@array/wifi_sleep_policy_values" />
 
-    <com.android.settings.AppListSwitchPreference
-        android:key="wifi_assistant"
-        android:title="@string/wifi_automatically_connect_title"
-        android:summary="@string/wifi_automatically_connect_summary"
-        android:dialogTitle="@string/wifi_select_assistant_dialog_title" />
+    <SwitchPreference
+      android:key="allow_recommendations"
+      android:title="@string/networking_allow_recommendations_title"
+      android:summary="@string/networking_allow_recommendations_summary"/>
 
     <SwitchPreference
         android:key="wifi_cellular_data_fallback"
diff --git a/src/com/android/settings/ActiveNetworkScorerDialog.java b/src/com/android/settings/ActiveNetworkScorerDialog.java
deleted file mode 100644
index ae04b58..0000000
--- a/src/com/android/settings/ActiveNetworkScorerDialog.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2014 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
- */
-
-package com.android.settings;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.net.NetworkScoreManager;
-import android.net.NetworkScorerAppManager;
-import android.net.NetworkScorerAppManager.NetworkScorerAppData;
-import android.os.Bundle;
-import android.os.UserHandle;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.app.AlertActivity;
-import com.android.internal.app.AlertController;
-
-/**
- * Dialog to allow a user to select a new network scorer.
- *
- * <p>Finishes with {@link #RESULT_CANCELED} in all circumstances unless the scorer is successfully
- * changed or was already set to the new value (in which case it finishes with {@link #RESULT_OK}).
- */
-public final class ActiveNetworkScorerDialog extends AlertActivity implements
-        DialogInterface.OnClickListener {
-    private static final String TAG = "ActiveNetScorerDlg";
-
-    private String mNewPackageName;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        Intent intent = getIntent();
-        mNewPackageName = intent.getStringExtra(NetworkScoreManager.EXTRA_PACKAGE_NAME);
-
-        if (!buildDialog()) {
-            finish();
-        }
-    }
-
-    @Override
-    public void onClick(DialogInterface dialog, int which) {
-        switch (which) {
-            case BUTTON_POSITIVE:
-                NetworkScoreManager nsm =
-                    (NetworkScoreManager) getSystemService(Context.NETWORK_SCORE_SERVICE);
-                if (nsm.setActiveScorer(mNewPackageName)) {
-                    setResult(RESULT_OK);
-                }
-                break;
-            case BUTTON_NEGATIVE:
-                break;
-        }
-    }
-
-    private boolean buildDialog() {
-        // TOOD: http://b/23422763
-        if (UserHandle.myUserId() != UserHandle.USER_SYSTEM) {
-            Log.i(TAG, "Can only set scorer for owner/system user.");
-            return false;
-        }
-        NetworkScorerAppManager networkScorerAppManager = new NetworkScorerAppManager(this);
-        NetworkScorerAppData newScorer = networkScorerAppManager.getScorer(mNewPackageName);
-        if (newScorer == null) {
-            Log.e(TAG, "New package " + mNewPackageName + " is not a valid scorer.");
-            return false;
-        }
-
-        NetworkScorerAppData oldScorer = networkScorerAppManager.getActiveScorer();
-        if (oldScorer != null && TextUtils.equals(oldScorer.mPackageName, mNewPackageName)) {
-            Log.i(TAG, "New package " + mNewPackageName + " is already the active scorer.");
-            // Set RESULT_OK to indicate to the caller that the "switch" was successful.
-            setResult(RESULT_OK);
-            return false;
-        }
-
-        // Compose dialog.
-        CharSequence newName = newScorer.mScorerName;
-        final AlertController.AlertParams p = mAlertParams;
-        p.mTitle = getString(R.string.network_scorer_change_active_dialog_title);
-        if (oldScorer != null) {
-            p.mMessage = getString(R.string.network_scorer_change_active_dialog_text, newName,
-                    oldScorer.mScorerName);
-        } else {
-            p.mMessage = getString(R.string.network_scorer_change_active_no_previous_dialog_text,
-                    newName);
-        }
-        p.mPositiveButtonText = getString(R.string.yes);
-        p.mNegativeButtonText = getString(R.string.no);
-        p.mPositiveButtonListener = this;
-        p.mNegativeButtonListener = this;
-        setupAlert();
-
-        return true;
-    }
-}
diff --git a/src/com/android/settings/ApnEditor.java b/src/com/android/settings/ApnEditor.java
index 061c18a..f97811c 100644
--- a/src/com/android/settings/ApnEditor.java
+++ b/src/com/android/settings/ApnEditor.java
@@ -759,6 +759,8 @@
     public void onViewCreated(View view, Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
         view.setOnKeyListener(this);
+        view.setFocusableInTouchMode(true);
+        view.requestFocus();
     }
 
     public boolean onKey(View v, int keyCode, KeyEvent event) {
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 867fbfd..1ae3380 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -83,6 +83,8 @@
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.settings.applications.BackgroundCheckSummary;
 import com.android.settings.dashboard.DashboardFeatureProvider;
+import com.android.settings.development.BugReportPreferenceController;
+import com.android.settings.development.BugReportInPowerPreferenceController;
 import com.android.settings.fuelgauge.InactiveApps;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.search.BaseSearchIndexProvider;
@@ -129,8 +131,6 @@
     private static final String LOCAL_BACKUP_PASSWORD = "local_backup_password";
     private static final String HARDWARE_UI_PROPERTY = "persist.sys.ui.hw";
     private static final String MSAA_PROPERTY = "debug.egl.force_msaa";
-    private static final String BUGREPORT = "bugreport";
-    private static final String BUGREPORT_IN_POWER_KEY = "bugreport_in_power";
     private static final String OPENGL_TRACES_PROPERTY = "debug.egl.trace";
     private static final String TUNER_UI_KEY = "tuner_ui";
     private static final String COLOR_TEMPERATURE_PROPERTY = "persist.sys.debug.color_temp";
@@ -248,15 +248,13 @@
     private SwitchPreference mEnableAdb;
     private Preference mClearAdbKeys;
     private SwitchPreference mEnableTerminal;
-    private Preference mBugreport;
-    private SwitchPreference mBugreportInPower;
     private RestrictedSwitchPreference mKeepScreenOn;
     private SwitchPreference mBtHciSnoopLog;
     private RestrictedSwitchPreference mEnableOemUnlock;
     private SwitchPreference mDebugViewAttributes;
     private SwitchPreference mForceAllowOnExternal;
 
-    private PreferenceScreen mPassword;
+    private Preference mPassword;
     private String mDebugApp;
     private Preference mDebugAppPref;
 
@@ -330,6 +328,8 @@
     private boolean mLogpersistCleared;
     private Dialog mLogpersistClearDialog;
     private DashboardFeatureProvider mDashboardFeatureProvider;
+    private BugReportPreferenceController mBugReportController;
+    private BugReportInPowerPreferenceController mBugReportInPowerController;
 
     public DevelopmentSettings() {
         super(UserManager.DISALLOW_DEBUGGING_FEATURES);
@@ -365,6 +365,9 @@
 
         mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
 
+        mBugReportController = new BugReportPreferenceController(getActivity());
+        mBugReportInPowerController = new BugReportInPowerPreferenceController(getActivity());
+
         setIfOnlyAvailableForAdmins(true);
         if (isUiRestricted() || !Utils.isDeviceProvisioned(getActivity())) {
             // Block access to developer options if the user is not the owner, if user policy
@@ -392,8 +395,9 @@
             mEnableTerminal = null;
         }
 
-        mBugreport = findPreference(BUGREPORT);
-        mBugreportInPower = findAndInitSwitchPref(BUGREPORT_IN_POWER_KEY);
+        mBugReportController.displayPreference(getPreferenceScreen());
+        mBugReportInPowerController.displayPreference(getPreferenceScreen());
+
         mKeepScreenOn = (RestrictedSwitchPreference) findAndInitSwitchPref(KEEP_SCREEN_ON);
         mBtHciSnoopLog = findAndInitSwitchPref(BT_HCI_SNOOP_LOG);
         mEnableOemUnlock = (RestrictedSwitchPreference) findAndInitSwitchPref(ENABLE_OEM_UNLOCK);
@@ -404,7 +408,7 @@
 
         mDebugViewAttributes = findAndInitSwitchPref(DEBUG_VIEW_ATTRIBUTES);
         mForceAllowOnExternal = findAndInitSwitchPref(FORCE_ALLOW_ON_EXTERNAL_KEY);
-        mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD);
+        mPassword = findPreference(LOCAL_BACKUP_PASSWORD);
         mAllPrefs.add(mPassword);
 
         if (!mUm.isAdminUser()) {
@@ -492,8 +496,7 @@
             removePreferenceForProduction(hdcpChecking);
         }
 
-        PreferenceScreen convertFbePreference =
-                (PreferenceScreen) findPreference(KEY_CONVERT_FBE);
+        Preference convertFbePreference = findPreference(KEY_CONVERT_FBE);
 
         try {
             IBinder service = ServiceManager.getService("mount");
@@ -601,6 +604,7 @@
             Preference pref = mAllPrefs.get(i);
             pref.setEnabled(enabled && !mDisabledPrefs.contains(pref));
         }
+        mBugReportInPowerController.enablePreference(enabled);
         updateAllOptions();
     }
 
@@ -702,8 +706,7 @@
                     context.getPackageManager().getApplicationEnabledSetting(TERMINAL_APP_PACKAGE)
                             == PackageManager.COMPONENT_ENABLED_STATE_ENABLED);
         }
-        updateSwitchPreference(mBugreportInPower, Settings.Secure.getInt(cr,
-                Settings.Global.BUGREPORT_IN_POWER_MENU, 0) != 0);
+        mHaveDebugSettings |= mBugReportInPowerController.updatePreference();
         updateSwitchPreference(mKeepScreenOn, Settings.Global.getInt(cr,
                 Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
         updateSwitchPreference(mBtHciSnoopLog, Settings.Secure.getInt(cr,
@@ -765,6 +768,7 @@
                 onPreferenceTreeClick(cb);
             }
         }
+        mBugReportInPowerController.resetPreference();
         resetDebuggerOptions();
         writeLogpersistOption(null, true);
         writeLogdSizeOption(null);
@@ -1076,19 +1080,8 @@
     }
 
     private void updateBugreportOptions() {
-        mBugreport.setEnabled(true);
-        mBugreportInPower.setEnabled(true);
-        setBugreportStorageProviderStatus();
-    }
-
-    private void setBugreportStorageProviderStatus() {
-        final ComponentName componentName = new ComponentName("com.android.shell",
-                "com.android.shell.BugreportStorageProvider");
-        final boolean enabled = mBugreportInPower.isChecked();
-        getPackageManager().setComponentEnabledSetting(componentName,
-                enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
-                        : PackageManager.COMPONENT_ENABLED_STATE_DEFAULT,
-                0);
+        mBugReportController.enablePreference(true);
+        mBugReportInPowerController.updateBugreportOptions();
     }
 
     // Returns the current state of the system property that controls
@@ -1951,6 +1944,10 @@
             return false;
         }
 
+        if (mBugReportInPowerController.handlePreferenceTreeClick(preference)) {
+            return true;
+        }
+
         if (preference == mEnableAdb) {
             if (mEnableAdb.isChecked()) {
                 mDialogClicked = false;
@@ -1981,11 +1978,6 @@
             pm.setApplicationEnabledSetting(TERMINAL_APP_PACKAGE,
                     mEnableTerminal.isChecked() ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                             : PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
-        } else if (preference == mBugreportInPower) {
-            Settings.Secure.putInt(getActivity().getContentResolver(),
-                    Settings.Global.BUGREPORT_IN_POWER_MENU,
-                    mBugreportInPower.isChecked() ? 1 : 0);
-            setBugreportStorageProviderStatus();
         } else if (preference == mKeepScreenOn) {
             Settings.Global.putInt(getActivity().getContentResolver(),
                     Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index eeb4779..ddf0dec 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -1164,7 +1164,7 @@
 
     void setImsConfigProvisionedState(int configItem, boolean state) {
         if (phone != null && mImsManager != null) {
-            QueuedWork.singleThreadExecutor().submit(new Runnable() {
+            QueuedWork.queue(new Runnable() {
                 public void run() {
                     try {
                         mImsManager.getConfigInterface().setProvisionedValue(
@@ -1174,7 +1174,7 @@
                         Log.e(TAG, "setImsConfigProvisioned() exception:", e);
                     }
                 }
-            });
+            }, false);
         }
     }
 
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index fe25a8f..aa76517 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -253,7 +253,7 @@
             String action = intent.getAction();
             if (action.equals(Intent.ACTION_USER_ADDED)
                     || action.equals(Intent.ACTION_USER_REMOVED)) {
-                Index.getInstance(getApplicationContext()).update();
+                mSearchFeatureProvider.updateIndex(getApplicationContext());
             }
         }
     };
@@ -310,7 +310,7 @@
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
-        Index.getInstance(this).update();
+        mSearchFeatureProvider.updateIndex(getApplicationContext());
     }
 
     @Override
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 5f42579..ee500a9 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -48,6 +48,7 @@
 import com.android.settings.core.InstrumentedPreferenceFragment;
 import com.android.settings.core.instrumentation.Instrumentable;
 import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import com.android.settings.widget.FooterPreferenceMixin;
 import com.android.settingslib.HelpUtils;
 
 import java.util.UUID;
@@ -70,6 +71,9 @@
 
     private static final String SAVE_HIGHLIGHTED_KEY = "android:preference_highlighted";
 
+    protected final FooterPreferenceMixin mFooterPreferenceMixin =
+            new FooterPreferenceMixin(this, getLifecycle());
+
     private SettingsDialogFragment mDialogFragment;
 
     private String mHelpUri;
@@ -123,7 +127,6 @@
 
     private LayoutPreference mHeader;
 
-    private LayoutPreference mFooter;
     private View mEmptyView;
     private LinearLayoutManager mLayoutManager;
     private HighlightablePreferenceGroupAdapter mAdapter;
@@ -277,10 +280,6 @@
         return mHeader;
     }
 
-    public LayoutPreference getFooterView() {
-        return mFooter;
-    }
-
     protected void setHeaderView(int resource) {
         mHeader = new LayoutPreference(getPrefContext(), resource);
         addPreferenceToTop(mHeader);
@@ -298,29 +297,6 @@
         }
     }
 
-    protected void setFooterView(int resource) {
-        setFooterView(resource != 0 ? new LayoutPreference(getPrefContext(), resource) : null);
-    }
-
-    protected void setFooterView(View v) {
-        setFooterView(v != null ? new LayoutPreference(getPrefContext(), v) : null);
-    }
-
-    private void setFooterView(LayoutPreference footer) {
-        if (getPreferenceScreen() != null && mFooter != null) {
-            getPreferenceScreen().removePreference(mFooter);
-        }
-        if (footer != null) {
-            mFooter = footer;
-            mFooter.setOrder(ORDER_LAST);
-            if (getPreferenceScreen() != null) {
-                getPreferenceScreen().addPreference(mFooter);
-            }
-        } else {
-            mFooter = null;
-        }
-    }
-
     @Override
     public void setPreferenceScreen(PreferenceScreen preferenceScreen) {
         if (preferenceScreen != null && !preferenceScreen.isAttached()) {
@@ -332,9 +308,6 @@
             if (mHeader != null) {
                 preferenceScreen.addPreference(mHeader);
             }
-            if (mFooter != null) {
-                preferenceScreen.addPreference(mFooter);
-            }
         }
     }
 
@@ -343,7 +316,7 @@
         if (getPreferenceScreen() != null) {
             boolean show = (getPreferenceScreen().getPreferenceCount()
                     - (mHeader != null ? 1 : 0)
-                    - (mFooter != null ? 1 : 0)) <= 0;
+                    - (mFooterPreferenceMixin.hasFooter() ? 1 : 0)) <= 0;
             mEmptyView.setVisibility(show ? View.VISIBLE : View.GONE);
         } else {
             mEmptyView.setVisibility(View.VISIBLE);
diff --git a/src/com/android/settings/SetupWizardUtils.java b/src/com/android/settings/SetupWizardUtils.java
index 5563c3b..a0a3719 100644
--- a/src/com/android/settings/SetupWizardUtils.java
+++ b/src/com/android/settings/SetupWizardUtils.java
@@ -16,11 +16,8 @@
 
 package com.android.settings;
 
-import android.app.Activity;
-import android.app.Dialog;
 import android.content.Intent;
 
-import com.android.setupwizardlib.util.SystemBarHelper;
 import com.android.setupwizardlib.util.WizardManagerHelper;
 
 public class SetupWizardUtils {
@@ -41,22 +38,6 @@
         }
     }
 
-    /**
-     * Sets the immersive mode related flags based on the extra in the intent which started the
-     * activity.
-     */
-    public static void setImmersiveMode(Activity activity) {
-        final boolean useImmersiveMode = activity.getIntent().getBooleanExtra(
-                WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE, false);
-        if (useImmersiveMode) {
-            SystemBarHelper.hideSystemBars(activity.getWindow());
-        }
-    }
-
-    public static void applyImmersiveFlags(final Dialog dialog) {
-        SystemBarHelper.hideSystemBars(dialog);
-    }
-
     public static void copySetupExtras(Intent fromIntent, Intent toIntent) {
         toIntent.putExtra(WizardManagerHelper.EXTRA_THEME,
                 fromIntent.getStringExtra(WizardManagerHelper.EXTRA_THEME));
diff --git a/src/com/android/settings/accessibility/AccessibilitySettings.java b/src/com/android/settings/accessibility/AccessibilitySettings.java
index f0c77fc..af5b5cd 100644
--- a/src/com/android/settings/accessibility/AccessibilitySettings.java
+++ b/src/com/android/settings/accessibility/AccessibilitySettings.java
@@ -33,7 +33,6 @@
 import android.support.v7.preference.ListPreference;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceCategory;
-import android.support.v7.preference.PreferenceScreen;
 import android.text.TextUtils;
 import android.view.KeyCharacterMap;
 import android.view.KeyEvent;
@@ -185,12 +184,12 @@
     private SwitchPreference mToggleMasterMonoPreference;
     private ListPreference mSelectLongPressTimeoutPreference;
     private Preference mNoServicesMessagePreference;
-    private PreferenceScreen mCaptioningPreferenceScreen;
-    private PreferenceScreen mDisplayMagnificationPreferenceScreen;
-    private PreferenceScreen mFontSizePreferenceScreen;
-    private PreferenceScreen mAutoclickPreferenceScreen;
-    private PreferenceScreen mGlobalGesturePreferenceScreen;
-    private PreferenceScreen mDisplayDaltonizerPreferenceScreen;
+    private Preference mCaptioningPreferenceScreen;
+    private Preference mDisplayMagnificationPreferenceScreen;
+    private Preference mFontSizePreferenceScreen;
+    private Preference mAutoclickPreferenceScreen;
+    private Preference mGlobalGesturePreferenceScreen;
+    private Preference mDisplayDaltonizerPreferenceScreen;
     private SwitchPreference mToggleInversionPreference;
 
     private int mLongPressTimeoutDefault;
@@ -408,28 +407,24 @@
         }
 
         // Captioning.
-        mCaptioningPreferenceScreen = (PreferenceScreen) findPreference(
-                CAPTIONING_PREFERENCE_SCREEN);
+        mCaptioningPreferenceScreen = findPreference(CAPTIONING_PREFERENCE_SCREEN);
 
         // Display magnification.
-        mDisplayMagnificationPreferenceScreen = (PreferenceScreen) findPreference(
+        mDisplayMagnificationPreferenceScreen = findPreference(
                 DISPLAY_MAGNIFICATION_PREFERENCE_SCREEN);
 
         // Font size.
-        mFontSizePreferenceScreen = (PreferenceScreen) findPreference(
-                FONT_SIZE_PREFERENCE_SCREEN);
+        mFontSizePreferenceScreen = findPreference(FONT_SIZE_PREFERENCE_SCREEN);
 
         // Autoclick after pointer stops.
-        mAutoclickPreferenceScreen = (PreferenceScreen) findPreference(
-                AUTOCLICK_PREFERENCE_SCREEN);
+        mAutoclickPreferenceScreen = findPreference(AUTOCLICK_PREFERENCE_SCREEN);
 
         // Display color adjustments.
-        mDisplayDaltonizerPreferenceScreen = (PreferenceScreen) findPreference(
-                DISPLAY_DALTONIZER_PREFERENCE_SCREEN);
+        mDisplayDaltonizerPreferenceScreen = findPreference(DISPLAY_DALTONIZER_PREFERENCE_SCREEN);
 
         // Global gesture.
-        mGlobalGesturePreferenceScreen =
-                (PreferenceScreen) findPreference(ENABLE_ACCESSIBILITY_GESTURE_PREFERENCE_SCREEN);
+        mGlobalGesturePreferenceScreen = findPreference(
+                ENABLE_ACCESSIBILITY_GESTURE_PREFERENCE_SCREEN);
         final int longPressOnPowerBehavior = getActivity().getResources().getInteger(
                 com.android.internal.R.integer.config_longPressOnPowerBehavior);
         final int LONG_PRESS_POWER_GLOBAL_ACTIONS = 1;
@@ -468,7 +463,8 @@
         for (int i = 0, count = installedServices.size(); i < count; ++i) {
             AccessibilityServiceInfo info = installedServices.get(i);
 
-            RestrictedPreference preference = new RestrictedPreference(getActivity());
+            RestrictedPreference preference =
+                    new RestrictedPreference(mServicesCategory.getContext());
             String title = info.getResolveInfo().loadLabel(getPackageManager()).toString();
 
             ServiceInfo serviceInfo = info.getResolveInfo().serviceInfo;
@@ -702,7 +698,7 @@
         @Override
         public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
                boolean enabled) {
-            List<SearchIndexableResource> indexables = new ArrayList<SearchIndexableResource>();
+            List<SearchIndexableResource> indexables = new ArrayList<>();
             SearchIndexableResource indexable = new SearchIndexableResource(context);
             indexable.xmlResId = R.xml.accessibility_settings;
             indexables.add(indexable);
diff --git a/src/com/android/settings/accounts/AccountPreferenceController.java b/src/com/android/settings/accounts/AccountPreferenceController.java
index 06d8c2d..219dd3a 100644
--- a/src/com/android/settings/accounts/AccountPreferenceController.java
+++ b/src/com/android/settings/accounts/AccountPreferenceController.java
@@ -62,6 +62,7 @@
 
 import static android.content.Intent.EXTRA_USER;
 import static android.os.UserManager.DISALLOW_MODIFY_ACCOUNTS;
+import static android.os.UserManager.DISALLOW_REMOVE_MANAGED_PROFILE;
 import static android.os.UserManager.DISALLOW_REMOVE_USER;
 import static android.provider.Settings.EXTRA_AUTHORITIES;
 
@@ -171,7 +172,7 @@
                     rawData.add(data);
                 }
                 if (userInfo.isManagedProfile()) {
-                    if (!mHelper.hasBaseUserRestriction(DISALLOW_REMOVE_USER,
+                    if (!mHelper.hasBaseUserRestriction(DISALLOW_REMOVE_MANAGED_PROFILE,
                         UserHandle.myUserId())) {
                         SearchIndexableRaw data = new SearchIndexableRaw(mContext);
                         data.title = res.getString(R.string.remove_managed_profile_label);
@@ -305,7 +306,7 @@
                 mContext.getString(R.string.accessibility_category_work, workGroupSummary));
             profileData.removeWorkProfilePreference = newRemoveWorkProfilePreference(context);
             mHelper.enforceRestrictionOnPreference(profileData.removeWorkProfilePreference,
-                DISALLOW_REMOVE_USER, UserHandle.myUserId());
+                DISALLOW_REMOVE_MANAGED_PROFILE, UserHandle.myUserId());
             profileData.managedProfilePreference = newManagedProfileSettings();
         } else {
             preferenceGroup.setTitle(R.string.category_personal);
diff --git a/src/com/android/settings/applications/ApplicationFeatureProvider.java b/src/com/android/settings/applications/ApplicationFeatureProvider.java
index 8c7b257..bb0fd4c 100644
--- a/src/com/android/settings/applications/ApplicationFeatureProvider.java
+++ b/src/com/android/settings/applications/ApplicationFeatureProvider.java
@@ -35,7 +35,7 @@
     /**
      * Callback that receives the total number of packages installed on the device.
      */
-    public interface NumberOfInstalledAppsCallback {
+    interface NumberOfInstalledAppsCallback {
         void onNumberOfInstalledAppsResult(int num);
     }
 }
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index a967abf..1dd0471 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -50,6 +50,7 @@
 import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settings.search.Indexable;
 import com.android.settings.search.SearchIndexableRaw;
+import com.android.settings.widget.FooterPreference;
 import com.android.settings.widget.SwitchBar;
 import com.android.settingslib.bluetooth.BluetoothCallback;
 import com.android.settingslib.bluetooth.BluetoothDeviceFilter;
@@ -97,7 +98,7 @@
 
 
     // accessed from inner class (not private to avoid thunks)
-    Preference mMyDevicePreference;
+    FooterPreference mMyDevicePreference;
 
     private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
         @Override
@@ -120,7 +121,7 @@
                 final Resources res = context.getResources();
                 final Locale locale = res.getConfiguration().getLocales().get(0);
                 final BidiFormatter bidiFormatter = BidiFormatter.getInstance(locale);
-                mMyDevicePreference.setSummary(res.getString(
+                mMyDevicePreference.setTitle(res.getString(
                             R.string.bluetooth_is_visible_message,
                             bidiFormatter.unicodeWrap(mLocalAdapter.getName())));
             }
@@ -171,10 +172,8 @@
         mAvailableDevicesCategory.setOrder(2);
         getPreferenceScreen().addPreference(mAvailableDevicesCategory);
 
-        mMyDevicePreference = new Preference(getPrefContext());
+        mMyDevicePreference = mFooterPreferenceMixin.createFooterPreference();
         mMyDevicePreference.setSelectable(false);
-        mMyDevicePreference.setOrder(3);
-        getPreferenceScreen().addPreference(mMyDevicePreference);
 
         setHasOptionsMenu(true);
     }
@@ -356,7 +355,7 @@
                 final Resources res = getResources();
                 final Locale locale = res.getConfiguration().getLocales().get(0);
                 final BidiFormatter bidiFormatter = BidiFormatter.getInstance(locale);
-                mMyDevicePreference.setSummary(res.getString(
+                mMyDevicePreference.setTitle(res.getString(
                             R.string.bluetooth_is_visible_message,
                             bidiFormatter.unicodeWrap(mLocalAdapter.getName())));
 
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java b/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java
index 401b13c..6150920 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java
@@ -150,7 +150,7 @@
     static void persistDiscoveringTimestamp(final Context context) {
         // Load the shared preferences and edit it on a background
         // thread (but serialized!).
-        QueuedWork.singleThreadExecutor().submit(new Runnable() {
+        QueuedWork.queue(new Runnable() {
                 public void run() {
                     SharedPreferences.Editor editor = getSharedPreferences(context).edit();
                     editor.putLong(
@@ -158,7 +158,7 @@
                         System.currentTimeMillis());
                     editor.apply();
                 }
-            });
+            }, false);
     }
 
     static boolean hasDockAutoConnectSetting(Context context, String addr) {
diff --git a/src/com/android/settings/core/InstrumentedPreferenceFragment.java b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
index 1724d0c..3a4d0c2 100644
--- a/src/com/android/settings/core/InstrumentedPreferenceFragment.java
+++ b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
@@ -17,13 +17,21 @@
 package com.android.settings.core;
 
 import android.content.Context;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
 
 import com.android.settings.core.instrumentation.Instrumentable;
 import com.android.settings.core.instrumentation.MetricsFeatureProvider;
 import com.android.settings.core.instrumentation.VisibilityLoggerMixin;
 import com.android.settings.core.lifecycle.ObservablePreferenceFragment;
 import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.widget.PreferenceDividerDecoration;
+import com.android.settings.survey.SurveyMixin;
 
 /**
  * Instrumented fragment that logs visibility state.
@@ -48,9 +56,13 @@
     protected final int GESTURE_DOUBLE_TAP_SCREEN = PLACEHOLDER_METRIC + 11;
     protected final int GESTURE_DOUBLE_TWIST = PLACEHOLDER_METRIC + 12;
 
+    private final PreferenceDividerDecoration mDividerDecoration =
+            new PreferenceDividerDecoration();
+
     public InstrumentedPreferenceFragment() {
         // Mixin that logs visibility change for activity.
         getLifecycle().addObserver(new VisibilityLoggerMixin(getMetricsCategory()));
+        getLifecycle().addObserver(new SurveyMixin(this, getClass().getSimpleName()));
     }
 
     @Override
@@ -60,6 +72,20 @@
     }
 
     @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        final View view = super.onCreateView(inflater, container, savedInstanceState);
+        getListView().addItemDecoration(mDividerDecoration);
+        return view;
+    }
+
+    @Override
     public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
     }
+
+    @Override
+    public void setDivider(Drawable divider) {
+        mDividerDecoration.setDivider(divider);
+        super.setDivider(new ColorDrawable(Color.TRANSPARENT));
+    }
 }
diff --git a/src/com/android/settings/core/PreferenceController.java b/src/com/android/settings/core/PreferenceController.java
index 8f551de..01c998a 100644
--- a/src/com/android/settings/core/PreferenceController.java
+++ b/src/com/android/settings/core/PreferenceController.java
@@ -20,6 +20,7 @@
 import android.support.v7.preference.PreferenceScreen;
 
 import com.android.settings.search.SearchIndexableRaw;
+import com.android.settings.search2.ResultPayload;
 
 import java.util.List;
 
@@ -104,4 +105,11 @@
             screen.removePreference(pref);
         }
     }
+
+    /**
+     * @return the {@link ResultPayload} corresponding to the search result type for the preference.
+     */
+    public ResultPayload getResultPayload() {
+        return null;
+    }
 }
diff --git a/src/com/android/settings/core/lifecycle/Lifecycle.java b/src/com/android/settings/core/lifecycle/Lifecycle.java
index c47f97e..9a42cd9 100644
--- a/src/com/android/settings/core/lifecycle/Lifecycle.java
+++ b/src/com/android/settings/core/lifecycle/Lifecycle.java
@@ -18,6 +18,7 @@
 import android.annotation.UiThread;
 import android.content.Context;
 import android.os.Bundle;
+import android.support.v7.preference.PreferenceScreen;
 
 import com.android.settings.core.lifecycle.events.OnAttach;
 import com.android.settings.core.lifecycle.events.OnCreate;
@@ -27,6 +28,7 @@
 import com.android.settings.core.lifecycle.events.OnSaveInstanceState;
 import com.android.settings.core.lifecycle.events.OnStart;
 import com.android.settings.core.lifecycle.events.OnStop;
+import com.android.settings.core.lifecycle.events.SetPreferenceScreen;
 import com.android.settings.utils.ThreadUtils;
 
 import java.util.ArrayList;
@@ -73,6 +75,14 @@
         }
     }
 
+    public void setPreferenceScreen(PreferenceScreen preferenceScreen) {
+        for (LifecycleObserver observer : mObservers) {
+            if (observer instanceof SetPreferenceScreen) {
+                ((SetPreferenceScreen) observer).setPreferenceScreen(preferenceScreen);
+            }
+        }
+    }
+
     public void onResume() {
         for (LifecycleObserver observer : mObservers) {
             if (observer instanceof OnResume) {
diff --git a/src/com/android/settings/core/lifecycle/ObservablePreferenceFragment.java b/src/com/android/settings/core/lifecycle/ObservablePreferenceFragment.java
index f55b183..0a1a628 100644
--- a/src/com/android/settings/core/lifecycle/ObservablePreferenceFragment.java
+++ b/src/com/android/settings/core/lifecycle/ObservablePreferenceFragment.java
@@ -20,6 +20,7 @@
 import android.content.Context;
 import android.os.Bundle;
 import android.support.v14.preference.PreferenceFragment;
+import android.support.v7.preference.PreferenceScreen;
 
 /**
  * {@link PreferenceFragment} that has hooks to observe fragment lifecycle events.
@@ -46,6 +47,12 @@
         super.onCreate(savedInstanceState);
     }
 
+    @Override
+    public void setPreferenceScreen(PreferenceScreen preferenceScreen) {
+        mLifecycle.setPreferenceScreen(preferenceScreen);
+        super.setPreferenceScreen(preferenceScreen);
+    }
+
     @CallSuper
     @Override
     public void onSaveInstanceState(Bundle outState) {
diff --git a/src/com/android/settings/core/lifecycle/events/SetPreferenceScreen.java b/src/com/android/settings/core/lifecycle/events/SetPreferenceScreen.java
new file mode 100644
index 0000000..d206ed3
--- /dev/null
+++ b/src/com/android/settings/core/lifecycle/events/SetPreferenceScreen.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.core.lifecycle.events;
+
+import android.support.v7.preference.PreferenceScreen;
+
+public interface SetPreferenceScreen {
+
+    void setPreferenceScreen(PreferenceScreen preferenceScreen);
+}
diff --git a/src/com/android/settings/dashboard/DashboardFragment.java b/src/com/android/settings/dashboard/DashboardFragment.java
index 7dd8346..ab1ec13 100644
--- a/src/com/android/settings/dashboard/DashboardFragment.java
+++ b/src/com/android/settings/dashboard/DashboardFragment.java
@@ -17,9 +17,6 @@
 
 import android.app.Activity;
 import android.content.Context;
-import android.graphics.Color;
-import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.support.annotation.VisibleForTesting;
 import android.support.v7.preference.Preference;
@@ -58,7 +55,6 @@
     private final Map<Class, PreferenceController> mPreferenceControllers =
             new ArrayMap<>();
     private final Set<String> mDashboardTilePrefKeys = new ArraySet<>();
-    private DashboardDividerDecoration mDividerDecoration;
 
     protected ProgressiveDisclosureMixin mProgressiveDisclosureMixin;
     protected DashboardFeatureProvider mDashboardFeatureProvider;
@@ -99,9 +95,6 @@
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
             Bundle savedInstanceState) {
         final View view = super.onCreateView(inflater, container, savedInstanceState);
-        if (mDashboardFeatureProvider.isEnabled()) {
-            getListView().addItemDecoration(mDividerDecoration);
-        }
         return view;
     }
 
@@ -118,23 +111,10 @@
     @Override
     public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
         super.onCreatePreferences(savedInstanceState, rootKey);
-        mDividerDecoration = new DashboardDividerDecoration(getContext());
         refreshAllPreferences(getLogTag());
     }
 
     @Override
-    public void setDivider(Drawable divider) {
-        if (mDashboardFeatureProvider.isEnabled()) {
-            // Intercept divider and set it transparent so system divider decoration is disabled.
-            // We will use our decoration to draw divider more intelligently.
-            mDividerDecoration.setDivider(divider);
-            super.setDivider(new ColorDrawable(Color.TRANSPARENT));
-        } else {
-            super.setDivider(divider);
-        }
-    }
-
-    @Override
     public void onStart() {
         super.onStart();
         final DashboardCategory category =
diff --git a/src/com/android/settings/dashboard/SupportItemAdapter.java b/src/com/android/settings/dashboard/SupportItemAdapter.java
index 4e1ae78..b125fff 100644
--- a/src/com/android/settings/dashboard/SupportItemAdapter.java
+++ b/src/com/android/settings/dashboard/SupportItemAdapter.java
@@ -170,8 +170,13 @@
 
     public void setAccounts(Account accounts[]) {
         if (!Arrays.equals(mAccounts, accounts)) {
-            int index = ArrayUtils.indexOf(accounts, mAccounts[mSelectedAccountIndex]);
-            mSelectedAccountIndex = index != -1 ? index : 0;
+            if (mAccounts.length == 0) {
+                mSelectedAccountIndex = 0;
+            } else {
+                final int index = ArrayUtils.indexOf(accounts, mAccounts[mSelectedAccountIndex]);
+                mSelectedAccountIndex = index != -1 ? index : 0;
+            }
+
             mAccounts = accounts;
             mSupportFeatureProvider.refreshOperationRules();
             refreshEscalationCards();
diff --git a/src/com/android/settings/development/BugReportInPowerPreferenceController.java b/src/com/android/settings/development/BugReportInPowerPreferenceController.java
new file mode 100644
index 0000000..47b2d0d
--- /dev/null
+++ b/src/com/android/settings/development/BugReportInPowerPreferenceController.java
@@ -0,0 +1,119 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.development;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.os.UserManager;
+import android.provider.Settings;
+import android.support.v14.preference.SwitchPreference;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceScreen;
+
+import com.android.settings.core.PreferenceController;
+
+public class BugReportInPowerPreferenceController extends PreferenceController {
+
+    private static final String KEY_BUGREPORT_IN_POWER = "bugreport_in_power";
+
+    private UserManager mUserManager;
+    private SwitchPreference mPreference;
+
+    public BugReportInPowerPreferenceController(Context context) {
+        super(context);
+        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
+    }
+
+    @Override
+    public boolean handlePreferenceTreeClick(Preference preference) {
+        if (KEY_BUGREPORT_IN_POWER.equals(preference.getKey())) {
+            final SwitchPreference switchPreference = (SwitchPreference) preference;
+            Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Global.BUGREPORT_IN_POWER_MENU,
+                switchPreference.isChecked() ? 1 : 0);
+            setBugreportStorageProviderStatus();
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+        if (isAvailable()) {
+            mPreference = (SwitchPreference) screen.findPreference(KEY_BUGREPORT_IN_POWER);
+        }
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_BUGREPORT_IN_POWER;
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return !mUserManager.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES);
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        updatePreference();
+    }
+
+    public void enablePreference(boolean enabled) {
+        if (isAvailable()) {
+            mPreference.setEnabled(enabled);
+        }
+    }
+
+    public void resetPreference() {
+        if (mPreference.isChecked()) {
+            mPreference.setChecked(false);
+            handlePreferenceTreeClick(mPreference);
+        }
+    }
+
+    public boolean updatePreference() {
+        if (!isAvailable()) {
+            return false;
+        }
+        final boolean enabled = Settings.Secure.getInt(
+            mContext.getContentResolver(), Settings.Global.BUGREPORT_IN_POWER_MENU, 0) != 0;
+        mPreference.setChecked(enabled);
+        return enabled;
+    }
+
+    public void updateBugreportOptions() {
+        if (!isAvailable()) {
+            return;
+        }
+        mPreference.setEnabled(true);
+        setBugreportStorageProviderStatus();
+    }
+
+    private void setBugreportStorageProviderStatus() {
+        final ComponentName componentName = new ComponentName("com.android.shell",
+            "com.android.shell.BugreportStorageProvider");
+        final boolean enabled = mPreference.isChecked();
+        mContext.getPackageManager().setComponentEnabledSetting(componentName,
+            enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+                : PackageManager.COMPONENT_ENABLED_STATE_DEFAULT,
+            0);
+    }
+
+}
diff --git a/src/com/android/settings/development/BugReportPreferenceController.java b/src/com/android/settings/development/BugReportPreferenceController.java
new file mode 100644
index 0000000..371fb73
--- /dev/null
+++ b/src/com/android/settings/development/BugReportPreferenceController.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.development;
+
+import android.content.Context;
+import android.os.UserManager;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceScreen;
+
+import com.android.settings.core.PreferenceController;
+
+public class BugReportPreferenceController extends PreferenceController {
+
+    private static final String KEY_BUGREPORT = "bugreport";
+
+    private UserManager mUserManager;
+    private Preference mPreference;
+
+    public BugReportPreferenceController(Context context) {
+        super(context);
+        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+        if (isAvailable()) {
+            mPreference = screen.findPreference(KEY_BUGREPORT);
+        }
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_BUGREPORT;
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return !mUserManager.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES);
+    }
+
+    public void enablePreference(boolean enabled) {
+        if (isAvailable()) {
+            mPreference.setEnabled(enabled);
+        }
+    }
+
+}
diff --git a/src/com/android/settings/display/ScreenZoomPreference.java b/src/com/android/settings/display/ScreenZoomPreference.java
index ee2ac95..07f61f8 100644
--- a/src/com/android/settings/display/ScreenZoomPreference.java
+++ b/src/com/android/settings/display/ScreenZoomPreference.java
@@ -16,23 +16,23 @@
 
 package com.android.settings.display;
 
-import com.android.settingslib.display.DisplayDensityUtils;
-
 import android.content.Context;
 import android.support.v4.content.res.TypedArrayUtils;
-import android.support.v7.preference.PreferenceGroup;
+import android.support.v7.preference.Preference;
 import android.text.TextUtils;
 import android.util.AttributeSet;
 
+import com.android.settingslib.display.DisplayDensityUtils;
+
 /**
  * Preference for changing the density of the display on which the preference
  * is visible.
  */
-public class ScreenZoomPreference extends PreferenceGroup {
+public class ScreenZoomPreference extends Preference {
     public ScreenZoomPreference(Context context, AttributeSet attrs) {
         super(context, attrs, TypedArrayUtils.getAttr(context,
-                android.support.v7.preference.R.attr.preferenceScreenStyle,
-                android.R.attr.preferenceScreenStyle));
+                android.support.v7.preference.R.attr.preferenceStyle,
+                android.R.attr.preferenceStyle));
 
         if (TextUtils.isEmpty(getFragment())) {
             setFragment("com.android.settings.display.ScreenZoomSettings");
@@ -49,9 +49,4 @@
             setSummary(entries[currentIndex]);
         }
     }
-
-    @Override
-    protected boolean isOnSameScreenAsChildren() {
-        return false;
-    }
 }
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java b/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java
index bbaf54c..551564d 100644
--- a/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java
+++ b/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java
@@ -52,6 +52,7 @@
     private UserManager mUserManager;
     private boolean mHasPassword;
     private boolean mFingerprintUnlockDisabledByAdmin;
+    private TextView mErrorText;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -67,13 +68,41 @@
             setHeaderText(R.string.security_settings_fingerprint_enroll_introduction_title);
         }
 
-        final Button cancelButton = (Button) findViewById(R.id.fingerprint_cancel_button);
+        Button cancelButton = (Button) findViewById(R.id.fingerprint_cancel_button);
         cancelButton.setOnClickListener(this);
 
+        mErrorText = (TextView) findViewById(R.id.error_text);
+
         mUserManager = UserManager.get(this);
         updatePasswordQuality();
     }
 
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        final FingerprintManager fingerprintManager = Utils.getFingerprintManagerOrNull(this);
+        int errorMsg = 0;
+        if (fingerprintManager != null) {
+            final int max = getResources().getInteger(
+                    com.android.internal.R.integer.config_fingerprintMaxTemplatesPerUser);
+            final int numEnrolledFingerprints =
+                    fingerprintManager.getEnrolledFingerprints(mUserId).size();
+            if (numEnrolledFingerprints >= max) {
+                errorMsg = R.string.fingerprint_intro_error_max;
+            }
+        } else {
+            errorMsg = R.string.fingerprint_intro_error_unknown;
+        }
+        if (errorMsg == 0) {
+            mErrorText.setText(null);
+            getNextButton().setVisibility(View.VISIBLE);
+        } else {
+            mErrorText.setText(errorMsg);
+            getNextButton().setVisibility(View.GONE);
+        }
+    }
+
     private void updatePasswordQuality() {
         final int passwordQuality = new ChooseLockSettingsHelper(this).utils()
                 .getActivePasswordQuality(mUserManager.getCredentialOwnerProfile(mUserId));
diff --git a/src/com/android/settings/fingerprint/FingerprintSettings.java b/src/com/android/settings/fingerprint/FingerprintSettings.java
index 58060f3..0f48f8c 100644
--- a/src/com/android/settings/fingerprint/FingerprintSettings.java
+++ b/src/com/android/settings/fingerprint/FingerprintSettings.java
@@ -17,7 +17,6 @@
 package com.android.settings.fingerprint;
 
 
-import android.annotation.Nullable;
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.Dialog;
@@ -26,7 +25,6 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
-import android.content.pm.PackageManager;
 import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
 import android.hardware.fingerprint.Fingerprint;
@@ -49,15 +47,12 @@
 import android.text.SpannableString;
 import android.text.SpannableStringBuilder;
 import android.text.TextPaint;
-import android.text.method.LinkMovementMethod;
 import android.text.style.URLSpan;
 import android.util.AttributeSet;
 import android.util.Log;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.view.WindowManager;
 import android.widget.EditText;
-import android.widget.TextView;
 import android.widget.Toast;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -68,6 +63,8 @@
 import com.android.settings.SubSettings;
 import com.android.settings.Utils;
 import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import com.android.settings.widget.FooterPreference;
+import com.android.settings.widget.FooterPreferenceMixin;
 import com.android.settingslib.HelpUtils;
 import com.android.settingslib.RestrictedLockUtils;
 
@@ -298,21 +295,14 @@
                 mLaunchedConfirm = true;
                 launchChooseOrConfirmLock();
             }
-        }
 
-        @Override
-        public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-            super.onViewCreated(view, savedInstanceState);
-            TextView v = (TextView) LayoutInflater.from(view.getContext()).inflate(
-                    R.layout.fingerprint_settings_footer, null);
-            EnforcedAdmin admin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(
-                    getActivity(), DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT, mUserId);
-            v.setText(LearnMoreSpan.linkify(getText(admin != null
+            final FooterPreference pref = mFooterPreferenceMixin.createFooterPreference();
+            final EnforcedAdmin admin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(
+                    activity, DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT, mUserId);
+            pref.setTitle(LearnMoreSpan.linkify(getText(admin != null
                             ? R.string.security_settings_fingerprint_enroll_disclaimer_lockscreen_disabled
                             : R.string.security_settings_fingerprint_enroll_disclaimer),
                     getString(getHelpResource()), admin));
-            v.setMovementMethod(new LinkMovementMethod());
-            setFooterView(v);
         }
 
         protected void removeFingerprintPreference(int fingerprintId) {
diff --git a/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java b/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java
index 0e4501c..2c44f6d 100644
--- a/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java
+++ b/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java
@@ -19,7 +19,6 @@
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.Dialog;
-import android.app.DialogFragment;
 import android.app.FragmentManager;
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -93,7 +92,7 @@
                     .setTitle(R.string.setup_fingerprint_enroll_enrolling_skip_title)
                     .setMessage(R.string.setup_fingerprint_enroll_enrolling_skip_message)
                     .setCancelable(false)
-                    .setPositiveButton(R.string.wifi_skip_anyway,
+                    .setPositiveButton(R.string.skip_anyway_button_label,
                             new DialogInterface.OnClickListener() {
                                 @Override
                                 public void onClick(DialogInterface dialog, int id) {
@@ -104,7 +103,7 @@
                                     }
                                 }
                             })
-                    .setNegativeButton(R.string.wifi_dont_skip,
+                    .setNegativeButton(R.string.go_back_button_label,
                             new DialogInterface.OnClickListener() {
                                 @Override
                                 public void onClick(DialogInterface dialog, int id) {
diff --git a/src/com/android/settings/fuelgauge/HighPowerDetail.java b/src/com/android/settings/fuelgauge/HighPowerDetail.java
index 580c59f..a59dc78 100644
--- a/src/com/android/settings/fuelgauge/HighPowerDetail.java
+++ b/src/com/android/settings/fuelgauge/HighPowerDetail.java
@@ -138,7 +138,7 @@
     public void onDismiss(DialogInterface dialog) {
         super.onDismiss(dialog);
         Fragment target = getTargetFragment();
-        if (target != null) {
+        if (target != null && target.getActivity() != null) {
             target.onActivityResult(getTargetRequestCode(), 0, null);
         }
     }
diff --git a/src/com/android/settings/overlay/SurveyFeatureProvider.java b/src/com/android/settings/overlay/SurveyFeatureProvider.java
index 79e907f..907bed8 100644
--- a/src/com/android/settings/overlay/SurveyFeatureProvider.java
+++ b/src/com/android/settings/overlay/SurveyFeatureProvider.java
@@ -40,16 +40,46 @@
      *
      * @param activity The host activity to show the survey in.
      * @param surveyId A unique Id representing a survey to download.
+     * @return A boolean indicating if a survey was shown or not.
      */
-    void showSurveyIfAvailable(Activity activity, String surveyId);
+    boolean showSurveyIfAvailable(Activity activity, String surveyId);
 
     /**
      * A helper method to get the surveyId. Implementers should create a mapping of
      * keys to surveyIds and provide them via this function.
      *
      * @param context A valid context.
-     * @param key The key to get the surveyId for.
+     * @param simpleKey The simple name of the key to get the surveyId for.
      * @return The unique Id as a string or null on error.
      */
-    String getSurveyId(Context context, String key);
+    String getSurveyId(Context context, String simpleKey);
+
+    /**
+     * Removes the survey for {@code siteId} if it expired, then returns the expiration date (as a
+     * unix timestamp) for the remaining survey should it exist and be ready to show. Returns -1 if
+     * no valid survey exists after removing the potentially expired one.
+     *
+     * @param context the calling context.
+     * @param surveyId the site ID.
+     * @return the unix timestamp for the available survey for the given {@coe siteId} or -1 if
+     * there is none available.
+     */
+    long getSurveyExpirationDate(Context context, String surveyId);
+
+    /**
+     * Registers an activity to show surveys/prompts as soon as they are downloaded. The receiver
+     * should be unregistered prior to destroying the activity to avoid undefined behavior by
+     * calling {@link #unregisterReceiver(Activity, BroadcastReceiver)}.
+     * @param activity The activity that should show surveys once they are downloaded.
+     * @return the broadcast receiver listening for survey downloads. Must be unregistered before
+     * leaving the activity.
+     */
+    BroadcastReceiver createAndRegisterReceiver(Activity activity);
+
+    /**
+     * Unregisters the broadcast receiver for this activity. Should only be called once per activity
+     * after a call to {@link #createAndRegisterReceiver(Activity)}.
+     * @param activity The activity that was used to register the BroadcastReceiver.
+     */
+    void unregisterReceiver(Activity activity, BroadcastReceiver receiver);
 }
diff --git a/src/com/android/settings/password/SetNewPasswordActivity.java b/src/com/android/settings/password/SetNewPasswordActivity.java
index 585f4f4..4692609 100644
--- a/src/com/android/settings/password/SetNewPasswordActivity.java
+++ b/src/com/android/settings/password/SetNewPasswordActivity.java
@@ -50,7 +50,8 @@
             finish();
             return;
         }
-        mSetNewPasswordController = SetNewPasswordController.create(this, this, getIntent());
+        mSetNewPasswordController = SetNewPasswordController.create(
+                this, this, getIntent(), getActivityToken());
         mSetNewPasswordController.dispatchSetNewPasswordIntent();
     }
 
diff --git a/src/com/android/settings/password/SetNewPasswordController.java b/src/com/android/settings/password/SetNewPasswordController.java
index 00cf33e..9443541 100644
--- a/src/com/android/settings/password/SetNewPasswordController.java
+++ b/src/com/android/settings/password/SetNewPasswordController.java
@@ -29,6 +29,7 @@
 import android.content.pm.PackageManager;
 import android.hardware.fingerprint.FingerprintManager;
 import android.os.Bundle;
+import android.os.IBinder;
 import android.os.UserManager;
 
 import com.android.internal.annotations.VisibleForTesting;
@@ -60,14 +61,15 @@
     private final DevicePolicyManager mDevicePolicyManager;
     private final Ui mUi;
 
-    public static SetNewPasswordController create(Context context, Ui ui, Intent intent) {
+    public static SetNewPasswordController create(Context context, Ui ui, Intent intent,
+            IBinder activityToken) {
         // Trying to figure out which user is setting new password. If it is
         // ACTION_SET_NEW_PARENT_PROFILE_PASSWORD or the calling user is not allowed to set
         // separate profile challenge, it is the current user to set new password. Otherwise,
         // it is the user who starts this activity setting new password.
         int userId = ActivityManager.getCurrentUser();
         if (ACTION_SET_NEW_PASSWORD.equals(intent.getAction())) {
-            final int callingUserId = Utils.getSecureTargetUser(context.getActivityToken(),
+            final int callingUserId = Utils.getSecureTargetUser(activityToken,
                     UserManager.get(context), null, intent.getExtras()).getIdentifier();
             final LockPatternUtils lockPatternUtils = new LockPatternUtils(context);
             if (lockPatternUtils.isSeparateProfileChallengeAllowed(callingUserId)) {
diff --git a/src/com/android/settings/search/BaseSearchIndexProvider.java b/src/com/android/settings/search/BaseSearchIndexProvider.java
index 0fe1944..bb518ba 100644
--- a/src/com/android/settings/search/BaseSearchIndexProvider.java
+++ b/src/com/android/settings/search/BaseSearchIndexProvider.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.provider.SearchIndexableResource;
+import com.android.settings.core.PreferenceController;
 
 import java.util.Collections;
 import java.util.List;
@@ -46,4 +47,9 @@
     public List<String> getNonIndexableKeys(Context context) {
         return EMPTY_LIST;
     }
+
+    @Override
+    public List<PreferenceController> getPreferenceControllers(Context context) {
+        return null;
+    }
 }
diff --git a/src/com/android/settings/search/IndexDatabaseHelper.java b/src/com/android/settings/search/IndexDatabaseHelper.java
index cddee68..fcf5e7c 100644
--- a/src/com/android/settings/search/IndexDatabaseHelper.java
+++ b/src/com/android/settings/search/IndexDatabaseHelper.java
@@ -28,46 +28,48 @@
     private static final String TAG = "IndexDatabaseHelper";
 
     private static final String DATABASE_NAME = "search_index.db";
-    private static final int DATABASE_VERSION = 115;
+    private static final int DATABASE_VERSION = 116;
 
     private static final String INDEX = "index";
 
     public interface Tables {
-        public static final String TABLE_PREFS_INDEX = "prefs_index";
-        public static final String TABLE_META_INDEX = "meta_index";
-        public static final String TABLE_SAVED_QUERIES = "saved_queries";
+        String TABLE_PREFS_INDEX = "prefs_index";
+        String TABLE_META_INDEX = "meta_index";
+        String TABLE_SAVED_QUERIES = "saved_queries";
     }
 
     public interface IndexColumns {
-        public static final String DOCID = "docid";
-        public static final String LOCALE = "locale";
-        public static final String DATA_RANK = "data_rank";
-        public static final String DATA_TITLE = "data_title";
-        public static final String DATA_TITLE_NORMALIZED = "data_title_normalized";
-        public static final String DATA_SUMMARY_ON = "data_summary_on";
-        public static final String DATA_SUMMARY_ON_NORMALIZED = "data_summary_on_normalized";
-        public static final String DATA_SUMMARY_OFF = "data_summary_off";
-        public static final String DATA_SUMMARY_OFF_NORMALIZED = "data_summary_off_normalized";
-        public static final String DATA_ENTRIES = "data_entries";
-        public static final String DATA_KEYWORDS = "data_keywords";
-        public static final String CLASS_NAME = "class_name";
-        public static final String SCREEN_TITLE = "screen_title";
-        public static final String INTENT_ACTION = "intent_action";
-        public static final String INTENT_TARGET_PACKAGE = "intent_target_package";
-        public static final String INTENT_TARGET_CLASS = "intent_target_class";
-        public static final String ICON = "icon";
-        public static final String ENABLED = "enabled";
-        public static final String DATA_KEY_REF = "data_key_reference";
-        public static final String USER_ID = "user_id";
+        String DOCID = "docid";
+        String LOCALE = "locale";
+        String DATA_RANK = "data_rank";
+        String DATA_TITLE = "data_title";
+        String DATA_TITLE_NORMALIZED = "data_title_normalized";
+        String DATA_SUMMARY_ON = "data_summary_on";
+        String DATA_SUMMARY_ON_NORMALIZED = "data_summary_on_normalized";
+        String DATA_SUMMARY_OFF = "data_summary_off";
+        String DATA_SUMMARY_OFF_NORMALIZED = "data_summary_off_normalized";
+        String DATA_ENTRIES = "data_entries";
+        String DATA_KEYWORDS = "data_keywords";
+        String CLASS_NAME = "class_name";
+        String SCREEN_TITLE = "screen_title";
+        String INTENT_ACTION = "intent_action";
+        String INTENT_TARGET_PACKAGE = "intent_target_package";
+        String INTENT_TARGET_CLASS = "intent_target_class";
+        String ICON = "icon";
+        String ENABLED = "enabled";
+        String DATA_KEY_REF = "data_key_reference";
+        String USER_ID = "user_id";
+        String PAYLOAD_TYPE = "payload_type";
+        String PAYLOAD = "payload";
     }
 
     public interface MetaColumns {
-        public static final String BUILD = "build";
+        String BUILD = "build";
     }
 
     public interface SavedQueriesColums {
-        public static final String QUERY = "query";
-        public static final String TIME_STAMP = "timestamp";
+        String QUERY = "query";
+        String TIME_STAMP = "timestamp";
     }
 
     private static final String CREATE_INDEX_TABLE =
@@ -110,6 +112,10 @@
                     IndexColumns.DATA_KEY_REF +
                     ", " +
                     IndexColumns.USER_ID +
+                    ", " +
+                    IndexColumns.PAYLOAD_TYPE +
+                    ", " +
+                    IndexColumns.PAYLOAD +
                     ");";
 
     private static final String CREATE_META_TABLE =
diff --git a/src/com/android/settings/search/Indexable.java b/src/com/android/settings/search/Indexable.java
index e87d9dc..2ec4ac0 100644
--- a/src/com/android/settings/search/Indexable.java
+++ b/src/com/android/settings/search/Indexable.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.provider.SearchIndexableResource;
+import com.android.settings.core.PreferenceController;
 
 import java.util.List;
 
@@ -65,5 +66,11 @@
          * @return a list of {@link SearchIndexableRaw} references. Can be null.
          */
         List<String> getNonIndexableKeys(Context context);
+
+        /**
+         * @param context
+         * @return a list of {@link PreferenceController} for ResultPayload data during Indexing.
+         */
+        List<PreferenceController> getPreferenceControllers(Context context);
     }
 }
diff --git a/src/com/android/settings/search2/DatabaseIndexingManager.java b/src/com/android/settings/search2/DatabaseIndexingManager.java
new file mode 100644
index 0000000..fa482ef
--- /dev/null
+++ b/src/com/android/settings/search2/DatabaseIndexingManager.java
@@ -0,0 +1,1138 @@
+/*
+ * 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.
+ *
+ */
+
+package com.android.settings.search2;
+
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.XmlResourceParser;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteException;
+import android.database.sqlite.SQLiteFullException;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.provider.SearchIndexableData;
+import android.provider.SearchIndexableResource;
+import android.provider.SearchIndexablesContract;
+import android.text.TextUtils;
+import android.util.ArrayMap;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.Xml;
+
+import com.android.settings.core.PreferenceController;
+import com.android.settings.search.IndexDatabaseHelper;
+import com.android.settings.search.Indexable;
+import com.android.settings.search.Ranking;
+import com.android.settings.search.SearchIndexableRaw;
+import com.android.settings.search.SearchIndexableResources;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_CLASS_NAME;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_ENTRIES;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_ICON_RESID;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_INTENT_ACTION;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_INTENT_TARGET_CLASS;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_INTENT_TARGET_PACKAGE;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_KEY;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_KEYWORDS;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_RANK;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_SCREEN_TITLE;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_SUMMARY_OFF;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_SUMMARY_ON;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_TITLE;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_USER_ID;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_CLASS_NAME;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_ICON_RESID;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_ACTION;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RANK;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RESID;
+
+/**
+ * Consumes the SearchIndexableProvider content providers.
+ * Updates the Resource, Raw Data and non-indexable data for Search.
+ */
+public class DatabaseIndexingManager {
+    private static final String LOG_TAG = "DatabaseIndexingManager";
+
+    private static final String NODE_NAME_PREFERENCE_SCREEN = "PreferenceScreen";
+    private static final String NODE_NAME_CHECK_BOX_PREFERENCE = "CheckBoxPreference";
+    private static final String NODE_NAME_LIST_PREFERENCE = "ListPreference";
+
+    private static final List<String> EMPTY_LIST = Collections.<String>emptyList();
+
+    private final String mBaseAuthority;
+
+    /**
+     * A private class to describe the update data for the Index database
+     */
+    private static class UpdateData {
+        public List<SearchIndexableData> dataToUpdate;
+        public List<SearchIndexableData> dataToDelete;
+        public Map<String, List<String>> nonIndexableKeys;
+
+        public boolean forceUpdate;
+        public boolean fullIndex;
+
+        public UpdateData() {
+            dataToUpdate = new ArrayList<SearchIndexableData>();
+            dataToDelete = new ArrayList<SearchIndexableData>();
+            nonIndexableKeys = new HashMap<String, List<String>>();
+        }
+
+        public UpdateData(DatabaseIndexingManager.UpdateData other) {
+            dataToUpdate = new ArrayList<SearchIndexableData>(other.dataToUpdate);
+            dataToDelete = new ArrayList<SearchIndexableData>(other.dataToDelete);
+            nonIndexableKeys = new HashMap<String, List<String>>(other.nonIndexableKeys);
+            forceUpdate = other.forceUpdate;
+            fullIndex = other.fullIndex;
+        }
+
+        public DatabaseIndexingManager.UpdateData copy() {
+            return new DatabaseIndexingManager.UpdateData(this);
+        }
+
+        public void clear() {
+            dataToUpdate.clear();
+            dataToDelete.clear();
+            nonIndexableKeys.clear();
+            forceUpdate = false;
+            fullIndex = false;
+        }
+    }
+
+    private final AtomicBoolean mIsAvailable = new AtomicBoolean(false);
+    private final DatabaseIndexingManager.UpdateData mDataToProcess =
+            new DatabaseIndexingManager.UpdateData();
+    private Context mContext;
+
+    public DatabaseIndexingManager(Context context, String baseAuthority) {
+        mContext = context;
+        mBaseAuthority = baseAuthority;
+    }
+
+    public void setContext(Context context) {
+        mContext = context;
+    }
+
+    public boolean isAvailable() {
+        return mIsAvailable.get();
+    }
+
+    public void update() {
+        AsyncTask.execute(new Runnable() {
+            @Override
+            public void run() {
+                final Intent intent = new Intent(SearchIndexablesContract.PROVIDER_INTERFACE);
+                List<ResolveInfo> list =
+                        mContext.getPackageManager().queryIntentContentProviders(intent, 0);
+
+                final int size = list.size();
+                for (int n = 0; n < size; n++) {
+                    final ResolveInfo info = list.get(n);
+                    if (!DatabaseIndexingUtils.isWellKnownProvider(info, mContext)) {
+                        continue;
+                    }
+                    final String authority = info.providerInfo.authority;
+                    final String packageName = info.providerInfo.packageName;
+
+                    addIndexablesFromRemoteProvider(packageName, authority);
+                    addNonIndexablesKeysFromRemoteProvider(packageName, authority);
+                }
+
+                mDataToProcess.fullIndex = true;
+                updateInternal();
+            }
+        });
+    }
+
+    private boolean addIndexablesFromRemoteProvider(String packageName, String authority) {
+        try {
+            final int baseRank = Ranking.getBaseRankForAuthority(authority);
+
+            final Context context = mBaseAuthority.equals(authority) ?
+                    mContext : mContext.createPackageContext(packageName, 0);
+
+            final Uri uriForResources = buildUriForXmlResources(authority);
+            addIndexablesForXmlResourceUri(context, packageName, uriForResources,
+                    SearchIndexablesContract.INDEXABLES_XML_RES_COLUMNS, baseRank);
+
+            final Uri uriForRawData = buildUriForRawData(authority);
+            addIndexablesForRawDataUri(context, packageName, uriForRawData,
+                    SearchIndexablesContract.INDEXABLES_RAW_COLUMNS, baseRank);
+            return true;
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.w(LOG_TAG, "Could not create context for " + packageName + ": "
+                    + Log.getStackTraceString(e));
+            return false;
+        }
+    }
+
+    private void addNonIndexablesKeysFromRemoteProvider(String packageName,
+            String authority) {
+        final List<String> keys =
+                getNonIndexablesKeysFromRemoteProvider(packageName, authority);
+        addNonIndexableKeys(packageName, keys);
+    }
+
+    private List<String> getNonIndexablesKeysFromRemoteProvider(String packageName,
+            String authority) {
+        try {
+            final Context packageContext = mContext.createPackageContext(packageName, 0);
+
+            final Uri uriForNonIndexableKeys = buildUriForNonIndexableKeys(authority);
+            return getNonIndexablesKeys(packageContext, uriForNonIndexableKeys,
+                    SearchIndexablesContract.NON_INDEXABLES_KEYS_COLUMNS);
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.w(LOG_TAG, "Could not create context for " + packageName + ": "
+                    + Log.getStackTraceString(e));
+            return EMPTY_LIST;
+        }
+    }
+
+    private List<String> getNonIndexablesKeys(Context packageContext, Uri uri,
+            String[] projection) {
+
+        final ContentResolver resolver = packageContext.getContentResolver();
+        final Cursor cursor = resolver.query(uri, projection, null, null, null);
+
+        if (cursor == null) {
+            Log.w(LOG_TAG, "Cannot add index data for Uri: " + uri.toString());
+            return EMPTY_LIST;
+        }
+
+        List<String> result = new ArrayList<String>();
+        try {
+            final int count = cursor.getCount();
+            if (count > 0) {
+                while (cursor.moveToNext()) {
+                    final String key = cursor.getString(COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE);
+                    result.add(key);
+                }
+            }
+            return result;
+        } finally {
+            cursor.close();
+        }
+    }
+
+    public void addIndexableData(SearchIndexableData data) {
+        synchronized (mDataToProcess) {
+            mDataToProcess.dataToUpdate.add(data);
+        }
+    }
+
+    public void deleteIndexableData(SearchIndexableData data) {
+        synchronized (mDataToProcess) {
+            mDataToProcess.dataToDelete.add(data);
+        }
+    }
+
+    public void addNonIndexableKeys(String authority, List<String> keys) {
+        synchronized (mDataToProcess) {
+            mDataToProcess.nonIndexableKeys.put(authority, keys);
+        }
+    }
+
+    private void updateFromRemoteProvider(String packageName, String authority) {
+        if (addIndexablesFromRemoteProvider(packageName, authority)) {
+            updateInternal();
+        }
+    }
+
+    /**
+     * Update the Index for a specific class name resources
+     *
+     * @param className the class name (typically a fragment name).
+     * @param rebuild true means that you want to delete the data from the Index first.
+     * @param includeInSearchResults true means that you want the bit "enabled" set so that the
+     *                               data will be seen included into the search results
+     */
+    public void updateFromClassNameResource(String className, final boolean rebuild,
+            boolean includeInSearchResults) {
+        if (className == null) {
+            throw new IllegalArgumentException("class name cannot be null!");
+        }
+        final SearchIndexableResource res = SearchIndexableResources.getResourceByName(className);
+        if (res == null ) {
+            Log.e(LOG_TAG, "Cannot find SearchIndexableResources for class name: " + className);
+            return;
+        }
+        res.context = mContext;
+        res.enabled = includeInSearchResults;
+        AsyncTask.execute(new Runnable() {
+            @Override
+            public void run() {
+                if (rebuild) {
+                    deleteIndexableData(res);
+                }
+                addIndexableData(res);
+                mDataToProcess.forceUpdate = true;
+                updateInternal();
+                res.enabled = false;
+            }
+        });
+    }
+
+    public void updateFromSearchIndexableData(final SearchIndexableData data) {
+        AsyncTask.execute(new Runnable() {
+            @Override
+            public void run() {
+                addIndexableData(data);
+                mDataToProcess.forceUpdate = true;
+                updateInternal();
+            }
+        });
+    }
+
+    private SQLiteDatabase getReadableDatabase() {
+        return IndexDatabaseHelper.getInstance(mContext).getReadableDatabase();
+    }
+
+    private SQLiteDatabase getWritableDatabase() {
+        try {
+            return IndexDatabaseHelper.getInstance(mContext).getWritableDatabase();
+        } catch (SQLiteException e) {
+            Log.e(LOG_TAG, "Cannot open writable database", e);
+            return null;
+        }
+    }
+
+    private static Uri buildUriForXmlResources(String authority) {
+        return Uri.parse("content://" + authority + "/" +
+                SearchIndexablesContract.INDEXABLES_XML_RES_PATH);
+    }
+
+    private static Uri buildUriForRawData(String authority) {
+        return Uri.parse("content://" + authority + "/" +
+                SearchIndexablesContract.INDEXABLES_RAW_PATH);
+    }
+
+    private static Uri buildUriForNonIndexableKeys(String authority) {
+        return Uri.parse("content://" + authority + "/" +
+                SearchIndexablesContract.NON_INDEXABLES_KEYS_PATH);
+    }
+
+    private void updateInternal() {
+        synchronized (mDataToProcess) {
+            final DatabaseIndexingManager.UpdateIndexTask task =
+                    new DatabaseIndexingManager.UpdateIndexTask();
+            DatabaseIndexingManager.UpdateData copy = mDataToProcess.copy();
+            task.execute(copy);
+            mDataToProcess.clear();
+        }
+    }
+
+    private void addIndexablesForXmlResourceUri(Context packageContext, String packageName,
+            Uri uri, String[] projection, int baseRank) {
+
+        final ContentResolver resolver = packageContext.getContentResolver();
+        final Cursor cursor = resolver.query(uri, projection, null, null, null);
+
+        if (cursor == null) {
+            Log.w(LOG_TAG, "Cannot add index data for Uri: " + uri.toString());
+            return;
+        }
+
+        try {
+            final int count = cursor.getCount();
+            if (count > 0) {
+                while (cursor.moveToNext()) {
+                    final int providerRank = cursor.getInt(COLUMN_INDEX_XML_RES_RANK);
+                    final int rank = (providerRank > 0) ? baseRank + providerRank : baseRank;
+
+                    final int xmlResId = cursor.getInt(COLUMN_INDEX_XML_RES_RESID);
+
+                    final String className = cursor.getString(COLUMN_INDEX_XML_RES_CLASS_NAME);
+                    final int iconResId = cursor.getInt(COLUMN_INDEX_XML_RES_ICON_RESID);
+
+                    final String action = cursor.getString(COLUMN_INDEX_XML_RES_INTENT_ACTION);
+                    final String targetPackage = cursor.getString(
+                            COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE);
+                    final String targetClass = cursor.getString(
+                            COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS);
+
+                    SearchIndexableResource sir = new SearchIndexableResource(packageContext);
+                    sir.rank = rank;
+                    sir.xmlResId = xmlResId;
+                    sir.className = className;
+                    sir.packageName = packageName;
+                    sir.iconResId = iconResId;
+                    sir.intentAction = action;
+                    sir.intentTargetPackage = targetPackage;
+                    sir.intentTargetClass = targetClass;
+
+                    addIndexableData(sir);
+                }
+            }
+        } finally {
+            cursor.close();
+        }
+    }
+
+    private void addIndexablesForRawDataUri(Context packageContext, String packageName,
+            Uri uri, String[] projection, int baseRank) {
+
+        final ContentResolver resolver = packageContext.getContentResolver();
+        final Cursor cursor = resolver.query(uri, projection, null, null, null);
+
+        if (cursor == null) {
+            Log.w(LOG_TAG, "Cannot add index data for Uri: " + uri.toString());
+            return;
+        }
+
+        try {
+            final int count = cursor.getCount();
+            if (count > 0) {
+                while (cursor.moveToNext()) {
+                    final int providerRank = cursor.getInt(COLUMN_INDEX_RAW_RANK);
+                    final int rank = (providerRank > 0) ? baseRank + providerRank : baseRank;
+
+                    final String title = cursor.getString(COLUMN_INDEX_RAW_TITLE);
+                    final String summaryOn = cursor.getString(COLUMN_INDEX_RAW_SUMMARY_ON);
+                    final String summaryOff = cursor.getString(COLUMN_INDEX_RAW_SUMMARY_OFF);
+                    final String entries = cursor.getString(COLUMN_INDEX_RAW_ENTRIES);
+                    final String keywords = cursor.getString(COLUMN_INDEX_RAW_KEYWORDS);
+
+                    final String screenTitle = cursor.getString(COLUMN_INDEX_RAW_SCREEN_TITLE);
+
+                    final String className = cursor.getString(COLUMN_INDEX_RAW_CLASS_NAME);
+                    final int iconResId = cursor.getInt(COLUMN_INDEX_RAW_ICON_RESID);
+
+                    final String action = cursor.getString(COLUMN_INDEX_RAW_INTENT_ACTION);
+                    final String targetPackage = cursor.getString(
+                            COLUMN_INDEX_RAW_INTENT_TARGET_PACKAGE);
+                    final String targetClass = cursor.getString(
+                            COLUMN_INDEX_RAW_INTENT_TARGET_CLASS);
+
+                    final String key = cursor.getString(COLUMN_INDEX_RAW_KEY);
+                    final int userId = cursor.getInt(COLUMN_INDEX_RAW_USER_ID);
+
+                    SearchIndexableRaw data = new SearchIndexableRaw(packageContext);
+                    data.rank = rank;
+                    data.title = title;
+                    data.summaryOn = summaryOn;
+                    data.summaryOff = summaryOff;
+                    data.entries = entries;
+                    data.keywords = keywords;
+                    data.screenTitle = screenTitle;
+                    data.className = className;
+                    data.packageName = packageName;
+                    data.iconResId = iconResId;
+                    data.intentAction = action;
+                    data.intentTargetPackage = targetPackage;
+                    data.intentTargetClass = targetClass;
+                    data.key = key;
+                    data.userId = userId;
+
+                    addIndexableData(data);
+                }
+            }
+        } finally {
+            cursor.close();
+        }
+    }
+
+    public void indexOneSearchIndexableData(SQLiteDatabase database, String localeStr,
+            SearchIndexableData data, Map<String, List<String>> nonIndexableKeys) {
+        if (data instanceof SearchIndexableResource) {
+            indexOneResource(database, localeStr, (SearchIndexableResource) data, nonIndexableKeys);
+        } else if (data instanceof SearchIndexableRaw) {
+            indexOneRaw(database, localeStr, (SearchIndexableRaw) data);
+        }
+    }
+
+    private void indexOneRaw(SQLiteDatabase database, String localeStr,
+            SearchIndexableRaw raw) {
+        // Should be the same locale as the one we are processing
+        if (!raw.locale.toString().equalsIgnoreCase(localeStr)) {
+            return;
+        }
+
+        DatabaseRow.Builder builder = new DatabaseRow.Builder();
+        builder.setLocale(localeStr)
+                .setEntries(raw.entries)
+                .setClassName(raw.className)
+                .setScreenTitle(raw.screenTitle)
+                .setIconResId(raw.iconResId)
+                .setRank(raw.rank)
+                .setIntentAction(raw.intentAction)
+                .setIntentTargetPackage(raw.intentTargetPackage)
+                .setIntentTargetClass(raw.intentTargetClass)
+                .setEnabled(raw.enabled)
+                .setKey(raw.key)
+                .setUserId(raw.userId);
+
+        updateOneRowWithFilteredData(database, builder, raw.title, raw.summaryOn, raw.summaryOff,
+                raw.keywords);
+    }
+
+    private void indexOneResource(SQLiteDatabase database, String localeStr,
+            SearchIndexableResource sir, Map<String, List<String>> nonIndexableKeysFromResource) {
+
+        if (sir == null) {
+            Log.e(LOG_TAG, "Cannot index a null resource!");
+            return;
+        }
+
+        final List<String> nonIndexableKeys = new ArrayList<String>();
+
+        if (sir.xmlResId > SearchIndexableResources.NO_DATA_RES_ID) {
+            List<String> resNonIndxableKeys = nonIndexableKeysFromResource.get(sir.packageName);
+            if (resNonIndxableKeys != null && resNonIndxableKeys.size() > 0) {
+                nonIndexableKeys.addAll(resNonIndxableKeys);
+            }
+
+            indexFromResource(sir.context, database, localeStr,
+                    sir.xmlResId, sir.className, sir.iconResId, sir.rank,
+                    sir.intentAction, sir.intentTargetPackage, sir.intentTargetClass,
+                    nonIndexableKeys);
+        } else {
+            if (TextUtils.isEmpty(sir.className)) {
+                Log.w(LOG_TAG, "Cannot index an empty Search Provider name!");
+                return;
+            }
+
+            final Class<?> clazz = DatabaseIndexingUtils.getIndexableClass(sir.className);
+            if (clazz == null) {
+                Log.d(LOG_TAG, "SearchIndexableResource '" + sir.className +
+                        "' should implement the " + Indexable.class.getName() + " interface!");
+                return;
+            }
+
+            // Will be non null only for a Local provider implementing a
+            // SEARCH_INDEX_DATA_PROVIDER field
+            final Indexable.SearchIndexProvider provider =
+                    DatabaseIndexingUtils.getSearchIndexProvider(clazz);
+            if (provider != null) {
+                List<String> providerNonIndexableKeys = provider.getNonIndexableKeys(sir.context);
+                if (providerNonIndexableKeys != null && providerNonIndexableKeys.size() > 0) {
+                    nonIndexableKeys.addAll(providerNonIndexableKeys);
+                }
+
+                indexFromProvider(mContext, database, localeStr, provider, sir.className,
+                        sir.iconResId, sir.rank, sir.enabled, nonIndexableKeys);
+            }
+        }
+    }
+
+    private void indexFromResource(Context context, SQLiteDatabase database, String localeStr,
+            int xmlResId, String fragmentName, int iconResId, int rank,
+            String intentAction, String intentTargetPackage, String intentTargetClass,
+            List<String> nonIndexableKeys) {
+
+        XmlResourceParser parser = null;
+        try {
+            parser = context.getResources().getXml(xmlResId);
+
+            int type;
+            while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+                    && type != XmlPullParser.START_TAG) {
+                // Parse next until start tag is found
+            }
+
+            String nodeName = parser.getName();
+            if (!NODE_NAME_PREFERENCE_SCREEN.equals(nodeName)) {
+                throw new RuntimeException(
+                        "XML document must start with <PreferenceScreen> tag; found"
+                                + nodeName + " at " + parser.getPositionDescription());
+            }
+
+            final int outerDepth = parser.getDepth();
+            final AttributeSet attrs = Xml.asAttributeSet(parser);
+
+            final String screenTitle = XmlParserUtils.getDataTitle(context, attrs);
+
+            String key = XmlParserUtils.getDataKey(context, attrs);
+
+            String title;
+            String summary;
+            String keywords;
+            ResultPayload payload;
+
+            ArrayMap<String, PreferenceController> controllerUriMap = null;
+
+            if (fragmentName != null) {
+                controllerUriMap = (ArrayMap) DatabaseIndexingUtils
+                        .getPreferenceControllerUriMap(fragmentName, context);
+            }
+
+            // Insert rows for the main PreferenceScreen node. Rewrite the data for removing
+            // hyphens.
+            if (!nonIndexableKeys.contains(key)) {
+                title = XmlParserUtils.getDataTitle(context, attrs);
+                summary = XmlParserUtils.getDataSummary(context, attrs);
+                keywords = XmlParserUtils.getDataKeywords(context, attrs);
+
+                DatabaseRow.Builder builder = new DatabaseRow.Builder();
+                builder.setLocale(localeStr)
+                        .setEntries(null)
+                        .setClassName(fragmentName)
+                        .setScreenTitle(screenTitle)
+                        .setIconResId(iconResId)
+                        .setRank(rank)
+                        .setIntentAction(intentAction)
+                        .setIntentTargetPackage(intentTargetPackage)
+                        .setIntentTargetClass(intentTargetClass)
+                        .setEnabled(true)
+                        .setKey(key)
+                        .setUserId(-1 /* default user id */);
+
+                updateOneRowWithFilteredData(database, builder, title, summary,
+                        null /* summary off */, keywords);
+            }
+
+            while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+                    && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+                if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
+                    continue;
+                }
+
+                nodeName = parser.getName();
+
+                key = XmlParserUtils.getDataKey(context, attrs);
+                if (nonIndexableKeys.contains(key)) {
+                    continue;
+                }
+
+                title = XmlParserUtils.getDataTitle(context, attrs);
+                keywords = XmlParserUtils.getDataKeywords(context, attrs);
+
+                DatabaseRow.Builder builder = new DatabaseRow.Builder();
+                builder.setLocale(localeStr)
+                        .setClassName(fragmentName)
+                        .setScreenTitle(screenTitle)
+                        .setIconResId(iconResId)
+                        .setRank(rank)
+                        .setIntentAction(intentAction)
+                        .setIntentTargetPackage(intentTargetPackage)
+                        .setIntentTargetClass(intentTargetClass)
+                        .setEnabled(true)
+                        .setKey(key)
+                        .setUserId(-1 /* default user id */);
+
+                if (!nodeName.equals(NODE_NAME_CHECK_BOX_PREFERENCE)) {
+                    summary = XmlParserUtils.getDataSummary(context, attrs);
+
+                    String entries = null;
+
+                    if (nodeName.endsWith(NODE_NAME_LIST_PREFERENCE)) {
+                        entries = XmlParserUtils.getDataEntries(context, attrs);
+                    }
+
+                    payload = DatabaseIndexingUtils.getPayloadFromUriMap(controllerUriMap, key);
+
+                    builder.setEntries(entries)
+                            .setPayload(payload);
+
+                    // Insert rows for the child nodes of PreferenceScreen
+                    updateOneRowWithFilteredData(database, builder, title, summary,
+                            null /* summary off */, keywords);
+                } else {
+                    String summaryOn = XmlParserUtils.getDataSummaryOn(context, attrs);
+                    String summaryOff = XmlParserUtils.getDataSummaryOff(context, attrs);
+
+                    if (TextUtils.isEmpty(summaryOn) && TextUtils.isEmpty(summaryOff)) {
+                        summaryOn = XmlParserUtils.getDataSummary(context, attrs);
+                    }
+
+                    updateOneRowWithFilteredData(database, builder, title, summaryOn, summaryOff,
+                            keywords);
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new RuntimeException("Error parsing PreferenceScreen", e);
+        } catch (IOException e) {
+            throw new RuntimeException("Error parsing PreferenceScreen", e);
+        } finally {
+            if (parser != null) parser.close();
+        }
+    }
+
+    private void indexFromProvider(Context context, SQLiteDatabase database, String localeStr,
+            Indexable.SearchIndexProvider provider, String className, int iconResId, int rank,
+            boolean enabled, List<String> nonIndexableKeys) {
+
+        if (provider == null) {
+            Log.w(LOG_TAG, "Cannot find provider: " + className);
+            return;
+        }
+
+        final List<SearchIndexableRaw> rawList = provider.getRawDataToIndex(context, enabled);
+
+        if (rawList != null) {
+
+            final int rawSize = rawList.size();
+            for (int i = 0; i < rawSize; i++) {
+                SearchIndexableRaw raw = rawList.get(i);
+
+                // Should be the same locale as the one we are processing
+                if (!raw.locale.toString().equalsIgnoreCase(localeStr)) {
+                    continue;
+                }
+
+                if (nonIndexableKeys.contains(raw.key)) {
+                    continue;
+                }
+
+                DatabaseRow.Builder builder = new DatabaseRow.Builder();
+                builder.setLocale(localeStr)
+                        .setEntries(raw.entries)
+                        .setClassName(className)
+                        .setScreenTitle(raw.screenTitle)
+                        .setIconResId(iconResId)
+                        .setRank(rank)
+                        .setIntentAction(raw.intentAction)
+                        .setIntentTargetPackage(raw.intentTargetPackage)
+                        .setIntentTargetClass(raw.intentTargetClass)
+                        .setEnabled(raw.enabled)
+                        .setKey(raw.key)
+                        .setUserId(raw.userId);
+
+                updateOneRowWithFilteredData(database, builder, raw.title, raw.summaryOn,
+                        raw.summaryOff, raw.keywords);
+            }
+        }
+
+        final List<SearchIndexableResource> resList =
+                provider.getXmlResourcesToIndex(context, enabled);
+        if (resList != null) {
+            final int resSize = resList.size();
+            for (int i = 0; i < resSize; i++) {
+                SearchIndexableResource item = resList.get(i);
+
+                // Should be the same locale as the one we are processing
+                if (!item.locale.toString().equalsIgnoreCase(localeStr)) {
+                    continue;
+                }
+
+                final int itemIconResId = (item.iconResId == 0) ? iconResId : item.iconResId;
+                final int itemRank = (item.rank == 0) ? rank : item.rank;
+                String itemClassName = (TextUtils.isEmpty(item.className))
+                        ? className : item.className;
+
+                indexFromResource(context, database, localeStr,
+                        item.xmlResId, itemClassName, itemIconResId, itemRank,
+                        item.intentAction, item.intentTargetPackage,
+                        item.intentTargetClass, nonIndexableKeys);
+            }
+        }
+    }
+
+    private void updateOneRowWithFilteredData(SQLiteDatabase database, DatabaseRow.Builder builder,
+            String title, String summaryOn, String summaryOff,String keywords) {
+
+        final String updatedTitle = DatabaseIndexingUtils.normalizeHyphen(title);
+        final String updatedSummaryOn = DatabaseIndexingUtils.normalizeHyphen(summaryOn);
+        final String updatedSummaryOff = DatabaseIndexingUtils.normalizeHyphen(summaryOff);
+
+        final String normalizedTitle = DatabaseIndexingUtils.normalizeString(updatedTitle);
+        final String normalizedSummaryOn = DatabaseIndexingUtils.normalizeString(updatedSummaryOn);
+        final String normalizedSummaryOff = DatabaseIndexingUtils
+                .normalizeString(updatedSummaryOff);
+
+        final String spaceDelimitedKeywords = DatabaseIndexingUtils.normalizeKeywords(keywords);
+
+        builder.setUpdatedTitle(updatedTitle)
+                .setUpdatedSummaryOn(updatedSummaryOn)
+                .setUpdatedSummaryOff(updatedSummaryOff)
+                .setNormalizedTitle(normalizedTitle)
+                .setNormalizedSummaryOn(normalizedSummaryOn)
+                .setNormalizedSummaryOff(normalizedSummaryOff)
+                .setSpaceDelimitedKeywords(spaceDelimitedKeywords);
+
+        updateOneRow(database, builder.build());
+    }
+
+    private void updateOneRow(SQLiteDatabase database, DatabaseRow row) {
+
+        if (TextUtils.isEmpty(row.updatedTitle)) {
+            return;
+        }
+
+        // The DocID should contains more than the title string itself (you may have two settings
+        // with the same title). So we need to use a combination of the title and the screenTitle.
+        StringBuilder sb = new StringBuilder(row.updatedTitle);
+        sb.append(row.screenTitle);
+        int docId = sb.toString().hashCode();
+
+        ContentValues values = new ContentValues();
+        values.put(IndexDatabaseHelper.IndexColumns.DOCID, docId);
+        values.put(IndexDatabaseHelper.IndexColumns.LOCALE, row.locale);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_RANK, row.rank);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_TITLE, row.updatedTitle);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_TITLE_NORMALIZED, row.normalizedTitle);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_SUMMARY_ON, row.updatedSummaryOn);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_SUMMARY_ON_NORMALIZED,
+                row.normalizedSummaryOn);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_SUMMARY_OFF, row.updatedSummaryOff);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_SUMMARY_OFF_NORMALIZED,
+                row.normalizedSummaryOff);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_ENTRIES, row.entries);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_KEYWORDS, row.spaceDelimitedKeywords);
+        values.put(IndexDatabaseHelper.IndexColumns.CLASS_NAME, row.className);
+        values.put(IndexDatabaseHelper.IndexColumns.SCREEN_TITLE, row.screenTitle);
+        values.put(IndexDatabaseHelper.IndexColumns.INTENT_ACTION, row.intentAction);
+        values.put(IndexDatabaseHelper.IndexColumns.INTENT_TARGET_PACKAGE, row.intentTargetPackage);
+        values.put(IndexDatabaseHelper.IndexColumns.INTENT_TARGET_CLASS, row.intentTargetClass);
+        values.put(IndexDatabaseHelper.IndexColumns.ICON, row.iconResId);
+        values.put(IndexDatabaseHelper.IndexColumns.ENABLED, row.enabled);
+        values.put(IndexDatabaseHelper.IndexColumns.DATA_KEY_REF, row.key);
+        values.put(IndexDatabaseHelper.IndexColumns.USER_ID, row.userId);
+        values.put(IndexDatabaseHelper.IndexColumns.PAYLOAD_TYPE, row.payloadType);
+        values.put(IndexDatabaseHelper.IndexColumns.PAYLOAD, row.payload);
+
+        database.replaceOrThrow(IndexDatabaseHelper.Tables.TABLE_PREFS_INDEX, null, values);
+    }
+
+    /**
+     * A private class for updating the Index database
+     */
+    private class UpdateIndexTask extends AsyncTask<DatabaseIndexingManager.UpdateData, Integer,
+            Void> {
+
+        @Override
+        protected void onPreExecute() {
+            super.onPreExecute();
+            mIsAvailable.set(false);
+        }
+
+        @Override
+        protected void onPostExecute(Void aVoid) {
+            super.onPostExecute(aVoid);
+            mIsAvailable.set(true);
+        }
+
+        @Override
+        protected Void doInBackground(DatabaseIndexingManager.UpdateData... params) {
+            try {
+                final List<SearchIndexableData> dataToUpdate = params[0].dataToUpdate;
+                final List<SearchIndexableData> dataToDelete = params[0].dataToDelete;
+                final Map<String, List<String>> nonIndexableKeys = params[0].nonIndexableKeys;
+
+                final boolean forceUpdate = params[0].forceUpdate;
+                final boolean fullIndex = params[0].fullIndex;
+
+                final SQLiteDatabase database = getWritableDatabase();
+                if (database == null) {
+                    Log.e(LOG_TAG, "Cannot update Index as I cannot get a writable database");
+                    return null;
+                }
+                final String localeStr = Locale.getDefault().toString();
+
+                try {
+                    database.beginTransaction();
+                    if (dataToDelete.size() > 0) {
+                        processDataToDelete(database, localeStr, dataToDelete);
+                    }
+                    if (dataToUpdate.size() > 0) {
+                        processDataToUpdate(database, localeStr, dataToUpdate, nonIndexableKeys,
+                                forceUpdate);
+                    }
+                    database.setTransactionSuccessful();
+                } finally {
+                    database.endTransaction();
+                }
+                if (fullIndex) {
+                    IndexDatabaseHelper.setLocaleIndexed(mContext, localeStr);
+                }
+            } catch (SQLiteFullException e) {
+                Log.e(LOG_TAG, "Unable to index search, out of space", e);
+            }
+
+            return null;
+        }
+
+        private boolean processDataToUpdate(SQLiteDatabase database, String localeStr,
+                List<SearchIndexableData> dataToUpdate, Map<String, List<String>> nonIndexableKeys,
+                boolean forceUpdate) {
+
+            if (!forceUpdate && IndexDatabaseHelper.isLocaleAlreadyIndexed(mContext, localeStr)) {
+                Log.d(LOG_TAG, "Locale '" + localeStr + "' is already indexed");
+                return true;
+            }
+
+            boolean result = false;
+            final long current = System.currentTimeMillis();
+
+            final int count = dataToUpdate.size();
+            for (int n = 0; n < count; n++) {
+                final SearchIndexableData data = dataToUpdate.get(n);
+                try {
+                    indexOneSearchIndexableData(database, localeStr, data, nonIndexableKeys);
+                } catch (Exception e) {
+                    Log.e(LOG_TAG, "Cannot index: " + (data != null ? data.className : data)
+                            + " for locale: " + localeStr, e);
+                }
+            }
+
+            final long now = System.currentTimeMillis();
+            Log.d(LOG_TAG, "Indexing locale '" + localeStr + "' took " +
+                    (now - current) + " millis");
+            return result;
+        }
+
+        private boolean processDataToDelete(SQLiteDatabase database, String localeStr,
+                List<SearchIndexableData> dataToDelete) {
+
+            boolean result = false;
+            final long current = System.currentTimeMillis();
+
+            final int count = dataToDelete.size();
+            for (int n = 0; n < count; n++) {
+                final SearchIndexableData data = dataToDelete.get(n);
+                if (data == null) {
+                    continue;
+                }
+                if (!TextUtils.isEmpty(data.className)) {
+                    delete(database, IndexDatabaseHelper.IndexColumns.CLASS_NAME, data.className);
+                } else  {
+                    if (data instanceof SearchIndexableRaw) {
+                        final SearchIndexableRaw raw = (SearchIndexableRaw) data;
+                        if (!TextUtils.isEmpty(raw.title)) {
+                            delete(database, IndexDatabaseHelper.IndexColumns.DATA_TITLE,
+                                    raw.title);
+                        }
+                    }
+                }
+            }
+
+            final long now = System.currentTimeMillis();
+            Log.d(LOG_TAG, "Deleting data for locale '" + localeStr + "' took " +
+                    (now - current) + " millis");
+            return result;
+        }
+
+        private int delete(SQLiteDatabase database, String columName, String value) {
+            final String whereClause = columName + "=?";
+            final String[] whereArgs = new String[] { value };
+
+            return database.delete(IndexDatabaseHelper.Tables.TABLE_PREFS_INDEX, whereClause,
+                    whereArgs);
+        }
+    }
+
+    public static class DatabaseRow {
+        public final String locale;
+        public final String updatedTitle;
+        public final String normalizedTitle;
+        public final String updatedSummaryOn;
+        public final String normalizedSummaryOn;
+        public final String updatedSummaryOff;
+        public final String normalizedSummaryOff;
+        public final String entries;
+        public final String className;
+        public final String screenTitle;
+        public final int iconResId;
+        public final int rank;
+        public final String spaceDelimitedKeywords;
+        public final String intentAction;
+        public final String intentTargetPackage;
+        public final String intentTargetClass;
+        public final boolean enabled;
+        public final String key;
+        public final int userId;
+        public final int payloadType;
+        public final byte[] payload;
+
+        private DatabaseRow(Builder builder) {
+            locale = builder.mLocale;
+            updatedTitle = builder.mUpdatedTitle;
+            normalizedTitle = builder.mNormalizedTitle;
+            updatedSummaryOn = builder.mUpdatedSummaryOn;
+            normalizedSummaryOn = builder.mNormalizedSummaryOn;
+            updatedSummaryOff = builder.mUpdatedSummaryOff;
+            normalizedSummaryOff = builder.mNormalizedSummaryOff;
+            entries = builder.mEntries;
+            className = builder.mClassName;
+            screenTitle = builder.mScreenTitle;
+            iconResId = builder.mIconResId;
+            rank = builder.mRank;
+            spaceDelimitedKeywords = builder.mSpaceDelimitedKeywords;
+            intentAction = builder.mIntentAction;
+            intentTargetPackage = builder.mIntentTargetPackage;
+            intentTargetClass = builder.mIntentTargetClass;
+            enabled = builder.mEnabled;
+            key = builder.mKey;
+            userId = builder.mUserId;
+            payloadType = builder.mPayloadType;
+            payload = builder.mPayload != null ? ResultPayloadUtils.marshall(builder.mPayload)
+                    : null;
+        }
+
+        public static class Builder {
+            private String mLocale;
+            private String mUpdatedTitle;
+            private String mNormalizedTitle;
+            private String mUpdatedSummaryOn;
+            private String mNormalizedSummaryOn;
+            private String mUpdatedSummaryOff;
+            private String mNormalizedSummaryOff;
+            private String mEntries;
+            private String mClassName;
+            private String mScreenTitle;
+            private int mIconResId;
+            private int mRank;
+            private String mSpaceDelimitedKeywords;
+            private String mIntentAction;
+            private String mIntentTargetPackage;
+            private String mIntentTargetClass;
+            private boolean mEnabled;
+            private String mKey;
+            private int mUserId;
+            @ResultPayload.PayloadType private int mPayloadType;
+            private ResultPayload mPayload;
+
+            public Builder setLocale(String locale) {
+                mLocale = locale;
+                return this;
+            }
+
+            public Builder setUpdatedTitle(String updatedTitle) {
+                mUpdatedTitle = updatedTitle;
+                return this;
+            }
+
+            public Builder setNormalizedTitle(String normalizedTitle) {
+                mNormalizedTitle = normalizedTitle;
+                return this;
+            }
+
+            public Builder setUpdatedSummaryOn(String updatedSummaryOn) {
+                mUpdatedSummaryOn = updatedSummaryOn;
+                return this;
+            }
+
+            public Builder setNormalizedSummaryOn(String normalizedSummaryOn) {
+                mNormalizedSummaryOn = normalizedSummaryOn;
+                return this;
+            }
+
+            public Builder setUpdatedSummaryOff(String updatedSummaryOff) {
+                mUpdatedSummaryOff = updatedSummaryOff;
+                return this;
+            }
+
+            public Builder setNormalizedSummaryOff(String normalizedSummaryOff) {
+                this.mNormalizedSummaryOff = normalizedSummaryOff;
+                return this;
+            }
+
+            public Builder setEntries(String entries) {
+                mEntries = entries;
+                return this;
+            }
+
+            public Builder setClassName(String className) {
+                mClassName = className;
+                return this;
+            }
+
+            public Builder setScreenTitle(String screenTitle) {
+                mScreenTitle = screenTitle;
+                return this;
+            }
+
+            public Builder setIconResId(int iconResId) {
+                mIconResId = iconResId;
+                return this;
+            }
+
+            public Builder setRank(int rank) {
+                mRank = rank;
+                return this;
+            }
+
+            public Builder setSpaceDelimitedKeywords(String spaceDelimitedKeywords) {
+                mSpaceDelimitedKeywords = spaceDelimitedKeywords;
+                return this;
+            }
+
+            public Builder setIntentAction(String intentAction) {
+                mIntentAction = intentAction;
+                return this;
+            }
+
+            public Builder setIntentTargetPackage(String intentTargetPackage) {
+                mIntentTargetPackage = intentTargetPackage;
+                return this;
+            }
+
+            public Builder setIntentTargetClass(String intentTargetClass) {
+                mIntentTargetClass = intentTargetClass;
+                return this;
+            }
+
+            public Builder setEnabled(boolean enabled) {
+                mEnabled = enabled;
+                return this;
+            }
+
+            public Builder setKey(String key) {
+                mKey = key;
+                return this;
+            }
+
+            public Builder setUserId(int userId) {
+                mUserId = userId;
+                return this;
+            }
+
+            public Builder setPayload(ResultPayload payload) {
+                mPayload = payload;
+
+                if(mPayload != null) {
+                    setPayloadType(mPayload.getType());
+                }
+                return this;
+            }
+
+            /**
+             * Payload type is added when a Payload is added to the Builder in {setPayload}
+             * @param payloadType PayloadType
+             * @return The Builder
+             */
+            private Builder setPayloadType(@ResultPayload.PayloadType int payloadType) {
+                mPayloadType = payloadType;
+                return this;
+            }
+
+            public DatabaseRow build() {
+                return new DatabaseRow(this);
+            }
+        }
+    }
+}
diff --git a/src/com/android/settings/search2/DatabaseIndexingUtils.java b/src/com/android/settings/search2/DatabaseIndexingUtils.java
new file mode 100644
index 0000000..c7a7f92
--- /dev/null
+++ b/src/com/android/settings/search2/DatabaseIndexingUtils.java
@@ -0,0 +1,205 @@
+/*
+ * 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.
+ *
+ */
+
+package com.android.settings.search2;
+
+import android.Manifest;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.net.Uri;
+import android.text.TextUtils;
+import android.util.ArrayMap;
+import android.util.Log;
+
+import com.android.settings.core.PreferenceController;
+import com.android.settings.search.Indexable;
+
+import java.lang.reflect.Field;
+import java.text.Normalizer;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+/**
+ * Utility class for {@like DatabaseIndexingManager} to handle the mapping between Payloads
+ * and Preference controllers, and managing indexable classes.
+ */
+public class DatabaseIndexingUtils {
+
+    private static final String TAG = "IndexingUtil";
+
+    private static final String FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER =
+            "SEARCH_INDEX_DATA_PROVIDER";
+
+    private static final String NON_BREAKING_HYPHEN = "\u2011";
+    private static final String EMPTY = "";
+    private static final String LIST_DELIMITERS = "[,]\\s*";
+    private static final String HYPHEN = "-";
+    private static final String SPACE = " ";
+
+    private static final Pattern REMOVE_DIACRITICALS_PATTERN
+            = Pattern.compile("\\p{InCombiningDiacriticalMarks}+");
+
+    /**
+     * @param className which wil provide the map between from {@link Uri}s to
+     * {@link PreferenceController}
+     * @param context
+     * @return A map between {@link Uri}s and {@link PreferenceController}s to get the payload
+     * types for Settings.
+     */
+    public static Map<String, PreferenceController> getPreferenceControllerUriMap(
+            String className, Context context) {
+        final Class<?> clazz = getIndexableClass(className);
+
+        if (clazz == null) {
+            Log.d(TAG, "SearchIndexableResource '" + className +
+                    "' should implement the " + Indexable.class.getName() + " interface!");
+            return null;
+        }
+
+        // Will be non null only for a Local provider implementing a
+        // SEARCH_INDEX_DATA_PROVIDER field
+        final Indexable.SearchIndexProvider provider = getSearchIndexProvider(clazz);
+        List<PreferenceController> controllers =
+                provider.getPreferenceControllers(context);
+
+        if (controllers == null ) {
+            return null;
+        }
+
+        ArrayMap<String, PreferenceController> map = new ArrayMap<>();
+
+        for (PreferenceController controller : controllers) {
+            map.put(controller.getPreferenceKey(), controller);
+        }
+
+        return map;
+    }
+
+    /**
+     * @param uriMap Map between the {@link PreferenceController} keys and the controllers themselves.
+     * @param key The look up key
+     * @return The Payload from the {@link PreferenceController} specified by the key, if it exists.
+     * Otherwise null.
+     */
+    public static ResultPayload getPayloadFromUriMap(ArrayMap<String, PreferenceController> uriMap,
+            String key) {
+        if (uriMap == null) {
+            return null;
+        }
+
+        PreferenceController controller = uriMap.get(key);
+        if (controller == null) {
+            return null;
+        }
+
+        return controller.getResultPayload();
+    }
+
+    public static Class<?> getIndexableClass(String className) {
+        final Class<?> clazz;
+        try {
+            clazz = Class.forName(className);
+        } catch (ClassNotFoundException e) {
+            Log.d(TAG, "Cannot find class: " + className);
+            return null;
+        }
+        return isIndexableClass(clazz) ? clazz : null;
+    }
+
+    public static boolean isIndexableClass(final Class<?> clazz) {
+        return (clazz != null) && Indexable.class.isAssignableFrom(clazz);
+    }
+
+    public static Indexable.SearchIndexProvider getSearchIndexProvider(final Class<?> clazz) {
+        try {
+            final Field f = clazz.getField(FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER);
+            return (Indexable.SearchIndexProvider) f.get(null);
+        } catch (NoSuchFieldException e) {
+            Log.d(TAG, "Cannot find field '" + FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER + "'");
+        } catch (SecurityException se) {
+            Log.d(TAG,
+                    "Security exception for field '" + FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER + "'");
+        } catch (IllegalAccessException e) {
+            Log.d(TAG,
+                    "Illegal access to field '" + FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER + "'");
+        } catch (IllegalArgumentException e) {
+            Log.d(TAG,
+                    "Illegal argument when accessing field '" +
+                            FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER + "'");
+        }
+        return null;
+    }
+
+    /**
+     * Only allow a "well known" SearchIndexablesProvider. The provider should:
+     *
+     * - have read/write {@link Manifest.permission#READ_SEARCH_INDEXABLES}
+     * - be from a privileged package
+     */
+    public static boolean isWellKnownProvider(ResolveInfo info, Context context) {
+        final String authority = info.providerInfo.authority;
+        final String packageName = info.providerInfo.applicationInfo.packageName;
+
+        if (TextUtils.isEmpty(authority) || TextUtils.isEmpty(packageName)) {
+            return false;
+        }
+
+        final String readPermission = info.providerInfo.readPermission;
+        final String writePermission = info.providerInfo.writePermission;
+
+        if (TextUtils.isEmpty(readPermission) || TextUtils.isEmpty(writePermission)) {
+            return false;
+        }
+
+        if (!android.Manifest.permission.READ_SEARCH_INDEXABLES.equals(readPermission) ||
+                !android.Manifest.permission.READ_SEARCH_INDEXABLES.equals(writePermission)) {
+            return false;
+        }
+
+        return isPrivilegedPackage(packageName, context);
+    }
+
+    public static boolean isPrivilegedPackage(String packageName, Context context) {
+        final PackageManager pm = context.getPackageManager();
+        try {
+            PackageInfo packInfo = pm.getPackageInfo(packageName, 0);
+            return ((packInfo.applicationInfo.privateFlags
+                    & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0);
+        } catch (PackageManager.NameNotFoundException e) {
+            return false;
+        }
+    }
+
+    public static String normalizeHyphen(String input) {
+        return (input != null) ? input.replaceAll(NON_BREAKING_HYPHEN, HYPHEN) : EMPTY;
+    }
+
+    public static String normalizeString(String input) {
+        final String nohyphen = (input != null) ? input.replaceAll(HYPHEN, EMPTY) : EMPTY;
+        final String normalized = Normalizer.normalize(nohyphen, Normalizer.Form.NFD);
+
+        return REMOVE_DIACRITICALS_PATTERN.matcher(normalized).replaceAll("").toLowerCase();
+    }
+
+    public static String normalizeKeywords(String input) {
+        return (input != null) ? input.replaceAll(LIST_DELIMITERS, SPACE) : EMPTY;
+    }
+}
diff --git a/src/com/android/settings/search2/DatabaseResultLoader.java b/src/com/android/settings/search2/DatabaseResultLoader.java
index a4e614f..b268f6a 100644
--- a/src/com/android/settings/search2/DatabaseResultLoader.java
+++ b/src/com/android/settings/search2/DatabaseResultLoader.java
@@ -16,32 +16,37 @@
 
 package com.android.settings.search2;
 
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.PackageManager;
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
 import android.graphics.drawable.Drawable;
+import android.os.Bundle;
 import android.support.annotation.VisibleForTesting;
+import android.text.TextUtils;
+import android.util.Log;
 
-import com.android.settings.R;
+import com.android.settings.SettingsActivity;
+import com.android.settings.Utils;
 import com.android.settings.search.Index;
 import com.android.settings.search.IndexDatabaseHelper;
 import com.android.settings.utils.AsyncLoader;
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
-
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_ICON_RESID;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_RAW_SUMMARY_ON;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RANK;
+import java.util.Map;
 
 
 /**
  * AsyncTask to retrieve Settings, First party app and any intent based results.
  */
 public class DatabaseResultLoader extends AsyncLoader<List<SearchResult>> {
+    private static final String LOG = "DatabaseResultLoader";
     private final String mQueryText;
     private final Context mContext;
     protected final SQLiteDatabase mDatabase;
@@ -65,7 +70,7 @@
         }
 
         String query = getSQLQuery();
-        Cursor result  = mDatabase.rawQuery(query, null);
+        Cursor result = mDatabase.rawQuery(query, null);
 
         return parseCursorForSearch(result);
     }
@@ -78,10 +83,12 @@
 
     protected String getSQLQuery() {
         return String.format("SELECT data_rank, data_title, data_summary_on, " +
-                "data_summary_off, data_entries, data_keywords, class_name, screen_title, icon, " +
-                "intent_action, intent_target_package, intent_target_class, enabled, " +
-                "data_key_reference FROM prefs_index WHERE prefs_index MATCH 'data_title:%s* " +
-                "OR data_title_normalized:%s* OR data_keywords:%s*' AND locale = 'en_US'",
+                        "data_summary_off, data_entries, data_keywords, class_name, screen_title,"
+                        + " icon, " +
+                        "intent_action, intent_target_package, intent_target_class, enabled, " +
+                        "data_key_reference FROM prefs_index WHERE prefs_index MATCH "
+                        + "'data_title:%s* " +
+                        "OR data_title_normalized:%s* OR data_keywords:%s*' AND locale = 'en_US'",
                 mQueryText, mQueryText, mQueryText);
     }
 
@@ -90,35 +97,89 @@
         if (cursorResults == null) {
             return null;
         }
+        final Map<String, Context> contextMap = new HashMap<>();
         final ArrayList<SearchResult> results = new ArrayList<>();
 
         while (cursorResults.moveToNext()) {
-            final String title = cursorResults.getString(Index.COLUMN_INDEX_TITLE);
-            final String summaryOn = cursorResults.getString(COLUMN_INDEX_RAW_SUMMARY_ON);
-            final ArrayList<String> breadcrumbs = new ArrayList<>();
-            final int rank = cursorResults.getInt(COLUMN_INDEX_XML_RES_RANK);
-
-            final String intentString = cursorResults.getString(Index.COLUMN_INDEX_INTENT_ACTION);
-            final IntentPayload intentPayload = new IntentPayload(new Intent(intentString));
-            final int iconID = cursorResults.getInt(COLUMN_INDEX_RAW_ICON_RESID);
-            Drawable icon;
-            try {
-                icon = mContext.getDrawable(iconID);
-            } catch (Resources.NotFoundException nfe) {
-                icon = mContext.getDrawable(R.drawable.ic_search_history);
+            SearchResult result = buildSingleSearchResultFromCursor(contextMap, cursorResults);
+            if (result != null) {
+                results.add(result);
             }
-
-            SearchResult.Builder builder = new SearchResult.Builder();
-            builder.addTitle(title)
-                    .addSummary(summaryOn)
-                    .addBreadcrumbs(breadcrumbs)
-                    .addRank(rank)
-                    .addIcon(icon)
-                    .addPayload(intentPayload);
-            results.add(builder.build());
         }
         Collections.sort(results);
         return results;
     }
 
+    private SearchResult buildSingleSearchResultFromCursor(Map<String, Context> contextMap,
+            Cursor cursor) {
+        final String pkgName = cursor.getString(Index.COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE);
+        final String action = cursor.getString(Index.COLUMN_INDEX_INTENT_ACTION);
+        final String title = cursor.getString(Index.COLUMN_INDEX_TITLE);
+        final String summaryOn = cursor.getString(Index.COLUMN_INDEX_SUMMARY_ON);
+        final String className = cursor.getString(Index.COLUMN_INDEX_CLASS_NAME);
+        final int rank = cursor.getInt(Index.COLUMN_INDEX_RANK);
+        final String key = cursor.getString(Index.COLUMN_INDEX_KEY);
+        final String iconResStr = cursor.getString(Index.COLUMN_INDEX_ICON);
+
+        final ResultPayload payload;
+        if (TextUtils.isEmpty(action)) {
+            final String screenTitle = cursor.getString(Index.COLUMN_INDEX_SCREEN_TITLE);
+            // Action is null, we will launch it as a sub-setting
+            final Bundle args = new Bundle();
+            args.putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY, key);
+            final Intent intent = Utils.onBuildStartFragmentIntent(mContext,
+                    className, args, null, 0, screenTitle, false);
+            payload = new IntentPayload(intent);
+        } else {
+            final Intent intent = new Intent(action);
+            final String targetClass = cursor.getString(
+                    Index.COLUMN_INDEX_INTENT_ACTION_TARGET_CLASS);
+            if (!TextUtils.isEmpty(pkgName) && !TextUtils.isEmpty(targetClass)) {
+                final ComponentName component = new ComponentName(pkgName, targetClass);
+                intent.setComponent(component);
+            }
+            intent.putExtra(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY, key);
+            payload = new IntentPayload(intent);
+        }
+        SearchResult.Builder builder = new SearchResult.Builder();
+        builder.addTitle(title)
+                .addSummary(summaryOn)
+                .addRank(rank)
+                .addIcon(getIconForPackage(contextMap, pkgName, className, iconResStr))
+                .addPayload(payload);
+        return builder.build();
+    }
+
+    private Drawable getIconForPackage(Map<String, Context> contextMap, String pkgName,
+            String className, String iconResStr) {
+        final int iconId = TextUtils.isEmpty(iconResStr)
+                ? 0 : Integer.parseInt(iconResStr);
+        Drawable icon;
+        Context packageContext;
+        if (iconId == 0) {
+            icon = null;
+        } else {
+            if (TextUtils.isEmpty(className) && !TextUtils.isEmpty(pkgName)) {
+                packageContext = contextMap.get(pkgName);
+                if (packageContext == null) {
+                    try {
+                        packageContext = mContext.createPackageContext(pkgName, 0);
+                    } catch (PackageManager.NameNotFoundException e) {
+                        Log.e(LOG, "Cannot create Context for package: " + pkgName);
+                        return null;
+                    }
+                    contextMap.put(pkgName, packageContext);
+                }
+            } else {
+                packageContext = mContext;
+            }
+            try {
+                icon = packageContext.getDrawable(iconId);
+            } catch (Resources.NotFoundException nfe) {
+                icon = null;
+            }
+        }
+        return icon;
+    }
+
 }
diff --git a/src/com/android/settings/search2/IntentPayload.java b/src/com/android/settings/search2/IntentPayload.java
index 1ef3797..3e1049e 100644
--- a/src/com/android/settings/search2/IntentPayload.java
+++ b/src/com/android/settings/search2/IntentPayload.java
@@ -18,7 +18,6 @@
 
 import android.content.Intent;
 import android.os.Parcel;
-import com.android.internal.annotations.VisibleForTesting;
 
 /**
  * Encapsulates the standard intent based results as seen in first party apps and Settings results.
diff --git a/src/com/android/settings/search2/IntentSearchViewHolder.java b/src/com/android/settings/search2/IntentSearchViewHolder.java
index 0187c1c..0ef27d0 100644
--- a/src/com/android/settings/search2/IntentSearchViewHolder.java
+++ b/src/com/android/settings/search2/IntentSearchViewHolder.java
@@ -44,6 +44,9 @@
         titleView.setText(result.title);
         summaryView.setText(result.summary);
         iconView.setImageDrawable(result.icon);
+        if (result.icon == null) {
+            iconView.setBackgroundResource(R.drawable.empty_icon);
+        }
         itemView.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
diff --git a/src/com/android/settings/search2/ResultPayload.java b/src/com/android/settings/search2/ResultPayload.java
index 3a4e477..84df7b6 100644
--- a/src/com/android/settings/search2/ResultPayload.java
+++ b/src/com/android/settings/search2/ResultPayload.java
@@ -31,8 +31,19 @@
     @IntDef({PayloadType.INLINE_SLIDER, PayloadType.INLINE_SWITCH, PayloadType.INTENT})
     @Retention(RetentionPolicy.SOURCE)
     public @interface PayloadType {
+        /**
+         * Resulting page will be started using an intent
+         */
         int INTENT = 0;
+
+        /**
+         * Result is a inline widget, using a slider widget as UI.
+         */
         int INLINE_SLIDER = 1;
+
+        /**
+         * Result is a inline widget, using a toggle widget as UI.
+         */
         int INLINE_SWITCH = 2;
     }
 
diff --git a/src/com/android/settings/search2/ResultPayloadUtils.java b/src/com/android/settings/search2/ResultPayloadUtils.java
new file mode 100644
index 0000000..41d15e2
--- /dev/null
+++ b/src/com/android/settings/search2/ResultPayloadUtils.java
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ *
+ */
+
+package com.android.settings.search2;
+
+import android.os.BadParcelableException;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Log;
+
+import java.io.StreamCorruptedException;
+
+/**
+ * Utility class to Marshall and Unmarshall the payloads stored in the SQLite Database
+ */
+public class ResultPayloadUtils {
+
+    private static final String TAG = "PayloadUtil";
+
+    public static byte[] marshall(ResultPayload payload) {
+        Parcel parcel = Parcel.obtain();
+        payload.writeToParcel(parcel, 0);
+        byte[] bytes = parcel.marshall();
+        parcel.recycle();
+        return bytes;
+    }
+
+    public static <T> T unmarshall(byte[] bytes, Parcelable.Creator<T> creator) {
+        T result;
+        Parcel parcel = unmarshall(bytes);
+        result = creator.createFromParcel(parcel);
+        parcel.recycle();
+        return result;
+    }
+
+    private static Parcel unmarshall(byte[] bytes) {
+        Parcel parcel = Parcel.obtain();
+        parcel.unmarshall(bytes, 0, bytes.length);
+        parcel.setDataPosition(0);
+        return parcel;
+    }
+}
diff --git a/src/com/android/settings/search2/SearchFeatureProvider.java b/src/com/android/settings/search2/SearchFeatureProvider.java
index da29c85..ad26eae 100644
--- a/src/com/android/settings/search2/SearchFeatureProvider.java
+++ b/src/com/android/settings/search2/SearchFeatureProvider.java
@@ -46,4 +46,14 @@
      * Returns a new loader to search installed apps.
      */
     InstalledAppResultLoader getInstalledAppSearchLoader(Context context, String query);
+
+    /**
+     * Returns the manager for indexing Settings data.
+     */
+    DatabaseIndexingManager getIndexingManager(Context context);
+
+    /**
+     * Updates the Settings indexes
+     */
+    void updateIndex(Context context);
 }
diff --git a/src/com/android/settings/search2/SearchFeatureProviderImpl.java b/src/com/android/settings/search2/SearchFeatureProviderImpl.java
index 7203049..e2d25ad 100644
--- a/src/com/android/settings/search2/SearchFeatureProviderImpl.java
+++ b/src/com/android/settings/search2/SearchFeatureProviderImpl.java
@@ -23,6 +23,8 @@
 import android.view.MenuItem;
 
 import com.android.settings.R;
+import com.android.settings.search.Index;
+
 import com.android.settings.applications.PackageManagerWrapperImpl;
 
 /**
@@ -31,6 +33,7 @@
 public class SearchFeatureProviderImpl implements SearchFeatureProvider {
     protected Context mContext;
 
+    private DatabaseIndexingManager mDatabaseIndexingManager;
 
     public SearchFeatureProviderImpl(Context context) {
         mContext = context;
@@ -71,4 +74,22 @@
         return new InstalledAppResultLoader(
                 context, new PackageManagerWrapperImpl(context.getPackageManager()), query);
     }
+
+    @Override
+    public DatabaseIndexingManager getIndexingManager(Context context) {
+        if (mDatabaseIndexingManager == null) {
+            mDatabaseIndexingManager = new DatabaseIndexingManager(context.getApplicationContext(),
+                    context.getPackageName());
+        }
+        return mDatabaseIndexingManager;
+    }
+
+    @Override
+    public void updateIndex(Context context) {
+        if (isEnabled()) {
+            getIndexingManager(context).update();
+        } else {
+            Index.getInstance(context).update();
+        }
+    }
 }
diff --git a/src/com/android/settings/search2/SearchResult.java b/src/com/android/settings/search2/SearchResult.java
index 9fb250f..5bf757f 100644
--- a/src/com/android/settings/search2/SearchResult.java
+++ b/src/com/android/settings/search2/SearchResult.java
@@ -83,7 +83,6 @@
         payload = builder.mResultPayload;
         viewType = payload.getType();
         stableId = Objects.hash(title, summary, breadcrumbs, rank, icon, payload, viewType);
-
     }
 
     @Override
@@ -98,7 +97,7 @@
         protected CharSequence mTitle;
         protected CharSequence mSummary;
         protected ArrayList<String> mBreadcrumbs;
-        protected int mRank = -1;
+        protected int mRank = 42;
         protected ResultPayload mResultPayload;
         protected Drawable mIcon;
 
@@ -118,10 +117,9 @@
         }
 
         public Builder addRank(int rank) {
-            if (rank < 0 || rank > 9) {
-                rank = 42;
+            if (rank >= 0 && rank <= 9) {
+                mRank = rank;
             }
-            mRank = rank;
             return this;
         }
 
@@ -139,10 +137,6 @@
             // Check that all of the mandatory fields are set.
             if (mTitle == null) {
                 throw new IllegalArgumentException("SearchResult missing title argument");
-            } else if (mRank == -1) {
-                throw new IllegalArgumentException("SearchResult missing rank argument");
-            } else if (mIcon == null) {
-                throw new IllegalArgumentException("SearchResult missing icon argument");
             } else if (mResultPayload == null) {
                 throw new IllegalArgumentException("SearchResult missing Payload argument");
             }
diff --git a/src/com/android/settings/search2/XmlParserUtils.java b/src/com/android/settings/search2/XmlParserUtils.java
new file mode 100644
index 0000000..748d4b0
--- /dev/null
+++ b/src/com/android/settings/search2/XmlParserUtils.java
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ *
+ */
+
+package com.android.settings.search2;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.util.TypedValue;
+
+import com.android.settings.R;
+
+import java.text.Normalizer;
+import java.util.regex.Pattern;
+
+/**
+ * Utility class to parse elements of XML preferences
+ */
+public class XmlParserUtils {
+
+    private static final String ENTRIES_SEPARATOR = "|";
+
+    public static String getDataKey(Context context, AttributeSet attrs) {
+        return getData(context, attrs,
+                com.android.internal.R.styleable.Preference,
+                com.android.internal.R.styleable.Preference_key);
+    }
+
+    public static String getDataTitle(Context context, AttributeSet attrs) {
+        return getData(context, attrs,
+                com.android.internal.R.styleable.Preference,
+                com.android.internal.R.styleable.Preference_title);
+    }
+
+    public static String getDataSummary(Context context, AttributeSet attrs) {
+        return getData(context, attrs,
+                com.android.internal.R.styleable.Preference,
+                com.android.internal.R.styleable.Preference_summary);
+    }
+
+    public static String getDataSummaryOn(Context context, AttributeSet attrs) {
+        return getData(context, attrs,
+                com.android.internal.R.styleable.CheckBoxPreference,
+                com.android.internal.R.styleable.CheckBoxPreference_summaryOn);
+    }
+
+    public static String getDataSummaryOff(Context context, AttributeSet attrs) {
+        return getData(context, attrs,
+                com.android.internal.R.styleable.CheckBoxPreference,
+                com.android.internal.R.styleable.CheckBoxPreference_summaryOff);
+    }
+
+    public static String getDataEntries(Context context, AttributeSet attrs) {
+        return getDataEntries(context, attrs,
+                com.android.internal.R.styleable.ListPreference,
+                com.android.internal.R.styleable.ListPreference_entries);
+    }
+
+    public static String getDataKeywords(Context context, AttributeSet attrs) {
+        return getData(context, attrs, R.styleable.Preference, R.styleable.Preference_keywords);
+    }
+
+    private static String getData(Context context, AttributeSet set, int[] attrs, int resId) {
+        final TypedArray sa = context.obtainStyledAttributes(set, attrs);
+        final TypedValue tv = sa.peekValue(resId);
+
+        CharSequence data = null;
+        if (tv != null && tv.type == TypedValue.TYPE_STRING) {
+            if (tv.resourceId != 0) {
+                data = context.getText(tv.resourceId);
+            } else {
+                data = tv.string;
+            }
+        }
+        return (data != null) ? data.toString() : null;
+    }
+
+    private static String getDataEntries(Context context, AttributeSet set, int[] attrs, int resId) {
+        final TypedArray sa = context.obtainStyledAttributes(set, attrs);
+        final TypedValue tv = sa.peekValue(resId);
+
+        String[] data = null;
+        if (tv != null && tv.type == TypedValue.TYPE_REFERENCE) {
+            if (tv.resourceId != 0) {
+                data = context.getResources().getStringArray(tv.resourceId);
+            }
+        }
+        final int count = (data == null ) ? 0 : data.length;
+        if (count == 0) {
+            return null;
+        }
+        final StringBuilder result = new StringBuilder();
+        for (int n = 0; n < count; n++) {
+            result.append(data[n]);
+            result.append(ENTRIES_SEPARATOR);
+        }
+        return result.toString();
+    }
+}
diff --git a/src/com/android/settings/survey/SurveyMixin.java b/src/com/android/settings/survey/SurveyMixin.java
new file mode 100644
index 0000000..5e0754a
--- /dev/null
+++ b/src/com/android/settings/survey/SurveyMixin.java
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+package com.android.settings.survey;
+
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import com.android.settings.core.InstrumentedPreferenceFragment;
+import com.android.settings.core.lifecycle.LifecycleObserver;
+import com.android.settings.core.lifecycle.events.OnPause;
+import com.android.settings.core.lifecycle.events.OnResume;
+import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.overlay.SurveyFeatureProvider;
+
+/**
+ * attaches extra, survey related work to the onResume method of registered observable classes
+ * in settings. This allows new classes to automatically support settings provided the extend
+ * one of the relevant classes in com.android.settings.lifecycle.
+ */
+public class SurveyMixin implements LifecycleObserver, OnResume, OnPause {
+
+    private String mName;
+    private InstrumentedPreferenceFragment mFragment;
+    private BroadcastReceiver mReceiver;
+
+    /**
+     * A mixin that attempts to perform survey related tasks right before onResume is called
+     * in a Settings PreferenceFragment. This will allow for remote updating and creation of
+     * surveys.
+     * @param fragment The fragment that this mixin will be attached to.
+     * @param fragmentName The simple name of the fragment.
+     */
+    public SurveyMixin(InstrumentedPreferenceFragment fragment, String fragmentName) {
+        mName = fragmentName;
+        mFragment = fragment;
+    }
+
+    @Override
+    public void onResume() {
+        Activity activity = mFragment.getActivity();
+
+        // guard against the activity not existing yet or the feature being disabled
+        if (activity != null) {
+            SurveyFeatureProvider provider =
+                    FeatureFactory.getFactory(activity).getSurveyFeatureProvider(activity);
+            if (provider != null) {
+
+                // Try to download a survey if there is none available, show the survey otherwise
+                String id = provider.getSurveyId(activity, mName);
+                if (provider.getSurveyExpirationDate(activity, id) <= -1) {
+                    // register the receiver to show the survey on completion.
+                    mReceiver = provider.createAndRegisterReceiver(activity);
+                    provider.downloadSurvey(activity, id, "fakeData");
+                } else {
+                    provider.showSurveyIfAvailable(activity, id);
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onPause() {
+        Activity activity = mFragment.getActivity();
+        if (mReceiver != null && activity != null) {
+            SurveyFeatureProvider provider =
+                    FeatureFactory.getFactory(activity).getSurveyFeatureProvider(activity);
+            provider.unregisterReceiver(activity, mReceiver);
+        }
+    }
+}
diff --git a/src/com/android/settings/widget/FooterPreference.java b/src/com/android/settings/widget/FooterPreference.java
new file mode 100644
index 0000000..4a0d128
--- /dev/null
+++ b/src/com/android/settings/widget/FooterPreference.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.widget;
+
+import android.content.Context;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceViewHolder;
+import android.text.method.LinkMovementMethod;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+import com.android.settings.R;
+
+/**
+ * A custom preference acting as "footer" of a page. It has a field for icon and text. It is added
+ * to screen as the last preference.
+ */
+public class FooterPreference extends Preference {
+
+    static final int ORDER_FOOTER = Integer.MAX_VALUE - 1;
+    static final String KEY_FOOTER = "footer_preference";
+
+    public FooterPreference(Context context, AttributeSet attrs,
+            int defStyleAttr, int defStyleRes) {
+        super(context, attrs, defStyleAttr, defStyleRes);
+        init();
+    }
+
+    public FooterPreference(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init();
+    }
+
+    public FooterPreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    public FooterPreference(Context context) {
+        super(context);
+        init();
+    }
+
+    @Override
+    public void onBindViewHolder(PreferenceViewHolder holder) {
+        super.onBindViewHolder(holder);
+        TextView title = (TextView) holder.itemView.findViewById(android.R.id.title);
+        title.setMovementMethod(new LinkMovementMethod());
+    }
+
+    private void init() {
+        setLayoutResource(R.layout.preference_footer);
+        setIcon(R.drawable.ic_info_outline_24dp);
+        setKey(KEY_FOOTER);
+        setOrder(ORDER_FOOTER);
+    }
+}
diff --git a/src/com/android/settings/widget/FooterPreferenceMixin.java b/src/com/android/settings/widget/FooterPreferenceMixin.java
new file mode 100644
index 0000000..53e3d75
--- /dev/null
+++ b/src/com/android/settings/widget/FooterPreferenceMixin.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.widget;
+
+import android.content.Context;
+import android.support.v14.preference.PreferenceFragment;
+import android.support.v7.preference.PreferenceScreen;
+
+import com.android.settings.core.lifecycle.Lifecycle;
+import com.android.settings.core.lifecycle.LifecycleObserver;
+import com.android.settings.core.lifecycle.events.SetPreferenceScreen;
+
+public class FooterPreferenceMixin implements LifecycleObserver, SetPreferenceScreen {
+
+    private final PreferenceFragment mFragment;
+    private FooterPreference mFooterPreference;
+
+    public FooterPreferenceMixin(PreferenceFragment fragment, Lifecycle lifecycle) {
+        mFragment = fragment;
+        lifecycle.addObserver(this);
+    }
+
+    @Override
+    public void setPreferenceScreen(PreferenceScreen preferenceScreen) {
+        if (mFooterPreference != null) {
+            preferenceScreen.addPreference(mFooterPreference);
+        }
+    }
+
+    /**
+     * Creates a new {@link FooterPreference}.
+     */
+    public FooterPreference createFooterPreference() {
+        final PreferenceScreen screen = mFragment.getPreferenceScreen();
+        if (mFooterPreference != null && screen != null) {
+            screen.removePreference(mFooterPreference);
+        }
+        mFooterPreference = new FooterPreference(getPrefContext());
+
+        if (screen != null) {
+            screen.addPreference(mFooterPreference);
+        }
+        return mFooterPreference;
+    }
+
+    /**
+     * Returns an UI context with theme properly set for new Preference objects.
+     */
+    private Context getPrefContext() {
+        return mFragment.getPreferenceManager().getContext();
+    }
+
+    public boolean hasFooter() {
+        return mFooterPreference != null;
+    }
+}
+
diff --git a/src/com/android/settings/dashboard/DashboardDividerDecoration.java b/src/com/android/settings/widget/PreferenceDividerDecoration.java
similarity index 71%
rename from src/com/android/settings/dashboard/DashboardDividerDecoration.java
rename to src/com/android/settings/widget/PreferenceDividerDecoration.java
index ed8a077..4466a3d 100644
--- a/src/com/android/settings/dashboard/DashboardDividerDecoration.java
+++ b/src/com/android/settings/widget/PreferenceDividerDecoration.java
@@ -14,31 +14,22 @@
  * limitations under the License.
  */
 
-package com.android.settings.dashboard;
+package com.android.settings.widget;
 
-import android.content.Context;
 import android.graphics.Canvas;
 import android.graphics.drawable.Drawable;
 import android.support.v4.view.ViewCompat;
 import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceCategory;
 import android.support.v7.preference.PreferenceGroupAdapter;
 import android.support.v7.widget.RecyclerView;
 import android.view.View;
 
-import com.android.settings.overlay.FeatureFactory;
-
-public class DashboardDividerDecoration extends RecyclerView.ItemDecoration {
-
-    private final DashboardFeatureProvider mDashboardFeatureProvider;
+public class PreferenceDividerDecoration extends RecyclerView.ItemDecoration {
 
     private Drawable mDivider;
     private int mDividerHeight;
 
-    public DashboardDividerDecoration(Context context) {
-        mDashboardFeatureProvider = FeatureFactory.getFactory(context)
-                .getDashboardFeatureProvider(context);
-    }
-
     public void setDivider(Drawable divider) {
         if (divider != null) {
             mDividerHeight = divider.getIntrinsicHeight();
@@ -59,17 +50,17 @@
         }
         final int childCount = parent.getChildCount();
         final int width = parent.getWidth();
-        for (int childViewIndex = 0; childViewIndex < childCount - 1; childViewIndex++) {
+        for (int childViewIndex = 0; childViewIndex < childCount; childViewIndex++) {
             final View view = parent.getChildAt(childViewIndex);
-            if (shouldDrawDividerBelow(view, parent)) {
-                int top = (int) ViewCompat.getY(view) + view.getHeight();
+            if (shouldDrawDividerAbove(view, parent)) {
+                int top = (int) ViewCompat.getY(view);
                 mDivider.setBounds(0, top, width, top + mDividerHeight);
                 mDivider.draw(c);
             }
         }
     }
 
-    private boolean shouldDrawDividerBelow(View view, RecyclerView parent) {
+    private boolean shouldDrawDividerAbove(View view, RecyclerView parent) {
         final RecyclerView.Adapter adapter = parent.getAdapter();
         if (adapter == null || !(adapter instanceof PreferenceGroupAdapter)) {
             return false;
@@ -80,13 +71,9 @@
             return false;
         }
         final Preference pref = prefAdapter.getItem(adapterPosition);
-        final Preference nextPref = prefAdapter.getItem(adapterPosition + 1);
-        if (nextPref == null) {
-            return false;
+        if (pref instanceof PreferenceCategory) {
+            return adapterPosition != 0;
         }
-
-        return mDashboardFeatureProvider.getPriorityGroup(pref)
-                != mDashboardFeatureProvider.getPriorityGroup(nextPref);
+        return pref instanceof FooterPreference;
     }
-
 }
diff --git a/src/com/android/settings/wifi/ConfigureWifiSettings.java b/src/com/android/settings/wifi/ConfigureWifiSettings.java
index 9739ef9..01ae99c 100644
--- a/src/com/android/settings/wifi/ConfigureWifiSettings.java
+++ b/src/com/android/settings/wifi/ConfigureWifiSettings.java
@@ -19,14 +19,10 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.res.Resources;
-import android.net.NetworkScoreManager;
-import android.net.NetworkScorerAppManager;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.os.Bundle;
-import android.os.UserManager;
 import android.provider.Settings;
 import android.support.v14.preference.SwitchPreference;
 import android.support.v7.preference.ListPreference;
@@ -35,12 +31,9 @@
 import android.util.Log;
 import android.widget.Toast;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.settings.AppListSwitchPreference;
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.Utils;
-
-import java.util.Collection;
 import java.util.List;
 
 public class ConfigureWifiSettings extends SettingsPreferenceFragment
@@ -53,12 +46,9 @@
     private static final String KEY_NOTIFY_OPEN_NETWORKS = "notify_open_networks";
     private static final String KEY_SLEEP_POLICY = "sleep_policy";
     private static final String KEY_CELLULAR_FALLBACK = "wifi_cellular_data_fallback";
-    private static final String KEY_WIFI_ASSISTANT = "wifi_assistant";
+    private static final String KEY_ALLOW_RECOMMENDATIONS = "allow_recommendations";
 
     private WifiManager mWifiManager;
-    private NetworkScoreManager mNetworkScoreManager;
-    private AppListSwitchPreference mWifiAssistantPreference;
-
     private IntentFilter mFilter;
 
     @Override
@@ -74,8 +64,6 @@
         mFilter = new IntentFilter();
         mFilter.addAction(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION);
         mFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-        mNetworkScoreManager =
-                (NetworkScoreManager) getSystemService(Context.NETWORK_SCORE_SERVICE);
     }
 
     @Override
@@ -119,15 +107,10 @@
             }
         }
 
-        mWifiAssistantPreference = (AppListSwitchPreference) findPreference(KEY_WIFI_ASSISTANT);
-        Collection<NetworkScorerAppManager.NetworkScorerAppData> scorers =
-                new NetworkScorerAppManager(context).getAllValidScorers();
-        if (UserManager.get(context).isAdminUser() && !scorers.isEmpty()) {
-            mWifiAssistantPreference.setOnPreferenceChangeListener(this);
-            initWifiAssistantPreference(scorers);
-        } else if (mWifiAssistantPreference != null) {
-            getPreferenceScreen().removePreference(mWifiAssistantPreference);
-        }
+        SwitchPreference allowRecommendations =
+            (SwitchPreference) findPreference(KEY_ALLOW_RECOMMENDATIONS);
+        allowRecommendations.setChecked(Settings.Global.getInt(getContentResolver(),
+            Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 0) == 1);
 
         ListPreference sleepPolicyPref = (ListPreference) findPreference(KEY_SLEEP_POLICY);
         if (sleepPolicyPref != null) {
@@ -187,6 +170,10 @@
             String settingName = Settings.Global.NETWORK_AVOID_BAD_WIFI;
             Settings.Global.putString(getContentResolver(), settingName,
                     ((SwitchPreference) preference).isChecked() ? "1" : null);
+        } else if (KEY_ALLOW_RECOMMENDATIONS.equals(key)) {
+            Settings.Global.putInt(getActivity().getContentResolver(),
+                Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED,
+                ((SwitchPreference) preference).isChecked() ? 1 : 0);
         } else {
             return super.onPreferenceTreeClick(preference);
         }
@@ -198,34 +185,6 @@
         final Context context = getActivity();
         String key = preference.getKey();
 
-        if (KEY_WIFI_ASSISTANT.equals(key)) {
-            NetworkScorerAppManager.NetworkScorerAppData wifiAssistant =
-                    new NetworkScorerAppManager(context).getScorer((String) newValue);
-            if (wifiAssistant == null) {
-                mNetworkScoreManager.setActiveScorer(null);
-                return true;
-            }
-
-            Intent intent = new Intent();
-            if (wifiAssistant.mConfigurationActivityClassName != null) {
-                // App has a custom configuration activity; launch that.
-                // This custom activity will be responsible for launching the system
-                // dialog.
-                intent.setClassName(wifiAssistant.mPackageName,
-                        wifiAssistant.mConfigurationActivityClassName);
-            } else {
-                // Fall back on the system dialog.
-                intent.setAction(NetworkScoreManager.ACTION_CHANGE_ACTIVE);
-                intent.putExtra(NetworkScoreManager.EXTRA_PACKAGE_NAME,
-                        wifiAssistant.mPackageName);
-            }
-
-            startActivity(intent);
-            // Don't update the preference widget state until the child activity returns.
-            // It will be updated in onResume after the activity finishes.
-            return false;
-        }
-
         if (KEY_SLEEP_POLICY.equals(key)) {
             try {
                 String stringValue = (String) newValue;
@@ -259,19 +218,6 @@
         wifiIpAddressPref.setSelectable(false);
     }
 
-    private void initWifiAssistantPreference(
-            Collection<NetworkScorerAppManager.NetworkScorerAppData> scorers) {
-        int count = scorers.size();
-        String[] packageNames = new String[count];
-        int i = 0;
-        for (NetworkScorerAppManager.NetworkScorerAppData scorer : scorers) {
-            packageNames[i] = scorer.mPackageName;
-            i++;
-        }
-        mWifiAssistantPreference.setPackageNames(packageNames,
-                mNetworkScoreManager.getActiveScorerPackage());
-    }
-
     @Override
     public int getMetricsCategory() {
         return MetricsEvent.CONFIGURE_WIFI;
diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizard.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizard.java
deleted file mode 100644
index 68f28ee..0000000
--- a/src/com/android/settings/wifi/WifiSettingsForSetupWizard.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (C) 2014 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.
- */
-
-package com.android.settings.wifi;
-
-import android.app.Dialog;
-import android.net.wifi.WifiConfiguration;
-import android.os.Bundle;
-import android.support.v7.preference.PreferenceScreen;
-import android.text.TextUtils;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.TextView;
-
-import com.android.settings.R;
-import com.android.settings.SetupWizardUtils;
-import com.android.setupwizardlib.SetupWizardListLayout;
-import com.android.setupwizardlib.view.NavigationBar;
-
-/**
- * This customized version of WifiSettings is shown to the user only during Setup Wizard. Menu
- * is not shown, clicking on an access point will auto-advance to the next screen (once connected),
- * and, if the user opts to skip ahead without a wifi connection, a warning message alerts of
- * possible carrier data charges or missing software updates.
- */
-public class WifiSettingsForSetupWizard extends WifiSettings {
-
-    private static final String TAG = "WifiSettingsForSetupWizard";
-
-    private SetupWizardListLayout mLayout;
-    private View mAddOtherNetworkItem;
-    private TextView mEmptyFooter;
-    private View mMacAddressFooter;
-    private boolean mListLastEmpty = false;
-
-    @Override
-    public View onCreateView(final LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        mLayout = (SetupWizardListLayout)
-                inflater.inflate(R.layout.setup_wifi_layout, container, false);
-        final ListView list = mLayout.getListView();
-
-        mAddOtherNetworkItem = inflater.inflate(R.layout.setup_wifi_add_network, list, false);
-        list.addFooterView(mAddOtherNetworkItem, null, true);
-        mAddOtherNetworkItem.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (mWifiManager.isWifiEnabled()) {
-                    onAddNetworkPressed();
-                }
-            }
-        });
-
-        mMacAddressFooter = inflater.inflate(R.layout.setup_wifi_mac_address, list, false);
-        list.addFooterView(mMacAddressFooter, null, false);
-
-        final NavigationBar navigationBar = mLayout.getNavigationBar();
-        if (navigationBar != null) {
-            WifiSetupActivity activity = (WifiSetupActivity) getActivity();
-            activity.onNavigationBarCreated(navigationBar);
-        }
-
-        return mLayout;
-    }
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-
-        if (hasNextButton()) {
-            getNextButton().setVisibility(View.GONE);
-        }
-
-        updateMacAddress();
-    }
-
-    @Override
-    public void onAccessPointsChanged() {
-        super.onAccessPointsChanged();
-        PreferenceScreen preferenceScreen = getPreferenceScreen();
-        updateFooter(preferenceScreen == null || preferenceScreen.getPreferenceCount() == 0);
-    }
-
-    @Override
-    public void onWifiStateChanged(int state) {
-        super.onWifiStateChanged(state);
-        updateMacAddress();
-    }
-
-    @Override
-    public void registerForContextMenu(View view) {
-        // Suppressed during setup wizard
-    }
-
-    @Override
-    /* package */ WifiEnabler createWifiEnabler() {
-        // Not shown during setup wizard
-        return null;
-    }
-
-    @Override
-    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
-        // Do not show menu during setup wizard
-    }
-
-    @Override
-    public Dialog onCreateDialog(int dialogId) {
-        final Dialog dialog = super.onCreateDialog(dialogId);
-        SetupWizardUtils.applyImmersiveFlags(dialog);
-        return dialog;
-    }
-
-    @Override
-    protected void connect(final WifiConfiguration config, boolean isSavedNetwork) {
-        WifiSetupActivity activity = (WifiSetupActivity) getActivity();
-        activity.networkSelected();
-        super.connect(config, isSavedNetwork);
-    }
-
-    @Override
-    protected void connect(final int networkId, boolean isSavedNetwork) {
-        WifiSetupActivity activity = (WifiSetupActivity) getActivity();
-        activity.networkSelected();
-        super.connect(networkId, isSavedNetwork);
-    }
-
-    @Override
-    protected TextView initEmptyTextView() {
-        final LayoutInflater inflater = LayoutInflater.from(getActivity());
-        mEmptyFooter = (TextView) inflater.inflate(R.layout.setup_wifi_empty, getListView(), false);
-        return mEmptyFooter;
-    }
-
-    protected void updateFooter(boolean isEmpty) {
-        if (isEmpty != mListLastEmpty) {
-            if (isEmpty) {
-                setFooterView(mEmptyFooter);
-            } else {
-                LinearLayout layout = new LinearLayout(getContext());
-                layout.setOrientation(LinearLayout.VERTICAL);
-                layout.addView(mAddOtherNetworkItem);
-                layout.addView(mMacAddressFooter);
-                setFooterView(layout);
-            }
-            mListLastEmpty = isEmpty;
-        }
-    }
-
-    @Override
-    public View setPinnedHeaderView(int layoutResId) {
-        // Pinned header is not supported in setup wizard
-        return null;
-    }
-
-    @Override
-    public void setPinnedHeaderView(View pinnedHeader) {
-        // Pinned header is not supported in setup wizard
-    }
-
-    @Override
-    protected void setProgressBarVisible(boolean visible) {
-        if (mLayout != null) {
-            if (visible) {
-                mLayout.showProgressBar();
-            } else {
-                mLayout.hideProgressBar();
-            }
-        }
-    }
-
-    private void updateMacAddress() {
-        if (mMacAddressFooter != null) {
-            String macAddress = null;
-            if (mWifiManager != null) {
-                android.net.wifi.WifiInfo connectionInfo = mWifiManager.getConnectionInfo();
-                if (connectionInfo != null) {
-                    macAddress = connectionInfo.getMacAddress();
-                }
-            }
-            final TextView macAddressTextView =
-                    (TextView) mMacAddressFooter.findViewById(R.id.mac_address);
-            macAddressTextView.setText(!TextUtils.isEmpty(macAddress) ?
-                    macAddress : getString(R.string.status_unavailable));
-        }
-    }
-}
diff --git a/src/com/android/settings/wifi/WifiSetupActivity.java b/src/com/android/settings/wifi/WifiSetupActivity.java
deleted file mode 100644
index f640b6e..0000000
--- a/src/com/android/settings/wifi/WifiSetupActivity.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-package com.android.settings.wifi;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.res.Resources;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.support.v14.preference.PreferenceFragment;
-import android.util.Log;
-
-import com.android.internal.logging.nano.MetricsProto;
-import com.android.settings.ButtonBarHandler;
-import com.android.settings.R;
-import com.android.settings.SetupWizardUtils;
-import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
-import com.android.setupwizardlib.view.NavigationBar;
-
-public class WifiSetupActivity extends WifiPickerActivity
-        implements ButtonBarHandler, NavigationBar.NavigationBarListener {
-    private static final String TAG = "WifiSetupActivity";
-
-    // this boolean extra specifies whether to auto finish when connection is established
-    private static final String EXTRA_AUTO_FINISH_ON_CONNECT = "wifi_auto_finish_on_connect";
-
-    // This boolean extra specifies whether network is required
-    private static final String EXTRA_IS_NETWORK_REQUIRED = "is_network_required";
-
-    // This boolean extra specifies whether wifi is required
-    private static final String EXTRA_IS_WIFI_REQUIRED = "is_wifi_required";
-
-    // Whether auto finish is suspended until user connects to an access point
-    private static final String EXTRA_REQUIRE_USER_NETWORK_SELECTION =
-            "wifi_require_user_network_selection";
-
-    // Key for whether the user selected network in saved instance state bundle
-    private static final String PARAM_USER_SELECTED_NETWORK = "userSelectedNetwork";
-
-    // Activity result when pressing the Skip button
-    private static final int RESULT_SKIP = Activity.RESULT_FIRST_USER;
-
-    // Whether to auto finish when the user selected a network and successfully connected
-    private boolean mAutoFinishOnConnection;
-    // Whether network is required to proceed. This is decided in SUW and passed in as an extra.
-    private boolean mIsNetworkRequired;
-    // Whether wifi is required to proceed. This is decided in SUW and passed in as an extra.
-    private boolean mIsWifiRequired;
-    // Whether the user connected to a network. This excludes the auto-connecting by the system.
-    private boolean mUserSelectedNetwork;
-    // Whether the device is connected to WiFi
-    private boolean mWifiConnected;
-
-    private NavigationBar mNavigationBar;
-
-    private IntentFilter mFilter = new IntentFilter();
-    private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            // Refresh the connection state with the latest connection info. Use the connection info
-            // from ConnectivityManager instead of the one attached in the intent to make sure
-            // we have the most up-to-date connection state. b/17511772
-            refreshConnectionState();
-        }
-    };
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        final Intent intent = getIntent();
-        mFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-        mFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
-
-        mAutoFinishOnConnection = intent.getBooleanExtra(EXTRA_AUTO_FINISH_ON_CONNECT, false);
-        mIsNetworkRequired = intent.getBooleanExtra(EXTRA_IS_NETWORK_REQUIRED, false);
-        mIsWifiRequired = intent.getBooleanExtra(EXTRA_IS_WIFI_REQUIRED, false);
-        // Behave like the user already selected a network if we do not require selection
-        mUserSelectedNetwork = !intent.getBooleanExtra(EXTRA_REQUIRE_USER_NETWORK_SELECTION, false);
-    }
-
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-        outState.putBoolean(PARAM_USER_SELECTED_NETWORK, mUserSelectedNetwork);
-    }
-
-    @Override
-    protected void onRestoreInstanceState(Bundle savedInstanceState) {
-        super.onRestoreInstanceState(savedInstanceState);
-        mUserSelectedNetwork = savedInstanceState.getBoolean(PARAM_USER_SELECTED_NETWORK, true);
-    }
-
-    private boolean isWifiConnected() {
-        final ConnectivityManager connectivity = (ConnectivityManager)
-                getSystemService(Context.CONNECTIVITY_SERVICE);
-        boolean wifiConnected = connectivity != null &&
-                connectivity.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected();
-        mWifiConnected = wifiConnected;
-        return wifiConnected;
-    }
-
-    private void refreshConnectionState() {
-        if (isWifiConnected()) {
-            if (mAutoFinishOnConnection && mUserSelectedNetwork) {
-                Log.d(TAG, "Auto-finishing with connection");
-                finish(Activity.RESULT_OK);
-                // Require a user selection before auto-finishing next time we are here. The user
-                // can either connect to a different network or press "next" to proceed.
-                mUserSelectedNetwork = false;
-            }
-            setNextButtonText(R.string.suw_next_button_label);
-            setNextButtonEnabled(true);
-        } else if (mIsWifiRequired || (mIsNetworkRequired && !isNetworkConnected())) {
-            // We do not want the user to skip wifi setting if
-            // - wifi is required, but wifi connection hasn't been established yet;
-            // - or network is required, but no valid connection has been established.
-            setNextButtonText(R.string.skip_label);
-            setNextButtonEnabled(false);
-        } else {
-            // In other cases, user can choose to skip. Specifically these cases are
-            // - wifi is not required;
-            // - and network is not required;
-            // -     or network is required and a valid connection has been established.
-            setNextButtonText(R.string.skip_label);
-            setNextButtonEnabled(true);
-        }
-    }
-
-    private void setNextButtonEnabled(boolean enabled) {
-        if (mNavigationBar != null) {
-            mNavigationBar.getNextButton().setEnabled(enabled);
-        }
-    }
-
-    private void setNextButtonText(int resId) {
-        if (mNavigationBar != null) {
-            mNavigationBar.getNextButton().setText(resId);
-        }
-    }
-
-    /* package */ void networkSelected() {
-        Log.d(TAG, "Network selected by user");
-        mUserSelectedNetwork = true;
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        registerReceiver(mReceiver, mFilter);
-        refreshConnectionState();
-    }
-
-    @Override
-    public void onPause() {
-        unregisterReceiver(mReceiver);
-        super.onPause();
-    }
-
-    @Override
-    protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
-        resid = SetupWizardUtils.getTheme(getIntent());
-        super.onApplyThemeResource(theme, resid, first);
-    }
-
-    @Override
-    protected boolean isValidFragment(String fragmentName) {
-        return WifiSettingsForSetupWizard.class.getName().equals(fragmentName);
-    }
-
-    @Override
-    /* package */ Class<? extends PreferenceFragment> getWifiSettingsClass() {
-        return WifiSettingsForSetupWizard.class;
-    }
-
-    /**
-     * Complete this activity and return the results to the caller.
-     */
-    public void finish(int resultCode) {
-        Log.d(TAG, "finishing, resultCode=" + resultCode);
-        setResult(resultCode);
-        finish();
-    }
-
-    public void onNavigationBarCreated(final NavigationBar bar) {
-        mNavigationBar = bar;
-        bar.setNavigationBarListener(this);
-        SetupWizardUtils.setImmersiveMode(this);
-    }
-
-    @Override
-    public void onNavigateBack() {
-        onBackPressed();
-    }
-
-    @Override
-    public void onNavigateNext() {
-        if (mWifiConnected) {
-            finish(RESULT_OK);
-        } else {
-            // Warn of possible data charges if there is a network connection, or lack of updates
-            // if there is none.
-            final int message = isNetworkConnected() ? R.string.wifi_skipped_message :
-                    R.string.wifi_and_mobile_skipped_message;
-            WifiSkipDialog.newInstance(message).show(getFragmentManager(), "dialog");
-        }
-    }
-
-    /**
-     * @return True if there is a valid network connection, whether it is via WiFi, mobile data or
-     *         other means.
-     */
-    private boolean isNetworkConnected() {
-        final ConnectivityManager connectivity = (ConnectivityManager)
-                getSystemService(Context.CONNECTIVITY_SERVICE);
-        if (connectivity == null) {
-            return false;
-        }
-        final NetworkInfo info = connectivity.getActiveNetworkInfo();
-        return info != null && info.isConnected();
-    }
-
-    public static class WifiSkipDialog extends InstrumentedDialogFragment {
-        public static WifiSkipDialog newInstance(int messageRes) {
-            final Bundle args = new Bundle();
-            args.putInt("messageRes", messageRes);
-            final WifiSkipDialog dialog = new WifiSkipDialog();
-            dialog.setArguments(args);
-            return dialog;
-        }
-
-        public WifiSkipDialog() {
-            // no-arg constructor for fragment
-        }
-
-        @Override
-        public int getMetricsCategory() {
-            return MetricsProto.MetricsEvent.DIALOG_WIFI_SKIP;
-        }
-
-        @Override
-        public Dialog onCreateDialog(Bundle savedInstanceState) {
-            int messageRes = getArguments().getInt("messageRes");
-            final AlertDialog dialog = new AlertDialog.Builder(getActivity())
-                    .setMessage(messageRes)
-                    .setCancelable(false)
-                    .setPositiveButton(R.string.wifi_skip_anyway,
-                            new DialogInterface.OnClickListener() {
-                                @Override
-                                public void onClick(DialogInterface dialog, int id) {
-                                    WifiSetupActivity activity = (WifiSetupActivity) getActivity();
-                                    activity.finish(RESULT_SKIP);
-                                }
-                            })
-                    .setNegativeButton(R.string.wifi_dont_skip,
-                            new DialogInterface.OnClickListener() {
-                                @Override
-                                public void onClick(DialogInterface dialog, int id) {
-                                }
-                            })
-                    .create();
-            SetupWizardUtils.applyImmersiveFlags(dialog);
-            return dialog;
-        }
-    }
-}
diff --git a/tests/app/src/com/android/settings/dashboard/FirstIdViewMatcher.java b/tests/app/src/com/android/settings/dashboard/FirstIdViewMatcher.java
new file mode 100644
index 0000000..15290b1
--- /dev/null
+++ b/tests/app/src/com/android/settings/dashboard/FirstIdViewMatcher.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.dashboard;
+
+import android.content.res.Resources;
+import android.view.View;
+
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.hamcrest.TypeSafeMatcher;
+
+/***
+ * Matches on the first view with id if there are multiple views using the same Id.
+ */
+public class FirstIdViewMatcher {
+
+    public static Matcher<View> withFirstId(final int id) {
+        return new TypeSafeMatcher<View>() {
+            Resources resources = null;
+            private boolean mMatched;
+
+            public void describeTo(Description description) {
+                description.appendText(" is the first view that matches id.");
+            }
+
+            public boolean matchesSafely(View view) {
+                this.resources = view.getResources();
+                if (mMatched) {
+                    return false;
+                } else {
+                    mMatched |= id == view.getId();
+                    return mMatched;
+                }
+            }
+        };
+    }
+}
diff --git a/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java b/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java
new file mode 100644
index 0000000..b99f753e
--- /dev/null
+++ b/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.dashboard;
+
+import android.app.Instrumentation;
+import android.content.Context;
+import android.content.Intent;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import com.android.settings.R;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static com.android.settings.dashboard.FirstIdViewMatcher.withFirstId;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class PreferenceThemeTest {
+
+    private Instrumentation mInstrumentation;
+    private Context mTargetContext;
+    private String mTargetPackage;
+
+    @Before
+    public void setUp() throws Exception {
+        mInstrumentation = InstrumentationRegistry.getInstrumentation();
+        mTargetContext = mInstrumentation.getTargetContext();
+        mTargetPackage = mTargetContext.getPackageName();
+    }
+
+    @Test
+    public void startPhoneStatus_preferenceIconSpaceReserved() throws InterruptedException {
+        launchPhoneStatus();
+        onView(withId(android.R.id.icon_frame)).check(doesNotExist());
+        onView(withFirstId(R.id.icon_container)).check(matches(isDisplayed()));
+    }
+
+    private void launchPhoneStatus() {
+        final Intent settingsIntent = new Intent("android.settings.DEVICE_INFO_SETTINGS")
+                .addCategory(Intent.CATEGORY_DEFAULT)
+                .setPackage(mTargetPackage)
+                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        InstrumentationRegistry.getInstrumentation().startActivitySync(settingsIntent);
+    }
+}
diff --git a/tests/robotests/assets/grandfather_not_in_search_index_provider_registry b/tests/robotests/assets/grandfather_not_in_search_index_provider_registry
index 29f3816..a95fc0b 100644
--- a/tests/robotests/assets/grandfather_not_in_search_index_provider_registry
+++ b/tests/robotests/assets/grandfather_not_in_search_index_provider_registry
@@ -1,3 +1,2 @@
 com.android.settings.display.ScreenZoomPreferenceFragmentForSetupWizard
-com.android.settings.wifi.WifiSettingsForSetupWizard
 com.android.settings.print.PrintServiceSettingsFragment
diff --git a/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java
index 9ecd1d8..552c689 100644
--- a/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java
@@ -244,7 +244,8 @@
         infos.add(new UserInfo(1, "user 1", UserInfo.FLAG_MANAGED_PROFILE));
         when(mUserManager.isManagedProfile()).thenReturn(false);
         when(mUserManager.getProfiles(anyInt())).thenReturn(infos);
-        when(mAccountHelper.hasBaseUserRestriction(eq(UserManager.DISALLOW_REMOVE_USER), anyInt()))
+        when(mAccountHelper.hasBaseUserRestriction(
+                eq(UserManager.DISALLOW_REMOVE_MANAGED_PROFILE), anyInt()))
             .thenReturn(true);
 
         mController.updateRawDataToIndex(data);
diff --git a/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java b/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java
index 71bb4f6..e3d4c94 100644
--- a/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java
@@ -51,6 +51,7 @@
     private final Account USER_2 = new Account("user2", ACCOUNT_TYPE);
     private final Account TWO_ACCOUNTS[] = {USER_1, USER_2};
     private final Account ONE_ACCOUNT[] = {USER_1};
+    private final Account ZERO_ACCOUNT[] = {};
 
     private ShadowActivity mShadowActivity;
     private Activity mActivity;
@@ -98,6 +99,18 @@
         verify(mSupportFeatureProvider).getAccountLoginIntent();
     }
 
+    @Test
+    public void testSetAccount_AccountEmpty_NotCrash() {
+        when(mSupportFeatureProvider.getSupportEligibleAccounts(mActivity)).thenReturn(ZERO_ACCOUNT);
+        mSupportItemAdapter = new SupportItemAdapter(mActivity, null, mSupportFeatureProvider,
+            mMetricsFeatureProvider, null);
+
+        // Should not crash in this method
+        mSupportItemAdapter.setAccounts(ONE_ACCOUNT);
+
+        verify(mSupportFeatureProvider).getSupportEligibleAccounts(mActivity);
+    }
+
     /**
      * Check after {@link SupportItemAdapter#bindAccountPicker(SupportItemAdapter.ViewHolder)} is
      * invoked, whether the spinner in {@paramref viewHolder} has all the data from {@paramref
diff --git a/tests/robotests/src/com/android/settings/development/BugReportInPowerPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/BugReportInPowerPreferenceControllerTest.java
new file mode 100644
index 0000000..4ca6609
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/development/BugReportInPowerPreferenceControllerTest.java
@@ -0,0 +1,193 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.development;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.provider.Settings;
+import android.os.UserManager;
+import android.support.v14.preference.SwitchPreference;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceScreen;
+
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Answers.RETURNS_DEEP_STUBS;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doCallRealMethod;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class BugReportInPowerPreferenceControllerTest {
+
+    @Mock(answer = RETURNS_DEEP_STUBS)
+    private PreferenceScreen mScreen;
+    @Mock
+    private UserManager mUserManager;
+    @Mock
+    private PackageManager mPackageManager;
+
+    private Context mContext;
+    private SwitchPreference mPreference;
+    private BugReportInPowerPreferenceController mController;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        ShadowApplication shadowContext = ShadowApplication.getInstance();
+        shadowContext.setSystemService(Context.USER_SERVICE, mUserManager);
+        mContext = spy(shadowContext.getApplicationContext());
+        when(mContext.getPackageManager()).thenReturn(mPackageManager);
+        mPreference = new SwitchPreference(mContext);
+        when(mScreen.findPreference(anyString())).thenReturn(mPreference);
+        mController = new BugReportInPowerPreferenceController(mContext);
+        mPreference.setKey(mController.getPreferenceKey());
+    }
+
+    @Test
+    public void displayPreference_hasDebugRestriction_shouldRemovePreference() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
+
+        mController.displayPreference(mScreen);
+
+        verify(mScreen).removePreference(any(Preference.class));
+    }
+
+    @Test
+    public void displayPreference_noDebugRestriction_shouldNotRemovePreference() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+
+        mController.displayPreference(mScreen);
+
+        verify(mScreen, never()).removePreference(any(Preference.class));
+    }
+
+    @Test
+    public void enablePreference_hasDebugRestriction_shouldNotEnable() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
+        mController.displayPreference(mScreen);
+        mPreference.setEnabled(false);
+
+        mController.enablePreference(true);
+
+        assertThat(mPreference.isEnabled()).isFalse();
+    }
+
+    @Test
+    public void enablePreference_noDebugRestriction_shouldEnable() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        mController.displayPreference(mScreen);
+        mPreference.setEnabled(false);
+
+        mController.enablePreference(true);
+
+        assertThat(mPreference.isEnabled()).isTrue();
+    }
+
+    @Test
+    public void resetPreference_shouldUncheck() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        mController.displayPreference(mScreen);
+        mPreference.setChecked(true);
+
+        mController.resetPreference();
+
+        assertThat(mPreference.isChecked()).isFalse();
+    }
+
+    @Test
+    public void handlePreferenceTreeClick_shouldUpdateSettings() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+            Settings.Global.BUGREPORT_IN_POWER_MENU, 0);
+        mPreference.setChecked(true);
+        mController.displayPreference(mScreen);
+
+        mController.handlePreferenceTreeClick(mPreference);
+
+        assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
+            Settings.Global.BUGREPORT_IN_POWER_MENU, 0)).isEqualTo(1);
+    }
+
+    @Test
+    public void updateState_settingsOn_shouldCheck() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+            Settings.Global.BUGREPORT_IN_POWER_MENU, 1);
+        mPreference.setChecked(false);
+        mController.displayPreference(mScreen);
+
+        mController.updateState(mPreference);
+
+        assertThat(mPreference.isChecked()).isTrue();
+    }
+
+    @Test
+    public void updateState_settingsOff_shouldUncheck() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+            Settings.Global.BUGREPORT_IN_POWER_MENU, 0);
+        mPreference.setChecked(true);
+        mController.displayPreference(mScreen);
+
+        mController.updateState(mPreference);
+
+        assertThat(mPreference.isChecked()).isFalse();
+    }
+
+    @Test
+    public void updateBugreportOptions_shouldEnable() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        mPreference.setEnabled(false);
+        mController.displayPreference(mScreen);
+
+        mController.updateBugreportOptions();
+
+        assertThat(mPreference.isEnabled()).isTrue();
+    }
+
+    @Test
+    public void updateBugreportOptions_shouldEnableBugReportStorage() {
+        final ComponentName componentName = new ComponentName("com.android.shell",
+            "com.android.shell.BugreportStorageProvider");
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        mController.displayPreference(mScreen);
+
+        mController.updateBugreportOptions();
+
+        verify(mPackageManager).setComponentEnabledSetting(eq(componentName), anyInt(), anyInt());
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/development/BugReportPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/BugReportPreferenceControllerTest.java
new file mode 100644
index 0000000..377b467
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/development/BugReportPreferenceControllerTest.java
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.development;
+
+import android.content.Context;
+import android.os.UserManager;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceScreen;
+
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settingslib.drawer.CategoryKey;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Answers;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+
+import static org.mockito.Answers.RETURNS_DEEP_STUBS;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class BugReportPreferenceControllerTest {
+
+    @Mock
+    private Context mContext;
+    @Mock
+    private Preference mPreference;
+    @Mock(answer = RETURNS_DEEP_STUBS)
+    private PreferenceScreen mScreen;
+    @Mock
+    private UserManager mUserManager;
+
+    private BugReportPreferenceController mController;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
+        when(mScreen.findPreference(anyString())).thenReturn(mPreference);
+        mController = new BugReportPreferenceController(mContext);
+    }
+
+    @Test
+    public void displayPreference_hasDebugRestriction_shouldRemovePreference() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
+
+        mController.displayPreference(mScreen);
+
+        verify(mScreen).removePreference(any(Preference.class));
+    }
+
+    @Test
+    public void displayPreference_noDebugRestriction_shouldNotRemovePreference() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+
+        mController.displayPreference(mScreen);
+
+        verify(mScreen, never()).removePreference(any(Preference.class));
+    }
+
+    @Test
+    public void enablePreference_hasDebugRestriction_shouldNotEnable() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
+        mController.displayPreference(mScreen);
+
+        mController.enablePreference(true);
+
+        verify(mPreference, never()).setEnabled(anyBoolean());
+    }
+
+    @Test
+    public void enablePreference_noDebugRestriction_shouldEnable() {
+        when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
+        mController.displayPreference(mScreen);
+
+        mController.enablePreference(true);
+
+        verify(mPreference).setEnabled(anyBoolean());
+    }
+
+}
diff --git a/tests/robotests/src/com/android/settings/search/DatabaseIndexingManagerTest.java b/tests/robotests/src/com/android/settings/search/DatabaseIndexingManagerTest.java
new file mode 100644
index 0000000..8b363b0
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/search/DatabaseIndexingManagerTest.java
@@ -0,0 +1,616 @@
+/*
+ * 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.
+ *
+ */
+
+package com.android.settings.search;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.provider.SearchIndexableResource;
+import com.android.settings.R;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.search2.DatabaseIndexingManager;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.spy;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class DatabaseIndexingManagerTest {
+    private final String localeStr = "en_US";
+
+    private final int rank = 42;
+    private final String title = "title\u2011title";
+    private final String updatedTitle = "title-title";
+    private final String normalizedTitle = "titletitle";
+    private final String summaryOn = "summary\u2011on";
+    private final String updatedSummaryOn = "summary-on";
+    private final String normalizedSummaryOn = "summaryon";
+    private final String summaryOff = "summary\u2011off";
+    private final String updatedSummaryOff ="summary-off";
+    private final String normalizedSummaryOff = "summaryoff";
+    private final String entries = "entries";
+    private final String keywords = "keywords, keywordss, keywordsss";
+    private final String spaceDelimittedKeywords = "keywords keywordss keywordsss";
+    private final String screenTitle = "screen title";
+    private final String className = "class name";
+    private final int iconResId = 0xff;
+    private final String action = "action";
+    private final String targetPackage = "target package";
+    private final String targetClass = "target class";
+    private final String packageName = "package name";
+    private final String key = "key";
+    private final int userId = -1;
+    private final boolean enabled = true;
+
+    private Context mContext;
+    private DatabaseIndexingManager mManager;
+    private SQLiteDatabase mDb;
+
+    @Before
+    public void setUp() {
+        mContext = ShadowApplication.getInstance().getApplicationContext();
+        mManager = spy(new DatabaseIndexingManager(mContext, mContext.getPackageName()));
+        mDb = IndexDatabaseHelper.getInstance(mContext).getWritableDatabase();
+    }
+
+    @After
+    public void cleanUp() {
+        Field instance;
+        Class clazz = IndexDatabaseHelper.class;
+        try {
+            instance = clazz.getDeclaredField("sSingleton");
+            instance.setAccessible(true);
+            instance.set(null, null);
+        } catch (Exception e) {
+            throw new RuntimeException();
+        }
+    }
+
+    @Test
+    public void testDatabaseSchema() {
+        Cursor dbCursor = mDb.query("prefs_index", null, null, null, null, null, null);
+        List<String> columnNames = new ArrayList<>(Arrays.asList(dbCursor.getColumnNames()));
+        // Note that docid is not included.
+        List<String> expColumnNames = new ArrayList<>(Arrays.asList(new String[ ]{
+                "locale",
+                "data_rank",
+                "data_title",
+                "data_title_normalized",
+                "data_summary_on",
+                "data_summary_on_normalized",
+                "data_summary_off",
+                "data_summary_off_normalized",
+                "data_entries",
+                "data_keywords",
+                "class_name",
+                "screen_title",
+                "intent_action",
+                "intent_target_package",
+                "intent_target_class",
+                "icon",
+                "enabled",
+                "data_key_reference",
+                "user_id",
+                "payload_type",
+                "payload"
+        }));
+        // Prevent database schema regressions
+        assertThat(columnNames).containsAllIn(expColumnNames);
+    }
+
+    // Tests for the flow: IndexOneRaw -> UpdateOneRowWithFilteredData -> UpdateOneRow
+
+    @Test
+    public void testInsertRawColumn_RowInserted() {
+        SearchIndexableRaw raw = getFakeRaw();
+        mManager.indexOneSearchIndexableData(mDb, localeStr, raw, null /* Non-indexable keys */);
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        assertThat(cursor.getCount()).isEqualTo(1);
+    }
+
+    @Test
+    public void testInsertRawColumn_RowMatches() {
+        SearchIndexableRaw raw = getFakeRaw();
+        mManager.indexOneSearchIndexableData(mDb, localeStr, raw, null /* Non-indexable keys */);
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        cursor.moveToPosition(0);
+
+        // Locale
+        assertThat(cursor.getString(0)).isEqualTo(localeStr);
+        // Data Rank
+        assertThat(cursor.getInt(1)).isEqualTo(raw.rank);
+        // Data Title
+        assertThat(cursor.getString(2)).isEqualTo(updatedTitle);
+        // Normalized Title
+        assertThat(cursor.getString(3)).isEqualTo(normalizedTitle);
+        // Summary On
+        assertThat(cursor.getString(4)).isEqualTo(updatedSummaryOn);
+        // Summary On Normalized
+        assertThat(cursor.getString(5)).isEqualTo(normalizedSummaryOn);
+        // Summary Off
+        assertThat(cursor.getString(6)).isEqualTo(updatedSummaryOff);
+        // Summary off normalized
+        assertThat(cursor.getString(7)).isEqualTo(normalizedSummaryOff);
+        // Entries
+        assertThat(cursor.getString(8)).isEqualTo(raw.entries);
+        // Keywords
+        assertThat(cursor.getString(9)).isEqualTo(spaceDelimittedKeywords);
+        // Screen Title
+        assertThat(cursor.getString(10)).isEqualTo(raw.screenTitle);
+        // Class Name
+        assertThat(cursor.getString(11)).isEqualTo(raw.className);
+        // Icon
+        assertThat(cursor.getInt(12)).isEqualTo(raw.iconResId);
+        // Intent Action
+        assertThat(cursor.getString(13)).isEqualTo(raw.intentAction);
+        // Target Package
+        assertThat(cursor.getString(14)).isEqualTo(raw.intentTargetPackage);
+        // Target Class
+        assertThat(cursor.getString(15)).isEqualTo(raw.intentTargetClass);
+        // Enabled
+        assertThat(cursor.getInt(16) == 1).isEqualTo(raw.enabled);
+        // Data ref key
+        assertThat(cursor.getString(17)).isNotNull();
+        // User Id
+        assertThat(cursor.getInt(18)).isEqualTo(raw.userId);
+        // Payload Type - default is 0
+        assertThat(cursor.getInt(19)).isEqualTo(0);
+        // Payload
+        assertThat(cursor.getBlob(20)).isNull();
+    }
+
+    @Test
+    public void testInsertRawColumnMismatchedLocale_NoRowInserted() {
+        SearchIndexableRaw raw = getFakeRaw("ca-fr");
+        mManager.indexOneSearchIndexableData(mDb, localeStr, raw, null /* Non-indexable keys */);
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        assertThat(cursor.getCount()).isEqualTo(0);
+    }
+
+    // Tests for the flow: IndexOneResource -> IndexFromResource ->
+    //                     UpdateOneRowWithFilteredData -> UpdateOneRow
+
+    @Test
+    public void testNullResource_NothingInserted() {
+        mManager.indexOneSearchIndexableData(mDb, localeStr, null /* searchIndexableResource */,
+                new HashMap<String, List<String>>());
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        assertThat(cursor.getCount()).isEqualTo(0);
+    }
+
+    @Test
+    public void testAddResource_RowsInserted() {
+        SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        assertThat(cursor.getCount()).isEqualTo(6);
+    }
+
+    @Test
+    public void testAddResourceHeader_RowsMatch() {
+        SearchIndexableResource resource = getFakeResource(R.xml.application_settings);
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index ORDER BY data_title", null);
+        cursor.moveToPosition(1);
+
+        // Locale
+        assertThat(cursor.getString(0)).isEqualTo(localeStr);
+        // Data Rank
+        assertThat(cursor.getInt(1)).isEqualTo(rank);
+        // Data Title
+        assertThat(cursor.getString(2)).isEqualTo("Apps");
+        // Normalized Title
+        assertThat(cursor.getString(3)).isEqualTo("apps");
+        // Summary On
+        assertThat(cursor.getString(4)).isEqualTo("Manage apps, set up quick launch shortcuts");
+        // Summary On Normalized
+        assertThat(cursor.getString(5)).isEqualTo("manage apps, set up quick launch shortcuts");
+        // Summary Off - only on for checkbox preferences
+        assertThat(cursor.getString(6)).isEmpty();
+        // Summary off normalized - only on for checkbox preferences
+        assertThat(cursor.getString(7)).isEmpty();
+        // Entries - only on for list preferences
+        assertThat(cursor.getString(8)).isNull();
+        // Keywords
+        assertThat(cursor.getString(9)).isEmpty();
+        // Screen Title
+        assertThat(cursor.getString(10)).isEqualTo("Apps");
+        // Class Name
+        assertThat(cursor.getString(11)).isEqualTo(className);
+        // Icon
+        assertThat(cursor.getInt(12)).isEqualTo(iconResId);
+        // Intent Action
+        assertThat(cursor.getString(13)).isEqualTo(action);
+        // Target Package
+        assertThat(cursor.getString(14)).isEqualTo(targetPackage);
+        // Target Class
+        assertThat(cursor.getString(15)).isEqualTo(targetClass);
+        // Enabled
+        assertThat(cursor.getInt(16) == 1).isEqualTo(enabled);
+        // Data ref key
+        assertThat(cursor.getString(17)).isEqualTo("applications_settings");
+        // User Id
+        assertThat(cursor.getInt(18)).isEqualTo(userId);
+        // Payload Type - default is 0
+        assertThat(cursor.getInt(19)).isEqualTo(0);
+        // Payload - should be updated to real payloads as controllers are added
+        assertThat(cursor.getBlob(20)).isNull();
+    }
+
+    @Test
+    public void testAddResourceCustomSetting_RowsMatch() {
+        SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        cursor.moveToPosition(0);
+
+        // Locale
+        assertThat(cursor.getString(0)).isEqualTo(localeStr);
+        // Data Rank
+        assertThat(cursor.getInt(1)).isEqualTo(rank);
+        // Data Title
+        assertThat(cursor.getString(2)).isEqualTo("Swipe for notifications");
+        // Normalized Title
+        assertThat(cursor.getString(3)).isEqualTo("swipe for notifications");
+        // Summary On
+        assertThat(cursor.getString(4)).isEqualTo("To check your notifications, " +
+                "swipe down on the fingerprint sensor on the back of your phone.");
+        // Summary On Normalized
+        assertThat(cursor.getString(5)).isEqualTo("to check your notifications, " +
+                "swipe down on the fingerprint sensor on the back of your phone.");
+        // Summary Off - only on for checkbox preferences
+        assertThat(cursor.getString(6)).isEmpty();
+        // Summary off normalized - only on for checkbox preferences
+        assertThat(cursor.getString(7)).isEmpty();
+        // Entries - only on for list preferences
+        assertThat(cursor.getString(8)).isNull();
+        // Keywords
+        assertThat(cursor.getString(9)).isEmpty();
+        // Screen Title
+        assertThat(cursor.getString(10)).isEqualTo("Gestures");
+        // Class Name
+        assertThat(cursor.getString(11)).isEqualTo(className);
+        // Icon
+        assertThat(cursor.getInt(12)).isEqualTo(iconResId);
+        // Intent Action
+        assertThat(cursor.getString(13)).isEqualTo(action);
+        // Target Package
+        assertThat(cursor.getString(14)).isEqualTo(targetPackage);
+        // Target Class
+        assertThat(cursor.getString(15)).isEqualTo(targetClass);
+        // Enabled
+        assertThat(cursor.getInt(16) == 1).isEqualTo(enabled);
+        // Data ref key
+        assertThat(cursor.getString(17)).isEqualTo("gesture_swipe_down_fingerprint");
+        // User Id
+        assertThat(cursor.getInt(18)).isEqualTo(userId);
+        // Payload Type - default is 0
+        assertThat(cursor.getInt(19)).isEqualTo(0);
+        // Payload - should be updated to real payloads as controllers are added
+        assertThat(cursor.getBlob(20)).isNull();
+    }
+
+    @Test
+    public void testAddResourceCheckboxPreference_RowsMatch() {
+        SearchIndexableResource resource = getFakeResource(R.xml.application_settings);
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+
+        /* Should return 6 results, with the following titles:
+         * Advanced Settings, Apps, Manage Apps, Preferred install location, Running Services
+         */
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index ORDER BY data_title", null);
+        cursor.moveToPosition(0);
+        // Locale
+        assertThat(cursor.getString(0)).isEqualTo(localeStr);
+        // Data Rank
+        assertThat(cursor.getInt(1)).isEqualTo(rank);
+        // Data Title
+        assertThat(cursor.getString(2)).isEqualTo("Advanced settings");
+        // Normalized Title
+        assertThat(cursor.getString(3)).isEqualTo("advanced settings");
+        // Summary On
+        assertThat(cursor.getString(4)).isEqualTo("Enable more settings options");
+        // Summary On Normalized
+        assertThat(cursor.getString(5)).isEqualTo("enable more settings options");
+        // Summary Off
+        assertThat(cursor.getString(6)).isEqualTo("Enable more settings options");
+        // Summary Off
+        assertThat(cursor.getString(7)).isEqualTo("enable more settings options");
+        // Entries - only on for list preferences
+        assertThat(cursor.getString(8)).isNull();
+        // Keywords
+        assertThat(cursor.getString(9)).isEmpty();
+        // Screen Title
+        assertThat(cursor.getString(10)).isEqualTo("Apps");
+        // Class Name
+        assertThat(cursor.getString(11)).isEqualTo(className);
+        // Icon
+        assertThat(cursor.getInt(12)).isEqualTo(iconResId);
+        // Intent Action
+        assertThat(cursor.getString(13)).isEqualTo(action);
+        // Target Package
+        assertThat(cursor.getString(14)).isEqualTo(targetPackage);
+        // Target Class
+        assertThat(cursor.getString(15)).isEqualTo(targetClass);
+        // Enabled
+        assertThat(cursor.getInt(16) == 1).isEqualTo(enabled);
+        // Data ref key
+        assertThat(cursor.getString(17)).isEqualTo("toggle_advanced_settings");
+        // User Id
+        assertThat(cursor.getInt(18)).isEqualTo(userId);
+        // Payload Type - default is 0
+        assertThat(cursor.getInt(19)).isEqualTo(0);
+        // Payload - should be updated to real payloads as controllers are added
+        assertThat(cursor.getBlob(20)).isNull();
+    }
+
+    @Test
+    public void testAddResourceListPreference_RowsMatch() {
+        SearchIndexableResource resource = getFakeResource(R.xml.application_settings);
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index ORDER BY data_title", null);
+        cursor.moveToPosition(3);
+        // Locale
+        assertThat(cursor.getString(0)).isEqualTo(localeStr);
+        // Data Rank
+        assertThat(cursor.getInt(1)).isEqualTo(rank);
+        // Data Title
+        assertThat(cursor.getString(2)).isEqualTo("Preferred install location");
+        // Normalized Title
+        assertThat(cursor.getString(3)).isEqualTo("preferred install location");
+        // Summary On
+        assertThat(cursor.getString(4)).isEqualTo("Change the preferred installation location for new apps");
+        // Summary On Normalized
+        assertThat(cursor.getString(5)).isEqualTo("change the preferred installation location for new apps");
+        // Summary Off - only on for checkbox preferences
+        assertThat(cursor.getString(6)).isEmpty();
+        // Summary off normalized - only on for checkbox preferences
+        assertThat(cursor.getString(7)).isEmpty();
+        // Entries - only on for list preferences
+        assertThat(cursor.getString(8)).isEqualTo("Internal device storage|Removable SD card|" +
+                        "Let the system decide|");
+        // Keywords
+        assertThat(cursor.getString(9)).isEmpty();
+        // Screen Title
+        assertThat(cursor.getString(10)).isEqualTo("Apps");
+        // Class Name
+        assertThat(cursor.getString(11)).isEqualTo(className);
+        // Icon
+        assertThat(cursor.getInt(12)).isEqualTo(iconResId);
+        // Intent Action
+        assertThat(cursor.getString(13)).isEqualTo(action);
+        // Target Package
+        assertThat(cursor.getString(14)).isEqualTo(targetPackage);
+        // Target Class
+        assertThat(cursor.getString(15)).isEqualTo(targetClass);
+        // Enabled
+        assertThat(cursor.getInt(16) == 1).isEqualTo(enabled);
+        // Data ref key
+        assertThat(cursor.getString(17)).isEqualTo("app_install_location");
+        // User Id
+        assertThat(cursor.getInt(18)).isEqualTo(userId);
+        // Payload Type - default is 0
+        assertThat(cursor.getInt(19)).isEqualTo(0);
+        // Payload - should be updated to real payloads as controllers are added
+        assertThat(cursor.getBlob(20)).isNull();
+    }
+
+    // Tests for the flow: IndexOneResource -> IndexFromProvider -> IndexFromResource ->
+    //                     UpdateOneRowWithFilteredData -> UpdateOneRow
+
+    @Test
+    public void testResourceProvider_RowInserted() {
+        SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
+        resource.xmlResId = 0;
+        resource.className = "com.android.settings.display.ScreenZoomSettings";
+
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        assertThat(cursor.getCount()).isEqualTo(1);
+    }
+
+    @Test
+    public void testResourceProvider_Matches() {
+        SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
+        resource.xmlResId = 0;
+        resource.className = "com.android.settings.display.ScreenZoomSettings";
+
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        cursor.moveToPosition(0);
+
+        // Locale
+        assertThat(cursor.getString(0)).isEqualTo(localeStr);
+        // Data Rank
+        assertThat(cursor.getInt(1)).isEqualTo(rank);
+        // Data Title
+        assertThat(cursor.getString(2)).isEqualTo("Display size");
+        // Normalized Title
+        assertThat(cursor.getString(3)).isEqualTo("display size");
+        // Summary On
+        assertThat(cursor.getString(4)).isEmpty();
+        // Summary On Normalized
+        assertThat(cursor.getString(5)).isEmpty();
+        // Summary Off - only on for checkbox preferences
+        assertThat(cursor.getString(6)).isEmpty();
+        // Summary off normalized - only on for checkbox preferences
+        assertThat(cursor.getString(7)).isEmpty();
+        // Entries - only on for list preferences
+        assertThat(cursor.getString(8)).isNull();
+        // Keywords
+        assertThat(cursor.getString(9)).isEqualTo("display density screen zoom scale scaling");
+        // Screen Title
+        assertThat(cursor.getString(10)).isEqualTo("Display size");
+        // Class Name
+        assertThat(cursor.getString(11))
+                .isEqualTo("com.android.settings.display.ScreenZoomSettings");
+        // Icon
+        assertThat(cursor.getInt(12)).isEqualTo(iconResId);
+        // Intent Action
+        assertThat(cursor.getString(13)).isNull();
+        // Target Package
+        assertThat(cursor.getString(14)).isNull();
+        // Target Class
+        assertThat(cursor.getString(15)).isNull();
+        // Enabled
+        assertThat(cursor.getInt(16) == 1).isEqualTo(enabled);
+        // Data ref key
+        assertThat(cursor.getString(17)).isNull();
+        // User Id
+        assertThat(cursor.getInt(18)).isEqualTo(userId);
+        // Payload Type - default is 0
+        assertThat(cursor.getInt(19)).isEqualTo(0);
+        // Payload - should be updated to real payloads as controllers are added
+        assertThat(cursor.getBlob(20)).isNull();
+    }
+
+    @Test
+    public void testResourceProvider_ResourceRowInserted() {
+        SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
+        resource.xmlResId = 0;
+        resource.className = "com.android.settings.LegalSettings";
+
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
+        assertThat(cursor.getCount()).isEqualTo(2);
+    }
+
+    @Test
+    public void testResourceProvider_ResourceRowMatches() {
+        SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
+        resource.xmlResId = 0;
+        resource.className = "com.android.settings.LegalSettings";
+
+        mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
+                new HashMap<String, List<String>>());
+        Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index ORDER BY data_title", null);
+        cursor.moveToPosition(0);
+
+        // Locale
+        assertThat(cursor.getString(0)).isEqualTo(localeStr);
+        // Data Rank
+        assertThat(cursor.getInt(1)).isEqualTo(rank);
+        // Data Title
+        assertThat(cursor.getString(2)).isEqualTo("Legal information");
+        // Normalized Title
+        assertThat(cursor.getString(3)).isEqualTo("legal information");
+        // Summary On
+        assertThat(cursor.getString(4)).isEmpty();
+        // Summary On Normalized
+        assertThat(cursor.getString(5)).isEmpty();
+        // Summary Off - only on for checkbox preferences
+        assertThat(cursor.getString(6)).isEmpty();
+        // Summary off normalized - only on for checkbox preferences
+        assertThat(cursor.getString(7)).isEmpty();
+        // Entries - only on for list preferences
+        assertThat(cursor.getString(8)).isNull();
+        // Keywords
+        assertThat(cursor.getString(9)).isEmpty();
+        // Screen Title
+        assertThat(cursor.getString(10)).isEqualTo("Legal information");
+        // Class Name
+        assertThat(cursor.getString(11))
+                .isEqualTo("com.android.settings.LegalSettings");
+        // Icon
+        assertThat(cursor.getInt(12)).isEqualTo(iconResId);
+        // Intent Action
+        assertThat(cursor.getString(13)).isNull();
+        // Target Package
+        assertThat(cursor.getString(14)).isNull();
+        // Target Class
+        assertThat(cursor.getString(15)).isNull();
+        // Enabled
+        assertThat(cursor.getInt(16) == 1).isEqualTo(enabled);
+        // Data ref key
+        assertThat(cursor.getString(17)).isNull();
+        // User Id
+        assertThat(cursor.getInt(18)).isEqualTo(userId);
+        // Payload Type - default is 0
+        assertThat(cursor.getInt(19)).isEqualTo(0);
+        // Payload - should be updated to real payloads as controllers are added
+        assertThat(cursor.getBlob(20)).isNull();
+    }
+
+    // Util functions
+
+    private SearchIndexableRaw getFakeRaw() {
+        return getFakeRaw(localeStr);
+    }
+
+    private SearchIndexableRaw getFakeRaw(String localeStr) {
+        SearchIndexableRaw data = new SearchIndexableRaw(mContext);
+        data.locale = new Locale(localeStr);
+        data.rank = rank;
+        data.title = title;
+        data.summaryOn = summaryOn;
+        data.summaryOff = summaryOff;
+        data.entries = entries;
+        data.keywords = keywords;
+        data.screenTitle = screenTitle;
+        data.className = className;
+        data.packageName = packageName;
+        data.iconResId = iconResId;
+        data.intentAction = action;
+        data.intentTargetPackage = targetPackage;
+        data.intentTargetClass = targetClass;
+        data.key = key;
+        data.userId = userId;
+        data.enabled = enabled;
+        return data;
+    }
+
+    private SearchIndexableResource getFakeResource(int xml) {
+        SearchIndexableResource sir = new SearchIndexableResource(mContext);
+        sir.rank = rank;
+        sir.xmlResId = xml;
+        sir.className = className;
+        sir.packageName = packageName;
+        sir.iconResId = iconResId;
+        sir.intentAction = action;
+        sir.intentTargetPackage = targetPackage;
+        sir.intentTargetClass = targetClass;
+        sir.enabled = enabled;
+        return sir;
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/search/DatabaseResultLoaderTest.java b/tests/robotests/src/com/android/settings/search/DatabaseResultLoaderTest.java
index a744bb7..1df7b1f 100644
--- a/tests/robotests/src/com/android/settings/search/DatabaseResultLoaderTest.java
+++ b/tests/robotests/src/com/android/settings/search/DatabaseResultLoaderTest.java
@@ -22,20 +22,23 @@
 import android.content.Intent;
 import android.database.MatrixCursor;
 import android.graphics.drawable.Drawable;
+
+import com.android.settings.R;
 import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.SubSettings;
 import com.android.settings.TestConfig;
+import com.android.settings.gestures.GestureSettings;
 import com.android.settings.search2.DatabaseResultLoader;
 import com.android.settings.search2.IntentPayload;
 import com.android.settings.search2.ResultPayload;
 import com.android.settings.search2.ResultPayload.PayloadType;
 import com.android.settings.search2.SearchResult;
-import com.android.settings.R;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-
-import org.robolectric.annotation.Config;
 import org.robolectric.Robolectric;
+import org.robolectric.annotation.Config;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -47,7 +50,11 @@
 public class DatabaseResultLoaderTest {
     private DatabaseResultLoader mLoader;
 
-    private static final String[] TITLES = new String[] {"title1", "title2", "title3"};
+    private static final String[] COLUMNS = new String[]{"rank", "title", "summary_on",
+            "summary off", "entries", "keywords", "class name", "screen title", "icon",
+            "intent action", "target package", "target class", "enabled", "key", "user id"};
+
+    private static final String[] TITLES = new String[]{"title1", "title2", "title3"};
     private static final String SUMMARY = "SUMMARY";
     private static final int EXAMPLES = 3;
     private static final Intent mIntent = new Intent("com.android.settings");
@@ -108,6 +115,16 @@
     }
 
     @Test
+    public void testParseCursor_NoIcon() {
+        List<SearchResult> results = mLoader.parseCursorForSearch(
+                getDummyCursor(false /* hasIcon */));
+        for (int i = 0; i < EXAMPLES; i++) {
+            Drawable resultDrawable = results.get(i).icon;
+            assertThat(resultDrawable).isNull();
+        }
+    }
+
+    @Test
     public void testParseCursor_MatchesPayloadType() {
         List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
         ResultPayload payload;
@@ -118,6 +135,33 @@
     }
 
     @Test
+    public void testParseCursor_MatchesIntentForSubSettings() {
+        MatrixCursor cursor = new MatrixCursor(COLUMNS);
+        final String BLANK = "";
+        cursor.addRow(new Object[]{
+                0,       // rank
+                TITLES[0],
+                SUMMARY,
+                SUMMARY, // summary off
+                BLANK,   // entries
+                BLANK,   // Keywords
+                GestureSettings.class.getName(),
+                BLANK,   // screen title
+                null,    // icon
+                BLANK,   // action
+                null,    // target package
+                BLANK,   // target class
+                BLANK,   // enabled
+                BLANK,   // key
+                BLANK    // user id
+        });
+        List<SearchResult> results = mLoader.parseCursorForSearch(cursor);
+        IntentPayload payload = (IntentPayload) results.get(0).payload;
+        Intent intent = payload.intent;
+        assertThat(intent.getComponent().getClassName()).isEqualTo(SubSettings.class.getName());
+    }
+
+    @Test
     public void testParseCursor_MatchesIntentPayload() {
         List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
         IntentPayload payload;
@@ -129,14 +173,15 @@
     }
 
     private MatrixCursor getDummyCursor() {
-        String[] columns = new String[] {"rank", "title",  "summary_on", "summary off", "entries",
-                "keywords", "class name", "screen title", "icon", "intent action",
-                "target package", "target class", "enabled", "key", "user id"};
-        MatrixCursor cursor = new MatrixCursor(columns);
+        return getDummyCursor(true /* hasIcon */);
+    }
+
+    private MatrixCursor getDummyCursor(boolean hasIcon) {
+        MatrixCursor cursor = new MatrixCursor(COLUMNS);
         final String BLANK = "";
 
         for (int i = 0; i < EXAMPLES; i++) {
-            ArrayList<String> item = new ArrayList<>(columns.length);
+            ArrayList<String> item = new ArrayList<>(COLUMNS.length);
             item.add(Integer.toString(i));
             item.add(TITLES[i]);
             item.add(SUMMARY);
@@ -145,7 +190,7 @@
             item.add(BLANK); // keywords
             item.add(BLANK); // classname
             item.add(BLANK); // screen title
-            item.add(Integer.toString(mIcon));
+            item.add(hasIcon ? Integer.toString(mIcon) : null);
             item.add(mIntent.getAction());
             item.add(BLANK); // target package
             item.add(BLANK); // target class
diff --git a/tests/robotests/src/com/android/settings/search/DatabaseRowTest.java b/tests/robotests/src/com/android/settings/search/DatabaseRowTest.java
new file mode 100644
index 0000000..34626bd
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/search/DatabaseRowTest.java
@@ -0,0 +1,150 @@
+/*
+ * 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 static for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.android.settings.search;
+
+import android.content.Intent;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.search2.DatabaseIndexingManager.DatabaseRow;
+import com.android.settings.search2.DatabaseIndexingManager.DatabaseRow.Builder;
+import com.android.settings.search2.IntentPayload;
+import com.android.settings.search2.ResultPayload;
+import com.android.settings.search2.ResultPayloadUtils;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.annotation.Config;
+
+import static com.google.common.truth.Truth.assertThat;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class DatabaseRowTest {
+    private Builder builder;
+
+    private static final String LOCALE = "locale";
+    private static final String UPDATED_TITLE = "updated title";
+    private static final String NORMALIZED_TITLE = "normal title";
+    private static final String UPDATED_SUMMARY_ON = "updated summary on";
+    private static final String NORMALIZED_SUMMARY_ON = "normalized summary on";
+    private static final String UPDATED_SUMMARY_OFF = "updated summary off";
+    private static final String NORMALIZED_SUMMARY_OFF = "normalized summary off";
+    private static final String ENTRIES = "entries";
+    private static final String CLASS_NAME = "class name";
+    private static final String SCREEN_TITLE = "sceen title";
+    private static final int ICON_RES_ID = 0xff;
+    private static final int RANK = 1;
+    private static final String SPACE_DELIMITED_KEYWORDS = "keywords";
+    private static final String INTENT_ACTION = "intent action";
+    private static final String INTENT_TARGET_PACKAGE = "target package";
+    private static final String INTENT_TARGET_CLASS = "target class";
+    private static final boolean ENABLED = true;
+    private static final String KEY = "key";
+    private static final int USER_ID = 1;
+    private static IntentPayload intentPayload;
+
+    private final String EXTRA_KEY = "key";
+    private final String EXTRA_VALUE = "value";
+
+    @Before
+    public void setUp() {
+        Intent intent = new Intent();
+        intent.putExtra(EXTRA_KEY, EXTRA_VALUE);
+        intentPayload = new IntentPayload(intent);
+
+        builder = new DatabaseRow.Builder();
+    }
+
+    @Test
+    public void testFullRowBuild_NonNull() {
+        DatabaseRow row = generateRow();
+        assertThat(row).isNotNull();
+    }
+
+    @Test
+    public void testPrimativesBuild_NoDataLoss() {
+        DatabaseRow row = generateRow();
+
+        assertThat(row.locale).isEqualTo(LOCALE);
+        assertThat(row.updatedTitle).isEqualTo(UPDATED_TITLE);
+        assertThat(row.normalizedTitle).isEqualTo(NORMALIZED_TITLE);
+        assertThat(row.updatedSummaryOn).isEqualTo(UPDATED_SUMMARY_ON);
+        assertThat(row.normalizedSummaryOn).isEqualTo(NORMALIZED_SUMMARY_ON);
+        assertThat(row.updatedSummaryOff).isEqualTo(UPDATED_SUMMARY_OFF);
+        assertThat(row.normalizedSummaryOff).isEqualTo(NORMALIZED_SUMMARY_OFF);
+        assertThat(row.entries).isEqualTo(ENTRIES);
+        assertThat(row.className).isEqualTo(CLASS_NAME);
+        assertThat(row.screenTitle).isEqualTo(SCREEN_TITLE);
+        assertThat(row.iconResId).isEqualTo(ICON_RES_ID);
+        assertThat(row.rank).isEqualTo(RANK);
+        assertThat(row.spaceDelimitedKeywords).isEqualTo(SPACE_DELIMITED_KEYWORDS);
+        assertThat(row.intentAction).isEqualTo(INTENT_ACTION);
+        assertThat(row.intentTargetClass).isEqualTo(INTENT_TARGET_CLASS);
+        assertThat(row.intentTargetPackage).isEqualTo(INTENT_TARGET_PACKAGE);
+        assertThat(row.enabled).isEqualTo(ENABLED);
+        assertThat(row.userId).isEqualTo(USER_ID);
+        assertThat(row.key).isEqualTo(KEY);
+        assertThat(row.payloadType).isEqualTo(ResultPayload.PayloadType.INTENT);
+    }
+
+    @Test
+    public void testPayload_PayloadTypeAdded() {
+        DatabaseRow row = generateRow();
+        byte[] marshalledPayload = row.payload;
+        IntentPayload payload = ResultPayloadUtils.unmarshall(marshalledPayload,
+                IntentPayload.CREATOR);
+
+        Intent intent = payload.intent;
+        assertThat(intent.getExtra(EXTRA_KEY)).isEqualTo(EXTRA_VALUE);
+    }
+
+    @Test
+    public void TestNullPayload_NoCrash() {
+        Builder builder = new Builder();
+        builder.setPayload(null);
+        DatabaseRow row = builder.build();
+
+        assertThat(row.payload).isNull();
+    }
+
+    private DatabaseRow generateRow() {
+        builder.setLocale(LOCALE)
+                .setUpdatedTitle(UPDATED_TITLE)
+                .setNormalizedTitle(NORMALIZED_TITLE)
+                .setUpdatedSummaryOn(UPDATED_SUMMARY_ON)
+                .setNormalizedSummaryOn(NORMALIZED_SUMMARY_ON)
+                .setUpdatedSummaryOff(UPDATED_SUMMARY_OFF)
+                .setNormalizedSummaryOff(NORMALIZED_SUMMARY_OFF)
+                .setEntries(ENTRIES)
+                .setClassName(CLASS_NAME)
+                .setScreenTitle(SCREEN_TITLE)
+                .setIconResId(ICON_RES_ID)
+                .setRank(RANK)
+                .setSpaceDelimitedKeywords(SPACE_DELIMITED_KEYWORDS)
+                .setIntentAction(INTENT_ACTION)
+                .setIntentTargetPackage(INTENT_TARGET_PACKAGE)
+                .setIntentTargetClass(INTENT_TARGET_CLASS)
+                .setEnabled(ENABLED)
+                .setKey(KEY)
+                .setUserId(USER_ID)
+                .setPayload(intentPayload);
+
+        return(builder.build());
+    }
+}
+;
diff --git a/tests/robotests/src/com/android/settings/search/ResultPayloadUtilsTest.java b/tests/robotests/src/com/android/settings/search/ResultPayloadUtilsTest.java
new file mode 100644
index 0000000..3875d86
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/search/ResultPayloadUtilsTest.java
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ *
+ */
+
+package com.android.settings.search;
+
+import android.content.Intent;
+import android.os.BadParcelableException;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.search2.IntentPayload;
+import com.android.settings.search2.ResultPayloadUtils;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.annotation.Config;
+
+import java.io.StreamCorruptedException;
+
+import static com.google.common.truth.Truth.assertThat;
+import static junit.framework.Assert.fail;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class ResultPayloadUtilsTest {
+    private IntentPayload payload;
+
+    private final String EXTRA_KEY = "key";
+    private final String EXTRA_VALUE = "value";
+
+    @Before
+    public void setUp() {
+        Intent intent = new Intent();
+        intent.putExtra(EXTRA_KEY, EXTRA_VALUE);
+        payload = new IntentPayload(intent);
+    }
+
+    @Test
+    public void testUnmarshallBadData_ExceptionThrown() {
+        byte[] badData = "I'm going to fail :)".getBytes();
+        try {
+            ResultPayloadUtils.unmarshall(badData, IntentPayload.CREATOR);
+            fail("unmarshall should throw exception");
+        } catch ( RuntimeException e) {
+            assertThat(e).isNotNull();
+        }
+    }
+
+    @Test
+    public void testMarshallIntentPayload_NonEmptyArray() {
+        byte[] marshalledPayload = ResultPayloadUtils.marshall(payload);
+        assertThat(marshalledPayload).isNotNull();
+        assertThat(marshalledPayload).isNotEmpty();
+    }
+
+    @Test
+    public void testUnmarshall_PreservedData() {
+        byte[] marshalledPayload = ResultPayloadUtils.marshall(payload);
+        IntentPayload newPayload = ResultPayloadUtils.unmarshall(marshalledPayload,
+                IntentPayload.CREATOR);
+
+        String originalIntentExtra = payload.intent.getStringExtra(EXTRA_KEY);
+        String copiedIntentExtra = newPayload.intent.getStringExtra(EXTRA_KEY);
+        assertThat(originalIntentExtra).isEqualTo(copiedIntentExtra);
+    }
+
+}
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/search/SearchFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/search/SearchFeatureProviderImplTest.java
index 67189d0..d9e2dd6 100644
--- a/tests/robotests/src/com/android/settings/search/SearchFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/search/SearchFeatureProviderImplTest.java
@@ -18,12 +18,18 @@
 package com.android.settings.search;
 
 import android.app.Activity;
+import android.content.Context;
+import android.content.res.Configuration;
 import android.view.Menu;
 
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
+import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.search2.DatabaseIndexingManager;
 import com.android.settings.search2.SearchFeatureProviderImpl;
 
+import com.android.settings.testutils.FakeFeatureFactory;
+import com.android.settingslib.drawer.DashboardCategory;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -33,9 +39,14 @@
 import org.robolectric.Robolectric;
 import org.robolectric.annotation.Config;
 
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
@@ -64,4 +75,22 @@
 
         verify(menu).add(anyInt(), anyInt(), anyInt(), anyString());
     }
+
+    @Test
+    public void testUpdateIndexNewSearch_UsesDatabaseIndexingManager() {
+        mProvider = spy(new SearchFeatureProviderImpl(mActivity));
+        when(mProvider.isEnabled()).thenReturn(true);
+
+        mProvider.updateIndex(mActivity);
+        verify(mProvider).getIndexingManager(any(Context.class));
+    }
+
+    @Test
+    public void testUpdateIndexNewSearch_UsesIndex() {
+        mProvider = spy(new SearchFeatureProviderImpl(mActivity));
+        when(mProvider.isEnabled()).thenReturn(false);
+
+        mProvider.updateIndex(mActivity);
+        verify(mProvider, never()).getIndexingManager(any(Context.class));
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/search/SearchResultBuilderTest.java b/tests/robotests/src/com/android/settings/search/SearchResultBuilderTest.java
index a0f4cc5..f83b595 100644
--- a/tests/robotests/src/com/android/settings/search/SearchResultBuilderTest.java
+++ b/tests/robotests/src/com/android/settings/search/SearchResultBuilderTest.java
@@ -100,37 +100,25 @@
     }
 
     @Test
-    public void testNoRank_BuildSearchResultException() {
+    public void testNoRank_BuildSearchResult_pass() {
         mBuilder.addTitle(mTitle)
                 .addSummary(mSummary)
                 .addBreadcrumbs(mBreadcrumbs)
                 .addIcon(mIcon)
                 .addPayload(mResultPayload);
 
-        SearchResult result = null;
-        try {
-            result = mBuilder.build();
-        } catch (IllegalArgumentException e) {
-            // passes.
-        }
-        assertThat(result).isNull();
+        assertThat(mBuilder.build()).isNotNull();
     }
 
     @Test
-    public void testNoIcon_BuildSearchResultException() {
+    public void testNoIcon_BuildSearchResult_pass() {
         mBuilder.addTitle(mTitle)
                 .addSummary(mSummary)
                 .addRank(mRank)
                 .addBreadcrumbs(mBreadcrumbs)
                 .addPayload(mResultPayload);
 
-        SearchResult result = null;
-        try {
-            result = mBuilder.build();
-        } catch (IllegalArgumentException e) {
-            // passes.
-        }
-        assertThat(result).isNull();
+        assertThat(mBuilder.build()).isNotNull();
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/search/XmlParserUtilTest.java b/tests/robotests/src/com/android/settings/search/XmlParserUtilTest.java
new file mode 100644
index 0000000..d0c691c
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/search/XmlParserUtilTest.java
@@ -0,0 +1,197 @@
+/*
+ * 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.
+ *
+ */
+
+package com.android.settings.search;
+
+import android.content.res.XmlResourceParser;
+import android.content.Context;
+import android.util.AttributeSet;
+import android.util.Xml;
+
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.R;
+
+import com.android.settings.search2.XmlParserUtils;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+import org.xmlpull.v1.XmlPullParser;
+
+import static com.google.common.truth.Truth.assertThat;
+
+/**
+ * These tests use a series of preferences that have specific attributes which are sometimes
+ * uncommon (such as summaryOn).
+ *
+ * If changing a preference file breaks a test in this test file, please replace its reference
+ * with another preference with a matchin replacement attribute.
+ */
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class XmlParserUtilTest {
+
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        mContext = ShadowApplication.getInstance().getApplicationContext();
+    }
+
+    @Test
+    public void testDataTitleValid_ReturnsPreferenceTitle() {
+        XmlResourceParser parser = getChildByType(R.xml.gesture_settings,
+                "com.android.settings.gestures.GesturePreference");
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String title = XmlParserUtils.getDataTitle(mContext, attrs);
+        String expTitle = mContext.getString(R.string.fingerprint_swipe_for_notifications_title);
+        assertThat(title).isEqualTo(expTitle);
+    }
+
+    @Test
+    public void testDataKeywordsValid_ReturnsPreferenceKeywords() {
+        XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String keywords = XmlParserUtils.getDataKeywords(mContext, attrs);
+        String expKeywords = mContext.getString(R.string.keywords_gesture);
+        assertThat(keywords).isEqualTo(expKeywords);
+    }
+
+    @Test
+    public void testDataKeyValid_ReturnsPreferenceKey() {
+        XmlResourceParser parser = getChildByType(R.xml.gesture_settings,
+                "com.android.settings.gestures.GesturePreference");
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String key = XmlParserUtils.getDataKey(mContext, attrs);
+        String expKey = "gesture_swipe_down_fingerprint";
+        assertThat(key).isEqualTo(expKey);
+    }
+
+    @Test
+    public void testDataSummaryValid_ReturnsPreferenceSummary() {
+        XmlResourceParser parser = getChildByType(R.xml.gesture_settings,
+                "com.android.settings.gestures.GesturePreference");
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String summary = XmlParserUtils.getDataSummary(mContext, attrs);
+        String expSummary = mContext.getString(R.string.fingerprint_swipe_for_notifications_summary);
+        assertThat(summary).isEqualTo(expSummary);
+
+    }
+
+    @Test
+    public void testDataSummaryOnValid_ReturnsPreferenceSummaryOn() {
+        XmlResourceParser parser = getChildByType(R.xml.application_settings, "CheckBoxPreference");
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String summary = XmlParserUtils.getDataSummaryOn(mContext, attrs);
+        String expSummary = mContext.getString(R.string.advanced_settings_summary);
+        assertThat(summary).isEqualTo(expSummary);
+    }
+
+    @Test
+    public void testDataSummaryOffValid_ReturnsPreferenceSummaryOff() {
+        XmlResourceParser parser = getChildByType(R.xml.application_settings, "CheckBoxPreference");
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String summary = XmlParserUtils.getDataSummaryOff(mContext, attrs);
+        String expSummary = mContext.getString(R.string.advanced_settings_summary);
+        assertThat(summary).isEqualTo(expSummary);
+    }
+
+    @Test
+    public void testDataEntriesValid_ReturnsPreferenceEntries() {
+        XmlResourceParser parser = getChildByType(R.xml.application_settings, "ListPreference");
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String entries = XmlParserUtils.getDataEntries(mContext, attrs);
+        String[] expEntries = mContext.getResources()
+                .getStringArray(R.array.app_install_location_entries);
+        for (int i = 0; i < expEntries.length; i++) {
+            assertThat(entries).contains(expEntries[i]);
+        }
+    }
+
+    // Null checks
+
+    @Test
+    public void testDataKeyInvalid_ReturnsNull() {
+        XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String key = XmlParserUtils.getDataKey(mContext, attrs);
+        assertThat(key).isNull();
+    }
+
+    @Test
+    public void testDataSummaryInvalid_ReturnsNull() {
+        XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String summary = XmlParserUtils.getDataSummary(mContext, attrs);
+        assertThat(summary).isNull();
+    }
+
+    @Test
+    public void testDataSummaryOffInvalid_ReturnsNull() {
+        XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String summaryOff = XmlParserUtils.getDataSummaryOff(mContext, attrs);
+        assertThat(summaryOff).isNull();
+    }
+
+    @Test
+    public void testDataEntriesInvalid_ReturnsNull() {
+        XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+        String entries = XmlParserUtils.getDataEntries(mContext, attrs);
+        assertThat(entries).isNull();
+    }
+
+    /**
+     * @param resId the ID for the XML preference
+     * @return an XML resource parser that points to the start tag
+     */
+    private XmlResourceParser getParentPrimedParser(int resId) {
+        XmlResourceParser parser = null;
+        try {
+            parser = mContext.getResources().getXml(resId);
+
+            int type;
+            while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+                    && type != XmlPullParser.START_TAG) {
+            }
+        } catch (Exception e) {
+
+        }
+        return parser;
+    }
+
+    private XmlResourceParser getChildByType(int resId, String xmlType) {
+        XmlResourceParser parser = null;
+        try {
+            parser = mContext.getResources().getXml(resId);
+
+            int type;
+            while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+                    && type != XmlPullParser.START_TAG) {
+            }
+            while(parser.getName() != xmlType) {
+                parser.next();
+            }
+        } catch (Exception e) {
+
+        }
+        return parser;
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/survey/SurveyMixinTest.java b/tests/robotests/src/com/android/settings/survey/SurveyMixinTest.java
new file mode 100644
index 0000000..20c50ce
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/survey/SurveyMixinTest.java
@@ -0,0 +1,143 @@
+package com.android.settings.survey;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.core.InstrumentedPreferenceFragment;
+import com.android.settings.overlay.SurveyFeatureProvider;
+import com.android.settings.testutils.FakeFeatureFactory;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.Robolectric;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class SurveyMixinTest {
+
+    private static final String FAKE_KEY = "fake_key";
+    private static final String FAKE_SURVEY_ID = "fake_id";
+
+    private FakeFeatureFactory mFactory;
+    private Context mContext;
+    private SurveyFeatureProvider mProvider;
+    @Mock
+    private BroadcastReceiver mReceiver;
+    @Mock
+    private InstrumentedPreferenceFragment mFragment;
+
+    @Before
+    public void setUp() {
+        // set up the fakefeature factory to mock out the survey provider
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application.getApplicationContext());
+        FakeFeatureFactory.setupForTest(mContext);
+        mFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mContext);
+        mProvider = mFactory.getSurveyFeatureProvider(mContext);
+        when(mProvider.getSurveyId(any(), eq(FAKE_KEY))).thenReturn(FAKE_SURVEY_ID);
+    }
+
+    @Test
+    public void onResume_triesRegisteringReceiverAndDownloadingWhenNoSurveyDetected() {
+        // Pretend there is no survey in memory
+        when(mProvider.getSurveyExpirationDate(any(), any())).thenReturn(-1L);
+
+        // Pretend we are an activity that is starting up
+        Activity temp = Robolectric.setupActivity(Activity.class);
+        when(mFragment.getActivity()).thenReturn(temp);
+        SurveyMixin mixin = new SurveyMixin(mFragment, FAKE_KEY);
+        mixin.onResume();
+
+        // Verify that a download was attempted
+        verify(mProvider, times(1)).downloadSurvey(any(), any(), any());
+        // Verify that we registered a receiver for download completion broadcasts
+        verify(mProvider, times(1)).createAndRegisterReceiver(any());
+        // Verify we did not try to show a survey
+        verify(mProvider, never()).showSurveyIfAvailable(any(), any());
+    }
+
+    @Test
+    public void onResume_triesShowingSurveyWhenOneIsPresent() {
+        // Pretend there is a survey in memory
+        when(mProvider.getSurveyExpirationDate(any(), any())).thenReturn(0L);
+
+        // Pretend we are an activity that is starting up
+        Activity temp = Robolectric.setupActivity(Activity.class);
+        when(mFragment.getActivity()).thenReturn(temp);
+        SurveyMixin mixin = new SurveyMixin(mFragment, FAKE_KEY);
+        mixin.onResume();
+
+        // Verify that a download was not attempted
+        verify(mProvider, never()).downloadSurvey(any(), any(), any());
+        // Verify that we did not register a receiver
+        verify(mProvider, never()).createAndRegisterReceiver(any());
+        // Verify we tried to show a survey
+        verify(mProvider, times(1)).showSurveyIfAvailable(any(), any());
+    }
+
+    @Test
+    public void onResume_doesNothingWhenActivityIsNull() {
+        // Pretend the activity died somewhere in the process
+        when(mFragment.getActivity()).thenReturn(null);
+        SurveyMixin mixin = new SurveyMixin(mFragment, FAKE_KEY);
+        mixin.onResume();
+
+        // Verify we don't try showing or downloading a survey
+        verify(mProvider, never()).showSurveyIfAvailable(any(), any());
+        verify(mProvider, never()).downloadSurvey(any(), any(), any());
+    }
+
+    @Test
+    public void onPause_removesReceiverWhenInstantiated() {
+        // Pretend there is a survey in memory
+        when(mProvider.getSurveyExpirationDate(any(), any())).thenReturn(-1L);
+
+        // Pretend we are an activity that starts and stops
+        Activity temp = Robolectric.setupActivity(Activity.class);
+        when(mFragment.getActivity()).thenReturn(temp);
+        when(mProvider.createAndRegisterReceiver(any())).thenReturn(mReceiver);
+        SurveyMixin mixin = new SurveyMixin(mFragment, FAKE_KEY);
+        mixin.onResume();
+        mixin.onPause();
+
+        // Verify we remove the receiver
+        verify(mProvider, times(1)).unregisterReceiver(any(), any());
+    }
+
+    @Test
+    public void onPause_doesNothingWhenActivityOrReceiverNull() {
+        // Pretend there is a survey in memory
+        when(mProvider.getSurveyExpirationDate(any(), any())).thenReturn(-1L);
+
+        // Pretend we are an activity that fails to create a receiver properly
+        Activity temp = Robolectric.setupActivity(Activity.class);
+        when(mFragment.getActivity()).thenReturn(temp);
+        SurveyMixin mixin = new SurveyMixin(mFragment, FAKE_KEY);
+        mixin.onPause();
+
+        // Verify we do nothing
+        verify(mProvider, never()).unregisterReceiver(any(), any());
+
+        // pretend the activity died before onPause
+        when(mFragment.getActivity()).thenReturn(null);
+        mixin.onPause();
+
+        // Verify we do nothing
+        verify(mProvider, never()).unregisterReceiver(any(), any());
+    }
+
+}
diff --git a/tests/robotests/src/com/android/settings/widget/FooterPreferenceMixinTest.java b/tests/robotests/src/com/android/settings/widget/FooterPreferenceMixinTest.java
new file mode 100644
index 0000000..21ebb25
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/widget/FooterPreferenceMixinTest.java
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.widget;
+
+import android.support.v14.preference.PreferenceFragment;
+import android.support.v7.preference.PreferenceManager;
+import android.support.v7.preference.PreferenceScreen;
+
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.core.lifecycle.Lifecycle;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class FooterPreferenceMixinTest {
+
+    @Mock
+    private PreferenceFragment mFragment;
+    @Mock
+    private PreferenceScreen mScreen;
+
+    private Lifecycle mLifecycle;
+    private FooterPreferenceMixin mMixin;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mLifecycle = new Lifecycle();
+        when(mFragment.getPreferenceManager()).thenReturn(mock(PreferenceManager.class));
+        when(mFragment.getPreferenceManager().getContext())
+                .thenReturn(ShadowApplication.getInstance().getApplicationContext());
+        mMixin = new FooterPreferenceMixin(mFragment, mLifecycle);
+    }
+
+    @Test
+    public void createFooter_screenNotAvailable_noCrash() {
+        assertThat(mMixin.createFooterPreference()).isNotNull();
+    }
+
+    @Test
+    public void createFooter_screenAvailable_canAttachToScreen() {
+        when(mFragment.getPreferenceScreen()).thenReturn(mScreen);
+
+        final FooterPreference preference = mMixin.createFooterPreference();
+
+        assertThat(preference).isNotNull();
+        verify(mScreen).addPreference(preference);
+    }
+
+    @Test
+    public void createFooter_screenAvailableDelayed_canAttachToScreen() {
+        final FooterPreference preference = mMixin.createFooterPreference();
+
+        mLifecycle.setPreferenceScreen(mScreen);
+
+        assertThat(preference).isNotNull();
+        verify(mScreen).addPreference(preference);
+    }
+
+    @Test
+    public void createFooterTwice_screenAvailable_replaceOldFooter() {
+        when(mFragment.getPreferenceScreen()).thenReturn(mScreen);
+
+        mMixin.createFooterPreference();
+        mMixin.createFooterPreference();
+
+        verify(mScreen).removePreference(any(FooterPreference.class));
+        verify(mScreen, times(2)).addPreference(any(FooterPreference.class));
+    }
+
+}
diff --git a/tests/robotests/src/com/android/settings/widget/FooterPreferenceTest.java b/tests/robotests/src/com/android/settings/widget/FooterPreferenceTest.java
new file mode 100644
index 0000000..8dbcc20
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/widget/FooterPreferenceTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.widget;
+
+import android.content.Context;
+import android.support.v7.preference.PreferenceViewHolder;
+import android.text.method.LinkMovementMethod;
+import android.view.LayoutInflater;
+import android.widget.TextView;
+
+import com.android.settings.R;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+
+import static com.google.common.truth.Truth.assertThat;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class FooterPreferenceTest {
+
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        mContext = ShadowApplication.getInstance().getApplicationContext();
+    }
+
+    @Test
+    public void createNewPreference_shouldSetKeyAndOrder() {
+        final FooterPreference preference = new FooterPreference(mContext);
+
+        assertThat(preference.getKey()).isEqualTo(FooterPreference.KEY_FOOTER);
+        assertThat(preference.getOrder()).isEqualTo(FooterPreference.ORDER_FOOTER);
+    }
+
+    @Test
+    public void bindPreference_shouldLinkifyContent() {
+        final FooterPreference preference = new FooterPreference(mContext);
+        final PreferenceViewHolder holder = new PreferenceViewHolder(
+                LayoutInflater.from(mContext).inflate(R.layout.preference_footer, null));
+
+        preference.onBindViewHolder(holder);
+        assertThat(((TextView) holder.findViewById(android.R.id.title)).getMovementMethod())
+                .isInstanceOf(LinkMovementMethod.class);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardDividerDecorationTest.java b/tests/robotests/src/com/android/settings/widget/PreferenceDividerDecorationTest.java
similarity index 64%
rename from tests/robotests/src/com/android/settings/dashboard/DashboardDividerDecorationTest.java
rename to tests/robotests/src/com/android/settings/widget/PreferenceDividerDecorationTest.java
index e829eb2..f69de54 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardDividerDecorationTest.java
+++ b/tests/robotests/src/com/android/settings/widget/PreferenceDividerDecorationTest.java
@@ -14,20 +14,20 @@
  * limitations under the License.
  */
 
-package com.android.settings.dashboard;
-
+package com.android.settings.widget;
 
 import android.content.Context;
 import android.graphics.Canvas;
 import android.graphics.drawable.Drawable;
 import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceCategory;
 import android.support.v7.preference.PreferenceGroupAdapter;
 import android.support.v7.widget.RecyclerView;
 import android.view.View;
+
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
-import com.android.settings.overlay.FeatureFactory;
-import com.android.settings.testutils.FakeFeatureFactory;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -37,13 +37,15 @@
 import org.robolectric.annotation.Config;
 
 import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
-public class DashboardDividerDecorationTest {
+public class PreferenceDividerDecorationTest {
 
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private Context mContext;
@@ -56,49 +58,53 @@
     @Mock
     private PreferenceGroupAdapter mAdapter;
     @Mock
-    private Preference pref1;
+    private PreferenceCategory mPrefCategory;
     @Mock
-    private Preference pref2;
-    private DashboardDividerDecoration mDecoration;
-    private FakeFeatureFactory mFactory;
+    private Preference mNormalPref;
+    @Mock
+    private FooterPreference mFooterPref;
+    private PreferenceDividerDecoration mDecoration;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        FakeFeatureFactory.setupForTest(mContext);
-        mFactory = (FakeFeatureFactory) FeatureFactory.getFactory(mContext);
-        mDecoration = new DashboardDividerDecoration(mContext);
+        mDecoration = new PreferenceDividerDecoration();
         mDecoration.setDivider(mDrawable);
         mDecoration.setDividerHeight(3);
     }
 
     @Test
-    public void drawOver_differentPriorityGroup_shouldDrawDivider() {
+    public void drawOver_footerPreference_shouldDrawDivider() {
         when(mRecyclerView.getAdapter()).thenReturn(mAdapter);
-        when(mRecyclerView.getChildCount()).thenReturn(2);
-        when(mRecyclerView.getChildAdapterPosition(any(View.class)))
-                .thenReturn(0)
-                .thenReturn(1);
-        when(mAdapter.getItem(0)).thenReturn(pref1);
-        when(mAdapter.getItem(1)).thenReturn(pref2);
-        when(mFactory.dashboardFeatureProvider.getPriorityGroup(pref1)).thenReturn(1);
-        when(mFactory.dashboardFeatureProvider.getPriorityGroup(pref2)).thenReturn(2);
+        when(mRecyclerView.getChildCount()).thenReturn(1);
+        when(mAdapter.getItem(anyInt())).thenReturn(mFooterPref);
 
         mDecoration.onDrawOver(mCanvas, mRecyclerView, null /* state */);
 
         verify(mDrawable).draw(mCanvas);
     }
 
-
     @Test
-    public void drawOver_samePriorityGroup_doNotDrawDivider() {
+    public void drawOver_preferenceCategory_shouldSkipFirst() {
         when(mRecyclerView.getAdapter()).thenReturn(mAdapter);
-        when(mRecyclerView.getChildCount()).thenReturn(2);
+        when(mRecyclerView.getChildCount()).thenReturn(3);
+        when(mAdapter.getItem(anyInt())).thenReturn(mPrefCategory);
         when(mRecyclerView.getChildAdapterPosition(any(View.class)))
                 .thenReturn(0)
-                .thenReturn(1);
-        when(mAdapter.getItem(0)).thenReturn(pref1);
-        when(mAdapter.getItem(1)).thenReturn(pref2);
+                .thenReturn(1)
+                .thenReturn(2);
+
+        mDecoration.onDrawOver(mCanvas, mRecyclerView, null /* state */);
+
+        // 3 prefCategory, should skip first draw
+        verify(mDrawable, times(2)).draw(mCanvas);
+    }
+
+    @Test
+    public void drawOver_preference_doNotDrawDivider() {
+        when(mRecyclerView.getAdapter()).thenReturn(mAdapter);
+        when(mRecyclerView.getChildCount()).thenReturn(1);
+        when(mAdapter.getItem(anyInt())).thenReturn(mNormalPref);
 
         mDecoration.onDrawOver(mCanvas, mRecyclerView, null /* state */);
 
diff --git a/tests/robotests/src/com/android/settings/widget/RingProgressBarTest.java b/tests/robotests/src/com/android/settings/widget/RingProgressBarTest.java
index b7a5fd9..1a7161c 100644
--- a/tests/robotests/src/com/android/settings/widget/RingProgressBarTest.java
+++ b/tests/robotests/src/com/android/settings/widget/RingProgressBarTest.java
@@ -16,21 +16,21 @@
 
 package com.android.settings.widget;
 
-import static junit.framework.Assert.assertEquals;
-
 import android.content.Context;
 import android.view.View.MeasureSpec;
 
+import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
-@RunWith(RobolectricTestRunner.class)
+import static junit.framework.Assert.assertEquals;
+
+@RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
 public class RingProgressBarTest {
 
diff --git a/tests/unit/src/com/android/settings/fingerprint/FingerprintEnrollIntroductionTest.java b/tests/unit/src/com/android/settings/fingerprint/FingerprintEnrollIntroductionTest.java
new file mode 100644
index 0000000..235ba1e
--- /dev/null
+++ b/tests/unit/src/com/android/settings/fingerprint/FingerprintEnrollIntroductionTest.java
@@ -0,0 +1,109 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.fingerprint;
+
+
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Mockito.doReturn;
+
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.content.Intent;
+import android.hardware.fingerprint.Fingerprint;
+import android.hardware.fingerprint.FingerprintManager;
+import android.test.ActivityUnitTestCase;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.android.settings.R;
+
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FingerprintEnrollIntroductionTest
+        extends ActivityUnitTestCase<FingerprintEnrollIntroduction> {
+
+    private TestContext mContext;
+
+    @Mock
+    private FingerprintManager mFingerprintManager;
+
+    private FingerprintEnrollIntroduction mActivity;
+
+    public FingerprintEnrollIntroductionTest() {
+        super(FingerprintEnrollIntroduction.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        MockitoAnnotations.initMocks(this);
+        mContext = new TestContext(getInstrumentation().getTargetContext());
+        setActivityContext(mContext);
+
+        getInstrumentation().runOnMainSync(() -> {
+            final Intent intent = new Intent();
+            mActivity = startActivity(intent,
+                    null /* savedInstanceState */, null /* lastNonConfigurationInstance */);
+        });
+    }
+
+    public void testMaxFingerprint_shouldShowErrorMessage() {
+        final int max = mContext.getResources().getInteger(
+                com.android.internal.R.integer.config_fingerprintMaxTemplatesPerUser);
+        doReturn(generateFingerprintList(max)).when(mFingerprintManager)
+                .getEnrolledFingerprints(anyInt());
+
+        getInstrumentation().runOnMainSync(() -> {
+            getInstrumentation().callActivityOnCreate(mActivity, null);
+            getInstrumentation().callActivityOnResume(mActivity);
+        });
+
+        final TextView errorTextView = (TextView) mActivity.findViewById(R.id.error_text);
+        assertNotNull(errorTextView.getText().toString());
+
+        final Button nextButton = (Button) mActivity.findViewById(R.id.fingerprint_next_button);
+        assertEquals(View.GONE, nextButton.getVisibility());
+    }
+
+    private List<Fingerprint> generateFingerprintList(int num) {
+        ArrayList<Fingerprint> list = new ArrayList<>();
+        for (int i = 0; i < num; i++) {
+            list.add(new Fingerprint("Fingerprint " + i, 0, i, 0));
+        }
+        return list;
+    }
+
+    public class TestContext extends ContextWrapper {
+
+        public TestContext(Context base) {
+            super(base);
+        }
+
+        @Override
+        public Object getSystemService(String name) {
+            if (Context.FINGERPRINT_SERVICE.equals(name)) {
+                return mFingerprintManager;
+            }
+            return super.getSystemService(name);
+        }
+    }
+}