diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 87b6372..f4a972b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -758,11 +758,6 @@
                   android:icon="@drawable/ic_settings_notifications"
                   android:exported="true"
                   android:taskAffinity="">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="com.android.settings.SHORTCUT" />
-            </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                        android:value="com.android.settings.notification.ZenModeVisualInterruptionSettings" />
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
@@ -778,11 +773,6 @@
                 <action android:name="android.settings.ZEN_MODE_PRIORITY_SETTINGS" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="com.android.settings.SHORTCUT" />
-            </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                 android:value="com.android.settings.notification.ZenModePrioritySettings" />
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
@@ -802,11 +792,6 @@
                 <action android:name="android.settings.ACTION_CONDITION_PROVIDER_SETTINGS" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="com.android.settings.SHORTCUT" />
-            </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                 android:value="com.android.settings.notification.ZenModeAutomationSettings" />
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
@@ -950,11 +935,6 @@
                 <action android:name="android.settings.NIGHT_DISPLAY_SETTINGS" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="com.android.settings.SHORTCUT" />
-            </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                 android:value="com.android.settings.display.NightDisplaySettings" />
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
@@ -1343,11 +1323,6 @@
                 <action android:name="com.android.settings.TRUSTED_CREDENTIALS_USER" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="com.android.settings.SHORTCUT" />
-            </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                 android:value="com.android.settings.TrustedCredentialsSettings" />
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
@@ -2293,11 +2268,6 @@
                 <action android:name="android.settings.BATTERY_SAVER_SETTINGS" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="com.android.settings.SHORTCUT" />
-            </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                 android:value="com.android.settings.fuelgauge.BatterySaverSettings" />
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
diff --git a/res/layout/preference_category_material_settings.xml b/res/layout/preference_category_material_settings.xml
index 2a25bbc..233f54a 100644
--- a/res/layout/preference_category_material_settings.xml
+++ b/res/layout/preference_category_material_settings.xml
@@ -40,13 +40,26 @@
             android:maxHeight="18dp"/>
     </LinearLayout>
 
-    <TextView
-        android:id="@android:id/title"
+    <LinearLayout
         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"/>
+        android:orientation="vertical">
+        <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:paddingEnd="?android:attr/listPreferredItemPaddingEnd"/>
+        <TextView
+            android:id="@android:id/summary"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+            android:textColor="?android:attr/textColorSecondary"
+            android:ellipsize="end"
+            android:singleLine="true" />
+    </LinearLayout>
 
 </FrameLayout>
\ No newline at end of file
diff --git a/res/layout/restricted_preference_dropdown.xml b/res/layout/restricted_preference_dropdown.xml
index 1a1e191..fd0d07d 100644
--- a/res/layout/restricted_preference_dropdown.xml
+++ b/res/layout/restricted_preference_dropdown.xml
@@ -25,6 +25,6 @@
             android:layout_height="wrap_content"
             android:visibility="invisible" />
 
-    <include layout="@layout/preference_material" />
+    <include layout="@layout/preference_material_settings" />
 
 </FrameLayout>
\ No newline at end of file
diff --git a/res/layout/search_inline_switch_item.xml b/res/layout/search_inline_switch_item.xml
new file mode 100644
index 0000000..998c09c
--- /dev/null
+++ b/res/layout/search_inline_switch_item.xml
@@ -0,0 +1,81 @@
+<?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"
+                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="?android:attr/textAppearanceListItem"
+                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_alignStart="@android:id/title"
+                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+                android:textColor="?android:attr/textColorSecondary"
+                android:maxLength="60"
+                android:maxLines="10"/>
+
+    </RelativeLayout>
+
+    <Switch
+            android:id="@+id/switchView"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:gravity="end|center_vertical"
+            android:paddingStart="16dp"
+            android:orientation="vertical"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/search_intent_item.xml b/res/layout/search_intent_item.xml
index b68f65b..fcb5532 100644
--- a/res/layout/search_intent_item.xml
+++ b/res/layout/search_intent_item.xml
@@ -14,50 +14,59 @@
      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:paddingEnd="?android:attr/scrollbarSize"
-    android:orientation="horizontal">
+<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:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:gravity="center"
-            android:orientation="horizontal">
-
-        <ImageView
-                android:id="@+id/icon"
-                android:layout_width="@dimen/search_result_item_image_size"
-                android:layout_height="@dimen/search_result_item_image_size"
-                android:layout_marginStart="@dimen/search_result_item_image_margin_start"
-                android:layout_marginEnd="@dimen/search_result_item_image_margin_end"
-                android:scaleType="centerInside"/>
-    </LinearLayout>
-
-    <LinearLayout
+            android:id="@+id/icon_container"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:paddingTop="10dp"
-            android:orientation="vertical">
-
-        <TextView android:id="@+id/title"
-                  android:layout_width="wrap_content"
-                  android:layout_height="wrap_content"
-                  android:singleLine="true"
-                  android:textAppearance="?android:attr/textAppearanceMedium"
-                  android:ellipsize="marquee"
-                  android:fadingEdge="horizontal" />
-
-        <TextView android:id="@+id/summary"
-                  android:layout_width="wrap_content"
-                  android:layout_height="wrap_content"
-                  android:singleLine="true"
-                  android:textAppearance="?android:attr/textAppearanceSmall"
-                  android:ellipsize="marquee"
-                  android:fadingEdge="horizontal" />
-
+            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"
+                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="?android:attr/textAppearanceListItem"
+                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_alignStart="@android:id/title"
+                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+                android:textColor="?android:attr/textColorSecondary"
+                android:maxLines="10"/>
+
+    </RelativeLayout>
 </LinearLayout>
diff --git a/res/layout/storage_item.xml b/res/layout/storage_item.xml
index 636a4c2..de73543 100644
--- a/res/layout/storage_item.xml
+++ b/res/layout/storage_item.xml
@@ -20,7 +20,7 @@
     android:orientation="vertical"
     android:minHeight="?android:attr/listPreferredItemHeightSmall"
     android:gravity="center_vertical"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingStart="@dimen/preference_no_icon_padding_start"
     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
     android:paddingTop="16dip"
     android:paddingBottom="16dip"
diff --git a/res/layout/storage_summary.xml b/res/layout/storage_summary.xml
index 7cd5b06..1beb49f 100644
--- a/res/layout/storage_summary.xml
+++ b/res/layout/storage_summary.xml
@@ -20,7 +20,7 @@
     android:orientation="vertical"
     android:minHeight="?android:attr/listPreferredItemHeightSmall"
     android:gravity="center_vertical"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingStart="@dimen/preference_no_icon_padding_start"
     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
     android:paddingTop="16dip"
     android:paddingBottom="16dip"
diff --git a/res/layout/work_profile_category.xml b/res/layout/work_profile_category.xml
deleted file mode 100644
index 8ca99f1..0000000
--- a/res/layout/work_profile_category.xml
+++ /dev/null
@@ -1,40 +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.
--->
-
-<!-- Layout used for "Work" preference group in Accounts. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginBottom="16dip"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingTop="16dip"
-    android:orientation="vertical">
-    <TextView
-        android:id="@android:id/title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="@android:style/TextAppearance.Material.Body2"
-        android:textColor="?android:attr/colorAccent" />
-    <TextView
-        android:id="@android:id/summary"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceListItemSecondary"
-        android:textColor="?android:attr/textColorSecondary"
-        android:ellipsize="end"
-        android:singleLine="true" />
-</LinearLayout>
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 425fefd..c1a76b3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3568,11 +3568,11 @@
     <!-- [CHAR LIMIT=30] Manage applications, label for option to disable app -->
     <string name="app_disable_dlg_positive">Disable app</string>
     <!-- [CHAR LIMIT=200] Manage applications, text for dialog when disabling apps -->
-    <string name="app_disable_dlg_text">If you disable this app, other apps may no longer function as intended.</string>
+    <string name="app_disable_dlg_text">If you disable this app, Android and other apps may no longer function as intended.</string>
     <!-- [CHAR LIMIT=NONE] Manage applications, title for dialog when disabling updated apps -->
     <string name="app_special_disable_dlg_title">Delete data and disable app?</string>
     <!-- [CHAR LIMIT=NONE] Manage applications, text for dialog when disabling update apps -->
-    <string name="app_special_disable_dlg_text">If you disable this app, other apps may no longer function as intended.  Your data will also be deleted.</string>
+    <string name="app_special_disable_dlg_text">If you disable this app, Android and other apps may no longer function as intended.  Your data will also be deleted.</string>
     <!-- [CHAR LIMIT=30] Manage applications, title for dialog when disabling notifications for an app -->
     <string name="app_disable_notifications_dlg_title">Turn off notifications?</string>
     <!-- [CHAR LIMIT=200] Manage applications, text for dialog when disabling notifications for an app -->
@@ -5367,6 +5367,12 @@
     <string name="vpn_always_on_inactive">Always-on inactive</string>
     <!-- Preference summary for app not supporting always-on vpn [CHAR LIMIT=NONE] -->
     <string name="vpn_not_supported_by_this_app">Not supported by this app</string>
+    <!-- Preference title for forcing all network connections to go through VPN. -->
+    <string name="vpn_require_connection">Only allow connections through VPN</string>
+    <!-- Preference summary for network connections being forced to go through VPN. -->
+    <string name="vpn_lockdown_active">Lockdown active</string>
+    <!-- Preference summary for network connections not being forced to go through VPN. -->
+    <string name="vpn_lockdown_inactive">Lockdown inactive</string>
 
     <!-- Summary describing the always-on VPN feature. [CHAR LIMIT=NONE] -->
     <string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string>
@@ -6220,25 +6226,19 @@
     <string name="notification_importance_none">Not set</string>
 
     <!-- [CHAR LIMIT=100] Notification Importance slider: blocked importance level description -->
-    <string name="notification_importance_blocked">Never show notifications from this app</string>
+    <string name="notification_importance_blocked">Never show notifications</string>
 
     <!-- [CHAR LIMIT=100] Notification Importance slider: min importance level description -->
-    <string name="notification_importance_min">No full screen interruption, peeking, sound, or vibration. Show at the bottom of the notification list. Hide from lock screen and status bar.</string>
+    <string name="notification_importance_min">No sound or visual interruption</string>
 
     <!-- [CHAR LIMIT=100] Notification Importance slider: low importance level description -->
-    <string name="notification_importance_low">No full screen interruption, peeking, sound, or vibration.</string>
+    <string name="notification_importance_low">Show silently</string>
 
     <!-- [CHAR LIMIT=100] Notification Importance slider: normal importance level description -->
-    <string name="notification_importance_default">No full screen interruption or peeking.</string>
+    <string name="notification_importance_default">Make sound</string>
 
     <!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
-    <string name="notification_importance_high">Always peek. No full screen interruption.</string>
-
-    <!-- [CHAR LIMIT=100] Notification Importance slider: max importance level description -->
-    <string name="notification_importance_max">Always peek, and allow full screen interruption. Show at the top of the notification list.</string>
-
-    <!-- [CHAR LIMIT=100] Notification Importance slider: max importance level description -->
-    <string name="notification_importance_unspecified">App determines importance for each notification</string>
+    <string name="notification_importance_high">Make sound and pop on screen</string>
 
     <!-- [CHAR LIMIT=60] Notification importance reset button -->
     <string name="importance_reset">Reset</string>
@@ -6329,13 +6329,19 @@
     <string name="app_notification_block_title">Block all</string>
 
     <!-- [CHAR LIMIT=NONE] App notification settings: Block option description-->
-    <string name="app_notification_block_summary">Never show notifications from this app</string>
+    <string name="app_notification_block_summary">Never show these notifications</string>
 
     <!-- [CHAR LIMIT=NONE] Channel notification settings: Block option title -->
-    <string name="channel_notification_block_title">Block all</string>
+    <string name="notification_content_block_title">Show notifications</string>
 
     <!-- [CHAR LIMIT=NONE] Channel notification settings: Block option description-->
-    <string name="channel_notification_block_summary">Never show notifications from this channel</string>
+    <string name="notification_content_block_summary">Never show notifications in the shade or on peripheral devices</string>
+
+    <!-- [CHAR LIMIT=NONE] Channel notification settings: Badging option title -->
+    <string name="notification_badge_title">Show badge</string>
+
+    <!-- [CHAR LIMIT=NONE] Channel notification settings: Badge option description-->
+    <string name="notification_badge_summary">Show notifications as badges on the Home app, if supported.</string>
 
     <!-- [CHAR LIMIT=NONE] App notification settings: Override DND option title -->
     <string name="app_notification_override_dnd_title">Override Do Not Disturb</string>
@@ -6346,7 +6352,7 @@
     <!-- [CHAR LIMIT=NONE] App notification settings: Visibility override option title -->
     <string name="app_notification_visibility_override_title">On the lock screen</string>
 
-    <!-- [CHAR LIMIT=20] Notification settings: App notifications row summary when banned -->
+    <!-- [CHAR LIMIT=20] Notification settings: App notifications row summary when allowed -->
     <string name="app_notification_row_banned">Blocked</string>
 
     <!-- [CHAR LIMIT=40] Notification settings: App notifications row summary when high priority -->
@@ -6788,14 +6794,6 @@
     <string name="filter_notif_blocked_apps">Blocked</string>
     <!-- Label for showing apps with domain URLs (data URI with http or https) in list [CHAR LIMIT=30] -->
     <string name="filter_with_domain_urls_apps">With domain URLs</string>
-    <!-- Label for showing apps with priority notifications in list [CHAR LIMIT=50] -->
-    <string name="filter_notif_priority_apps">Overrides Do Not Disturb</string>
-    <!-- Label for showing apps redacting sensitive notifications in list [CHAR LIMIT=50] -->
-    <string name="filter_notif_sensitive_apps">No sensitive content on lock screen</string>
-    <!-- Label for showing apps hiding notifications from lockscreen [CHAR LIMIT=50] -->
-    <string name="filter_notif_hide_notifications_apps">Never shown on lock screen</string>
-    <!-- Filter label for apps that the user has silenced [CHAR LIMIT=40] -->
-    <string name="filter_notif_silent">Shown silently</string>
 
     <!-- Title for advanced application management settings [CHAR LIMIT=30] -->
     <string name="advanced_apps">Advanced</string>
@@ -7694,8 +7692,8 @@
     <!-- [CHAR LIMIT=25] Bluetooth is disabled. -->
     <string name="bluetooth_disabled">Disabled</string>
 
-    <!-- [CHAR LIMIT=60] Name of dev option called demo mode -->
-    <string name="demo_mode">Demo mode</string>
+    <!-- [CHAR LIMIT=60] Name of dev option called "System UI demo mode" -->
+    <string name="demo_mode">System UI demo mode</string>
 
     <!-- Title text for connecting to customer support [CHAR LIMIT=80]-->
     <string name="support_escalation_title">We\'re here to help</string>
@@ -7781,6 +7779,9 @@
     <!-- Spinner dropdown text, when selected will try to add account [CHAR LIMIT=60] -->
     <string name="support_account_picker_add_account">Add account</string>
 
+    <!-- Title for the dialog containing system information shown [CHAR LIMIT=30] -->
+    <string name="support_system_information_title">System information</string>
+
     <!-- [CHAR LIMIT=60] Title of work profile setting page -->
     <string name="managed_profile_settings_title">Work profile settings</string>
     <!-- [CHAR LIMIT=60] The preference title for enabling cross-profile remote contact search -->
diff --git a/res/xml/advanced_apps.xml b/res/xml/advanced_apps.xml
index c17da05..0f9f82b 100644
--- a/res/xml/advanced_apps.xml
+++ b/res/xml/advanced_apps.xml
@@ -92,7 +92,7 @@
     <PreferenceCategory
         android:title="@string/advanced_apps">
 
-        <PreferenceScreen
+        <Preference
             android:key="special_access"
             android:fragment="com.android.settings.applications.SpecialAccessSettings"
             android:title="@string/special_access" />
diff --git a/res/xml/app_notification_settings.xml b/res/xml/app_notification_settings.xml
index 2b2fc31..82660dc 100644
--- a/res/xml/app_notification_settings.xml
+++ b/res/xml/app_notification_settings.xml
@@ -18,46 +18,18 @@
         xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
         android:title="@string/app_notifications_title"
         android:key="app_notification_settings">
-
-    <!-- Importance -->
     <!-- Block -->
     <com.android.settingslib.RestrictedSwitchPreference
-            android:key="block"
-            android:title="@string/app_notification_block_title"
-            android:summary="@string/app_notification_block_summary"
-            android:order="2"
-            settings:useAdditionalSummary="true"
-            settings:restrictedSwitchSummary="@string/enabled_by_admin" />
-    <!-- Silent -->
-    <com.android.settingslib.RestrictedSwitchPreference
-            android:key="silent"
-            android:title="@string/show_silently"
-            android:summary="@string/show_silently_summary"
-            android:order="3"
-            settings:useAdditionalSummary="true" />
-    <!-- Slider -->
-    <com.android.settings.notification.ImportanceSeekBarPreference
-            android:key="importance"
-            android:title="@string/notification_importance_title"
-            android:order="4"/>
-
-    <!-- Visibility Override -->
-    <com.android.settings.notification.RestrictedDropDownPreference
-            android:key="visibility_override"
-            android:title="@string/app_notification_visibility_override_title"
-            android:order="5" />
-
-    <!-- Bypass DND -->
-    <com.android.settingslib.RestrictedSwitchPreference
-            android:key="bypass_dnd"
-            android:title="@string/app_notification_override_dnd_title"
-            android:summary="@string/app_notification_override_dnd_summary"
-            android:order="6"
-            settings:useAdditionalSummary="true" />
+        android:key="block"
+        android:title="@string/app_notification_block_title"
+        android:summary="@string/app_notification_block_summary"
+        android:order="2"
+        settings:useAdditionalSummary="true"
+        settings:restrictedSwitchSummary="@string/enabled_by_admin" />
 
     <PreferenceCategory
             android:key="channels"
             android:title="@string/notification_channels"
-            android:order="7" />
+            android:order="3" />
 
 </PreferenceScreen>
diff --git a/res/xml/application_settings.xml b/res/xml/application_settings.xml
index 1afe243..9987fc2 100644
--- a/res/xml/application_settings.xml
+++ b/res/xml/application_settings.xml
@@ -26,26 +26,26 @@
         android:summary="@string/applications_settings_summary"
         android:key="applications_settings">
 
-    <PreferenceScreen
+    <Preference
             android:fragment="com.android.settings.applications.ManageApplications"
             android:title="@string/manageapplications_settings_title"
             android:summary="@string/manageapplications_settings_summary">
-    </PreferenceScreen>
+    </Preference>
 
-    <PreferenceScreen
+    <Preference
             android:fragment="com.android.settings.applications.ManageApplications"
             android:title="@string/runningservices_settings_title"
             android:summary="@string/runningservices_settings_summary">
         <extra android:name="classname" android:value="com.android.settings.Settings$RunningServicesActivity" />
-    </PreferenceScreen>
+    </Preference>
 
-    <PreferenceScreen
+    <Preference
             android:fragment="com.android.settings.applications.ManageApplications"
             android:title="@string/storageuse_settings_title"
             android:summary="@string/storageuse_settings_summary">
         <extra android:name="classname"
                 android:value="com.android.settings.Settings$StorageUseActivity" />
-    </PreferenceScreen>
+    </Preference>
 
     <CheckBoxPreference
             android:key="toggle_advanced_settings"
diff --git a/res/xml/automatic_storage_management_settings.xml b/res/xml/automatic_storage_management_settings.xml
index c597cc8..af79396 100644
--- a/res/xml/automatic_storage_management_settings.xml
+++ b/res/xml/automatic_storage_management_settings.xml
@@ -32,12 +32,10 @@
             android:title="@string/downloads_backup_preference_title"
             android:summary="@string/downloads_backup_text"/>
 
-        <com.android.settings.fuelgauge.WallOfTextPreference
+        <Preference
             android:key="freed_bytes"
             android:persistent="false"
-            android:selectable="false"
-            settings:allowDividerAbove="false"
-            settings:allowDividerBelow="true" />
+            android:selectable="false" />
 
         <DropDownPreference
             android:key="days"
diff --git a/res/xml/battery_saver_settings.xml b/res/xml/battery_saver_settings.xml
index 630016f..1720c73 100644
--- a/res/xml/battery_saver_settings.xml
+++ b/res/xml/battery_saver_settings.xml
@@ -15,7 +15,6 @@
 -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:settings="http://schemas.android.com/apk/res-auto"
         android:title="@string/battery_saver"
         android:key="battery_saver">
 
@@ -25,12 +24,4 @@
             android:title="@string/battery_saver_turn_on_automatically_title"
             android:summary="%s" />
 
-    <!-- Feature description text -->
-    <com.android.settings.fuelgauge.WallOfTextPreference
-            android:key="description"
-            android:summary="@*android:string/battery_saver_description"
-            android:persistent="false"
-            android:selectable="false"
-            settings:allowDividerAbove="true" />
-
 </PreferenceScreen>
diff --git a/res/xml/channel_notification_settings.xml b/res/xml/channel_notification_settings.xml
index de0b9c7..c2d1f73 100644
--- a/res/xml/channel_notification_settings.xml
+++ b/res/xml/channel_notification_settings.xml
@@ -20,21 +20,33 @@
     <!-- Importance -->
     <!-- Block -->
     <com.android.settingslib.RestrictedSwitchPreference
-            android:key="block"
-            android:title="@string/channel_notification_block_title"
-            android:summary="@string/app_notification_block_summary"
-            android:order="2"
-            settings:useAdditionalSummary="true"
-            settings:restrictedSwitchSummary="@string/enabled_by_admin" />
-    <!-- Silent -->
+        android:key="block"
+        android:title="@string/app_notification_block_title"
+        android:summary="@string/app_notification_block_summary"
+        android:order="1"
+        settings:useAdditionalSummary="true"
+        settings:restrictedSwitchSummary="@string/enabled_by_admin" />
+
+    <!-- Show notification -->
     <com.android.settingslib.RestrictedSwitchPreference
-            android:key="silent"
-            android:title="@string/show_silently"
-            android:summary="@string/show_silently_summary"
-            android:order="3"
-            settings:useAdditionalSummary="true" />
-    <!-- Slider -->
-    <com.android.settings.notification.ImportanceSeekBarPreference
+        android:key="show"
+        android:title="@string/notification_content_block_title"
+        android:summary="@string/notification_content_block_summary"
+        android:order="2"
+        settings:useAdditionalSummary="true"
+        settings:restrictedSwitchSummary="@string/enabled_by_admin" />
+
+    <!-- Show badge -->
+    <com.android.settingslib.RestrictedSwitchPreference
+        android:key="badge"
+        android:title="@string/notification_badge_title"
+        android:summary="@string/notification_badge_summary"
+        android:order="3"
+        settings:useAdditionalSummary="true"
+        settings:restrictedSwitchSummary="@string/enabled_by_admin" />
+
+    <!-- Importance -->
+    <com.android.settings.notification.RestrictedDropDownPreference
             android:key="importance"
             android:title="@string/notification_importance_title"
             android:order="4"/>
diff --git a/res/xml/data_saver.xml b/res/xml/data_saver.xml
index 20ce5c8..0244030 100644
--- a/res/xml/data_saver.xml
+++ b/res/xml/data_saver.xml
@@ -15,7 +15,6 @@
 -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:settings="http://schemas.android.com/apk/res-auto"
         android:title="@string/data_saver_title">
 
     <Preference
@@ -23,12 +22,4 @@
         android:title="@string/unrestricted_data_saver"
         android:fragment="com.android.settings.datausage.UnrestrictedDataAccess" />
 
-    <!-- Feature description text -->
-    <com.android.settings.fuelgauge.WallOfTextPreference
-            android:key="description"
-            android:summary="@*android:string/data_saver_description"
-            android:persistent="false"
-            android:selectable="false"
-            settings:allowDividerAbove="true" />
-
 </PreferenceScreen>
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index b5e2848..2632c78 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -19,12 +19,12 @@
         android:title="@string/display_settings"
         settings:keywords="@string/keywords_display">
 
-        <PreferenceScreen
+        <Preference
                 android:key="brightness"
                 android:title="@string/brightness"
                 settings:keywords="@string/keywords_display_brightness_level">
             <intent android:action="android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
-        </PreferenceScreen>
+        </Preference>
 
         <SwitchPreference
                 android:key="auto_brightness"
@@ -36,7 +36,7 @@
                 android:key="night_display"
                 android:title="@string/night_display_title"
                 android:fragment="com.android.settings.display.NightDisplaySettings"
-                android:widgetLayout="@null"
+                settings:widgetLayout="@null"
                 settings:keywords="@string/keywords_display_night_display" />
 
         <!-- Hide night mode for now
@@ -70,7 +70,7 @@
                 android:title="@string/camera_gesture_title"
                 android:summary="@string/camera_gesture_desc" />
 
-        <PreferenceScreen
+        <Preference
                 android:key="screensaver"
                 android:title="@string/screensaver_settings_title"
                 android:fragment="com.android.settings.DreamSettings" />
@@ -89,7 +89,7 @@
                 android:title="@string/tap_to_wake"
                 android:summary="@string/tap_to_wake_summary" />
 
-        <PreferenceScreen
+        <Preference
                 android:key="font_size"
                 android:title="@string/title_font_size"
                 android:fragment="com.android.settings.accessibility.ToggleFontSizePreferenceFragment"
@@ -105,7 +105,7 @@
                 android:summary="%s"
                 android:title="@string/display_auto_rotate_title" />
 
-        <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/ia_display_settings.xml b/res/xml/ia_display_settings.xml
index 756d551..946466b 100644
--- a/res/xml/ia_display_settings.xml
+++ b/res/xml/ia_display_settings.xml
@@ -40,7 +40,7 @@
             android:key="night_display"
             android:title="@string/night_display_title"
             android:fragment="com.android.settings.display.NightDisplaySettings"
-            android:widgetLayout="@null"
+            settings:widgetLayout="@null"
             settings:keywords="@string/keywords_display_night_display" />
 
         <com.android.settings.TimeoutListPreference
diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml
index 992af92..8aa105b 100644
--- a/res/xml/language_settings.xml
+++ b/res/xml/language_settings.xml
@@ -18,7 +18,7 @@
                   android:key="language_keyboard_settings"
                   android:title="@string/language_keyboard_settings_title">
 
-    <PreferenceScreen
+    <Preference
             android:key="phone_language"
             android:title="@string/phone_language"
             android:fragment="com.android.settings.localepicker.LocaleListEditor"
@@ -34,17 +34,17 @@
         android:persistent="false"/>
 
     <!-- User dictionary preference title and fragment will be set programmatically. -->
-    <PreferenceScreen
+    <Preference
             android:key="key_user_dictionary_settings"
             android:title="@string/user_dict_settings_title"
             />
 
     <PreferenceCategory
         android:title="@string/keyboard_and_input_methods_category">
-        <PreferenceScreen
+        <Preference
             android:title="@string/virtual_keyboard_category"
             android:fragment="com.android.settings.inputmethod.VirtualKeyboardFragment" />
-        <PreferenceScreen
+        <Preference
             android:title="@string/physical_keyboard_title"
             android:fragment="com.android.settings.inputmethod.PhysicalKeyboardFragment" />
     </PreferenceCategory>
@@ -53,7 +53,7 @@
             android:key="voice_category"
             android:title="@string/voice_category" >
 
-        <PreferenceScreen
+        <Preference
                 android:key="tts_settings"
                 android:title="@string/tts_settings_title"
                 android:fragment="com.android.settings.tts.TextToSpeechSettings"
diff --git a/res/xml/night_display_settings.xml b/res/xml/night_display_settings.xml
index 76b9323..c0b91ae 100644
--- a/res/xml/night_display_settings.xml
+++ b/res/xml/night_display_settings.xml
@@ -46,9 +46,4 @@
 
     </PreferenceCategory>
 
-    <com.android.settings.fuelgauge.WallOfTextPreference
-            android:summary="@string/night_display_text"
-            android:selectable="false"
-            settings:allowDividerAbove="true" />
-
 </PreferenceScreen>
\ No newline at end of file
diff --git a/res/xml/privacy_settings.xml b/res/xml/privacy_settings.xml
index f2af8f3..eeef64c 100644
--- a/res/xml/privacy_settings.xml
+++ b/res/xml/privacy_settings.xml
@@ -19,24 +19,24 @@
     android:title="@string/privacy_settings_title">
 
     <!-- Backup settings -->
-    <PreferenceScreen
+    <Preference
         android:key="backup_data"
         android:title="@string/backup_data_title"
         android:persistent="false"
         android:fragment="com.android.settings.backup.ToggleBackupSettingFragment"/>
 
-    <PreferenceScreen
+    <Preference
         android:key="configure_account"
         android:title="@string/backup_configure_account_title"
         android:persistent="false">
         <!-- the Intent declared here is always overwritten by a real one -->
         <intent android:action="dummy" />
-    </PreferenceScreen>
+    </Preference>
 
-    <PreferenceScreen
+    <Preference
         android:key="data_management"
         android:persistent="false">
-    </PreferenceScreen>
+    </Preference>
 
     <SwitchPreference
         android:key="auto_restore"
diff --git a/res/xml/security_settings_unencrypted.xml b/res/xml/security_settings_unencrypted.xml
index ee87705..7c51d25 100644
--- a/res/xml/security_settings_unencrypted.xml
+++ b/res/xml/security_settings_unencrypted.xml
@@ -21,7 +21,7 @@
         android:key="security_category"
         android:title="@string/crypt_keeper_settings_title">
 
-        <PreferenceScreen
+        <Preference
             android:key="encryption"
             android:title="@string/crypt_keeper_encrypt_title"
             android:fragment="com.android.settings.CryptKeeperSettings" />
diff --git a/res/xml/special_access.xml b/res/xml/special_access.xml
index 31789fb..4de167a 100644
--- a/res/xml/special_access.xml
+++ b/res/xml/special_access.xml
@@ -18,7 +18,7 @@
         xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
 
-    <PreferenceScreen
+    <Preference
         android:key="high_power_apps"
         android:title="@string/high_power_apps"
         android:fragment="com.android.settings.applications.ManageApplications"
@@ -26,19 +26,19 @@
         <extra
             android:name="classname"
             android:value="com.android.settings.Settings$HighPowerApplicationsActivity" />
-    </PreferenceScreen>
+    </Preference>
 
-    <PreferenceScreen
+    <Preference
         android:key="device_administrators"
         android:title="@string/manage_device_admin"
         android:fragment="com.android.settings.DeviceAdminSettings" />
 
-    <PreferenceScreen
+    <Preference
         android:key="zen_access"
         android:title="@string/manage_zen_access_title"
         android:fragment="com.android.settings.notification.ZenAccessSettings" />
 
-    <PreferenceScreen
+    <Preference
         android:key="system_alert_window"
         android:title="@string/system_alert_window_settings"
         android:fragment="com.android.settings.applications.ManageApplications"
@@ -46,9 +46,9 @@
         <extra
             android:name="classname"
             android:value="com.android.settings.Settings$OverlaySettingsActivity" />
-    </PreferenceScreen>
+    </Preference>
 
-    <PreferenceScreen
+    <Preference
         android:key="enabled_vr_listeners"
         android:title="@string/vr_listeners_title"
         android:fragment="com.android.settings.applications.VrListenerSettings"
@@ -56,9 +56,9 @@
         <extra
             android:name="classname"
             android:value="com.android.settings.Settings$VrListenersSettingsActivity" />
-    </PreferenceScreen>
+    </Preference>
 
-    <PreferenceScreen
+    <Preference
         android:key="write_settings_apps"
         android:title="@string/write_settings"
         android:fragment="com.android.settings.applications.ManageApplications"
@@ -66,24 +66,24 @@
         <extra
             android:name="classname"
             android:value="com.android.settings.Settings$WriteSettingsActivity" />
-    </PreferenceScreen>
+    </Preference>
 
-    <PreferenceScreen
+    <Preference
         android:key="notification_access"
         android:title="@string/manage_notification_access_title"
         android:fragment="com.android.settings.notification.NotificationAccessSettings" />
 
-    <PreferenceScreen
+    <Preference
         android:key="premium_sms"
         android:title="@string/premium_sms_access"
         android:fragment="com.android.settings.applications.PremiumSmsAccess" />
 
-    <PreferenceScreen
+    <Preference
         android:key="data_saver"
         android:title="@string/unrestricted_data_saver"
         android:fragment="com.android.settings.datausage.UnrestrictedDataAccess" />
 
-    <PreferenceScreen
+    <Preference
         android:key="usage_access"
         android:title="@string/usage_access"
         android:fragment="com.android.settings.applications.ManageApplications"
@@ -91,5 +91,5 @@
         <extra
             android:name="classname"
             android:value="com.android.settings.Settings$UsageAccessSettingsActivity" />
-    </PreferenceScreen>
+    </Preference>
 </PreferenceScreen>
diff --git a/res/xml/virtual_keyboard_settings.xml b/res/xml/virtual_keyboard_settings.xml
index e5a5f38..d5f0496 100644
--- a/res/xml/virtual_keyboard_settings.xml
+++ b/res/xml/virtual_keyboard_settings.xml
@@ -16,7 +16,7 @@
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
     android:title="@string/virtual_keyboard_category">
     <!-- Enabled input method list will be populated programmatically here. -->
-    <PreferenceScreen
+    <Preference
         android:key="add_virtual_keyboard_screen"
         android:title="@string/add_virtual_keyboard"
         android:fragment="com.android.settings.inputmethod.AvailableVirtualKeyboardFragment" />
diff --git a/res/xml/vpn_app_management.xml b/res/xml/vpn_app_management.xml
index 93e15bc..1b6f37b 100644
--- a/res/xml/vpn_app_management.xml
+++ b/res/xml/vpn_app_management.xml
@@ -33,6 +33,17 @@
                 settings:useAdditionalSummary="true"
                 settings:restrictedSwitchSummary="@string/disabled_by_admin_summary_text" />
 
+        <com.android.settingslib.RestrictedSwitchPreference
+                android:key="lockdown_vpn"
+                android:title="@string/vpn_require_connection"
+                android:defaultValue="false"
+                android:summaryOn="@string/vpn_lockdown_active"
+                android:summaryOff="@string/vpn_lockdown_inactive"
+                android:dependency="always_on_vpn"
+                settings:userRestriction="no_config_vpn"
+                settings:useAdditionalSummary="true"
+                settings:restrictedSwitchSummary="@string/disabled_by_admin_summary_text" />
+
         <com.android.settings.DimmableIconPreference
                 android:key="forget_vpn"
                 android:title="@string/vpn_forget_long"
diff --git a/res/xml/zen_mode_settings.xml b/res/xml/zen_mode_settings.xml
index d8ad10d..b22ad6a 100644
--- a/res/xml/zen_mode_settings.xml
+++ b/res/xml/zen_mode_settings.xml
@@ -20,19 +20,19 @@
     android:title="@string/zen_mode_settings_title" >
 
     <!-- Priority only allows -->
-    <PreferenceScreen
+    <Preference
             android:key="priority_settings"
             android:title="@string/zen_mode_priority_settings_title"
             android:fragment="com.android.settings.notification.ZenModePrioritySettings" />
 
     <!-- Automated rules -->
-    <PreferenceScreen
+    <Preference
             android:key="automation_settings"
             android:title="@string/zen_mode_automation_settings_title"
             android:fragment="com.android.settings.notification.ZenModeAutomationSettings" />
 
     <!-- Visual interruptions -->
-    <PreferenceScreen
+    <Preference
             android:key="visual_interruptions_settings"
             android:title="@string/zen_mode_visual_interruptions_settings_title"
             android:fragment="com.android.settings.notification.ZenModeVisualInterruptionSettings" />
diff --git a/src/com/android/settings/BandMode.java b/src/com/android/settings/BandMode.java
index 6f83fbc..b130295 100644
--- a/src/com/android/settings/BandMode.java
+++ b/src/com/android/settings/BandMode.java
@@ -164,7 +164,12 @@
             int size = bands[0];
 
             if (size > 0) {
+                mBandListAdapter.add(
+                        new BandListItem(Phone.BM_UNSPECIFIED)); //Always include AUTOMATIC
                 for (int i=1; i<=size; i++) {
+                    if (bands[i] == Phone.BM_UNSPECIFIED) {
+                        continue;
+                    }
                     item = new BandListItem(bands[i]);
                     mBandListAdapter.add(item);
                     if (DBG) log("Add " + item.toString());
diff --git a/src/com/android/settings/PrivacySettings.java b/src/com/android/settings/PrivacySettings.java
index 560b160..e9d810a 100644
--- a/src/com/android/settings/PrivacySettings.java
+++ b/src/com/android/settings/PrivacySettings.java
@@ -16,7 +16,6 @@
 
 package com.android.settings;
 
-import android.app.Activity;
 import android.app.backup.IBackupManager;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -30,6 +29,7 @@
 import android.os.UserManager;
 import android.provider.SearchIndexableResource;
 import android.provider.Settings;
+import android.support.annotation.VisibleForTesting;
 import android.support.v14.preference.SwitchPreference;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.Preference.OnPreferenceChangeListener;
@@ -37,11 +37,9 @@
 import android.util.Log;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.settings.dashboard.SummaryLoader;
 import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settings.search.Indexable;
 import com.android.settingslib.RestrictedLockUtils;
-import com.android.settingslib.RestrictedPreference;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -56,18 +54,22 @@
 
     // Vendor specific
     private static final String GSETTINGS_PROVIDER = "com.google.settings";
-    private static final String BACKUP_DATA = "backup_data";
-    private static final String AUTO_RESTORE = "auto_restore";
-    private static final String CONFIGURE_ACCOUNT = "configure_account";
-    private static final String DATA_MANAGEMENT = "data_management";
+    @VisibleForTesting
+    static final String BACKUP_DATA = "backup_data";
+    @VisibleForTesting
+    static final String AUTO_RESTORE = "auto_restore";
+    @VisibleForTesting
+    static final String CONFIGURE_ACCOUNT = "configure_account";
+    @VisibleForTesting
+    static final String DATA_MANAGEMENT = "data_management";
     private static final String BACKUP_INACTIVE = "backup_inactive";
     private static final String FACTORY_RESET = "factory_reset";
     private static final String TAG = "PrivacySettings";
     private IBackupManager mBackupManager;
-    private PreferenceScreen mBackup;
+    private Preference mBackup;
     private SwitchPreference mAutoRestore;
-    private PreferenceScreen mConfigure;
-    private PreferenceScreen mManageData;
+    private Preference mConfigure;
+    private Preference mManageData;
     private boolean mEnabled;
 
     @Override
@@ -90,13 +92,7 @@
         mBackupManager = IBackupManager.Stub.asInterface(
                 ServiceManager.getService(Context.BACKUP_SERVICE));
 
-        mBackup = (PreferenceScreen) screen.findPreference(BACKUP_DATA);
-
-        mAutoRestore = (SwitchPreference) screen.findPreference(AUTO_RESTORE);
-        mAutoRestore.setOnPreferenceChangeListener(preferenceChangeListener);
-
-        mConfigure = (PreferenceScreen) screen.findPreference(CONFIGURE_ACCOUNT);
-        mManageData = (PreferenceScreen) screen.findPreference(DATA_MANAGEMENT);
+        setPreferenceReferences(screen);
 
         Set<String> keysToRemove = new HashSet<>();
         getNonVisibleKeys(getActivity(), keysToRemove);
@@ -121,6 +117,17 @@
         }
     }
 
+    @VisibleForTesting
+    void setPreferenceReferences(PreferenceScreen screen) {
+        mBackup = screen.findPreference(BACKUP_DATA);
+
+        mAutoRestore = (SwitchPreference) screen.findPreference(AUTO_RESTORE);
+        mAutoRestore.setOnPreferenceChangeListener(preferenceChangeListener);
+
+        mConfigure = screen.findPreference(CONFIGURE_ACCOUNT);
+        mManageData = screen.findPreference(DATA_MANAGEMENT);
+    }
+
     private OnPreferenceChangeListener preferenceChangeListener = new OnPreferenceChangeListener() {
         @Override
         public boolean onPreferenceChange(Preference preference, Object newValue) {
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index aa76517..cc203f7 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -329,7 +329,7 @@
         }
 
         MenuInflater inflater = getMenuInflater();
-        if (mSearchFeatureProvider.isEnabled()) {
+        if (mSearchFeatureProvider.isEnabled(this)) {
             mSearchFeatureProvider.setUpSearchMenu(menu, this);
             return true;
         }
@@ -405,7 +405,7 @@
         final FeatureFactory factory = FeatureFactory.getFactory(this);
 
         mDashboardFeatureProvider = factory.getDashboardFeatureProvider(this);
-        mSearchFeatureProvider = factory.getSearchFeatureProvider(this);
+        mSearchFeatureProvider = factory.getSearchFeatureProvider();
 
         // Should happen before any call to getIntent()
         getMetaData();
@@ -1097,7 +1097,7 @@
     @Deprecated
     @Override
     public boolean onQueryTextSubmit(String query) {
-        if (mSearchFeatureProvider.isEnabled()) {
+        if (mSearchFeatureProvider.isEnabled(this)) {
             return false;
         }
         mSearchQuery = query;
@@ -1109,7 +1109,7 @@
     @Override
     public boolean onQueryTextChange(String newText) {
         mSearchQuery = newText;
-        if (mSearchFeatureProvider.isEnabled() || mSearchResultsFragment == null) {
+        if (mSearchFeatureProvider.isEnabled(this) || mSearchResultsFragment == null) {
             return false;
         }
         return mSearchResultsFragment.onQueryTextChange(newText);
diff --git a/src/com/android/settings/WallOfTextPreference.java b/src/com/android/settings/WallOfTextPreference.java
deleted file mode 100644
index 4cc2f67..0000000
--- a/src/com/android/settings/WallOfTextPreference.java
+++ /dev/null
@@ -1,38 +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.fuelgauge;
-
-import android.content.Context;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.PreferenceViewHolder;
-import android.util.AttributeSet;
-import android.widget.TextView;
-import com.android.settings.DividerPreference;
-
-public class WallOfTextPreference extends DividerPreference {
-
-    public WallOfTextPreference(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    public void onBindViewHolder(PreferenceViewHolder view) {
-        super.onBindViewHolder(view);
-        final TextView summary = (TextView) view.findViewById(android.R.id.summary);
-        summary.setMaxLines(20);
-    }
-}
diff --git a/src/com/android/settings/accounts/AccountPreferenceController.java b/src/com/android/settings/accounts/AccountPreferenceController.java
index 219dd3a..723a1ec 100644
--- a/src/com/android/settings/accounts/AccountPreferenceController.java
+++ b/src/com/android/settings/accounts/AccountPreferenceController.java
@@ -271,7 +271,6 @@
         } else {
             List<UserInfo> profiles = mUm.getProfiles(UserHandle.myUserId());
             final int profilesCount = profiles.size();
-            final boolean addCategory = profilesCount > 1;
             for (int i = 0; i < profilesCount; i++) {
                 updateProfileUi(profiles.get(i));
             }
@@ -298,7 +297,6 @@
             preferenceGroup.setContentDescription(
                 mContext.getString(R.string.account_settings));
         } else if (userInfo.isManagedProfile()) {
-            preferenceGroup.setLayoutResource(R.layout.work_profile_category);
             preferenceGroup.setTitle(R.string.category_work);
             String workGroupSummary = getWorkGroupSummary(context, userInfo);
             preferenceGroup.setSummary(workGroupSummary);
diff --git a/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java b/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java
index 45b472a..5942897 100644
--- a/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java
+++ b/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.provider.SearchIndexableResource;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -35,7 +36,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return APP_AND_NOTIFICATION_CATEGORY_FRAGMENT;
+        return MetricsProto.MetricsEvent.SETTINGS_APP_NOTIF_CATEGORY;
     }
 
     @Override
diff --git a/src/com/android/settings/applications/AppStateNotificationBridge.java b/src/com/android/settings/applications/AppStateNotificationBridge.java
index 5fff175..b0c065a 100644
--- a/src/com/android/settings/applications/AppStateNotificationBridge.java
+++ b/src/com/android/settings/applications/AppStateNotificationBridge.java
@@ -81,64 +81,4 @@
             return false;
         }
     };
-
-    public static final AppFilter FILTER_APP_NOTIFICATION_SILENCED = new AppFilter() {
-        @Override
-        public void init() {
-        }
-
-        @Override
-        public boolean filterApp(AppEntry info) {
-            if (info == null || info.extraInfo == null) {
-                return false;
-            }
-            AppRow row = (AppRow) info.extraInfo;
-            return row.appImportance > NotificationManager.IMPORTANCE_NONE
-                    && row.appImportance < NotificationManager.IMPORTANCE_DEFAULT;
-        }
-    };
-
-    public static final AppFilter FILTER_APP_NOTIFICATION_PRIORITY = new AppFilter() {
-        @Override
-        public void init() {
-        }
-
-        @Override
-        public boolean filterApp(AppEntry info) {
-            if (info == null || info.extraInfo == null) {
-                return false;
-            }
-            return ((AppRow) info.extraInfo).appBypassDnd;
-        }
-    };
-
-    public static final AppFilter FILTER_APP_NOTIFICATION_HIDE_SENSITIVE = new AppFilter() {
-        @Override
-        public void init() {
-        }
-
-        @Override
-        public boolean filterApp(AppEntry info) {
-            if (info == null || info.extraInfo == null) {
-                return false;
-            }
-            return ((AppRow) info.extraInfo).lockScreenSecure
-                    && ((AppRow) info.extraInfo).appVisOverride == Notification.VISIBILITY_PRIVATE;
-        }
-    };
-
-    public static final AppFilter FILTER_APP_NOTIFICATION_HIDE_ALL = new AppFilter() {
-        @Override
-        public void init() {
-        }
-
-        @Override
-        public boolean filterApp(AppEntry info) {
-            if (info == null || info.extraInfo == null) {
-                return false;
-            }
-            return ((AppRow) info.extraInfo).lockScreenSecure
-                    && ((AppRow) info.extraInfo).appVisOverride == Notification.VISIBILITY_SECRET;
-        }
-    };
 }
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index 2569eac..d689ee4 100755
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -1088,10 +1088,6 @@
         return NetworkTemplate.buildTemplateEthernet();
     }
 
-    public static CharSequence getNotificationSummary(AppEntry appEntry, Context context) {
-        return getNotificationSummary(appEntry, context, new NotificationBackend());
-    }
-
     public static CharSequence getNotificationSummary(AppEntry appEntry, Context context,
             NotificationBackend backend) {
         AppRow appRow = backend.loadAppRow(context, context.getPackageManager(), appEntry.info);
@@ -1099,43 +1095,8 @@
     }
 
     public static CharSequence getNotificationSummary(AppRow appRow, Context context) {
-        boolean showSlider = Settings.Secure.getInt(
-                context.getContentResolver(), NOTIFICATION_TUNER_SETTING, 0) == 1;
-        List<String> summaryAttributes = new ArrayList<>();
-        StringBuffer summary = new StringBuffer();
-        if (showSlider) {
-            if (appRow.appImportance != NotificationManager.IMPORTANCE_UNSPECIFIED) {
-                summaryAttributes.add(context.getString(
-                        R.string.notification_summary_level, appRow.appImportance));
-            }
-        } else {
-            if (appRow.banned) {
-                summaryAttributes.add(context.getString(R.string.notifications_disabled));
-            } else if (appRow.appImportance > NotificationManager.IMPORTANCE_NONE
-                    && appRow.appImportance < NotificationManager.IMPORTANCE_DEFAULT) {
-                summaryAttributes.add(context.getString(R.string.notifications_silenced));
-            }
-        }
-        final boolean lockscreenSecure = new LockPatternUtils(context).isSecure(
-                UserHandle.myUserId());
-        if (lockscreenSecure) {
-            if (appRow.appVisOverride == Notification.VISIBILITY_PRIVATE) {
-                summaryAttributes.add(context.getString(R.string.notifications_redacted));
-            } else if (appRow.appVisOverride == Notification.VISIBILITY_SECRET) {
-                summaryAttributes.add(context.getString(R.string.notifications_hidden));
-            }
-        }
-        if (appRow.appBypassDnd) {
-            summaryAttributes.add(context.getString(R.string.notifications_priority));
-        }
-        final int N = summaryAttributes.size();
-        for (int i = 0; i < N; i++) {
-            if (i > 0) {
-                summary.append(context.getString(R.string.notifications_summary_divider));
-            }
-            summary.append(summaryAttributes.get(i));
-        }
-        return summary.toString();
+        // TODO: implement summary when it is known what it should say
+        return "";
     }
 
     @Override
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
index 099d30e..d8ee6b7 100644
--- a/src/com/android/settings/applications/ManageApplications.java
+++ b/src/com/android/settings/applications/ManageApplications.java
@@ -131,15 +131,11 @@
     public static final int FILTER_APPS_ENABLED = 3;
     public static final int FILTER_APPS_DISABLED = 4;
     public static final int FILTER_APPS_BLOCKED = 5;
-    public static final int FILTER_APPS_SILENT = 6;
-    public static final int FILTER_APPS_SENSITIVE = 7;
-    public static final int FILTER_APPS_HIDE_NOTIFICATIONS = 8;
-    public static final int FILTER_APPS_PRIORITY = 9;
-    public static final int FILTER_APPS_PERSONAL = 10;
-    public static final int FILTER_APPS_WORK = 11;
-    public static final int FILTER_APPS_USAGE_ACCESS = 13;
-    public static final int FILTER_APPS_WITH_OVERLAY = 14;
-    public static final int FILTER_APPS_WRITE_SETTINGS = 15;
+    public static final int FILTER_APPS_PERSONAL = 6;
+    public static final int FILTER_APPS_WORK = 7;
+    public static final int FILTER_APPS_USAGE_ACCESS = 8;
+    public static final int FILTER_APPS_WITH_OVERLAY = 9;
+    public static final int FILTER_APPS_WRITE_SETTINGS = 10;
 
     // This is the string labels for the filter modes above, the order must be kept in sync.
     public static final int[] FILTER_LABELS = new int[]{
@@ -149,10 +145,6 @@
             R.string.filter_enabled_apps,  // Enabled
             R.string.filter_apps_disabled, // Disabled
             R.string.filter_notif_blocked_apps,   // Blocked Notifications
-            R.string.filter_notif_silent,    // Silenced Notifications
-            R.string.filter_notif_sensitive_apps, // Sensitive Notifications
-            R.string.filter_notif_hide_notifications_apps, // Sensitive Notifications
-            R.string.filter_notif_priority_apps,  // Priority Notifications
             R.string.filter_personal_apps, // Personal
             R.string.filter_work_apps,     // Work
             R.string.filter_with_domain_urls_apps,     // Domain URLs
@@ -171,10 +163,6 @@
             ApplicationsState.FILTER_ALL_ENABLED, // Enabled
             ApplicationsState.FILTER_DISABLED,    // Disabled
             AppStateNotificationBridge.FILTER_APP_NOTIFICATION_BLOCKED,   // Blocked Notifications
-            AppStateNotificationBridge.FILTER_APP_NOTIFICATION_SILENCED,   // Silenced Notifications
-            AppStateNotificationBridge.FILTER_APP_NOTIFICATION_HIDE_SENSITIVE, // Sensitive Notifications
-            AppStateNotificationBridge.FILTER_APP_NOTIFICATION_HIDE_ALL, // Hide all Notifications
-            AppStateNotificationBridge.FILTER_APP_NOTIFICATION_PRIORITY,  // Priority Notifications
             ApplicationsState.FILTER_PERSONAL,    // Personal
             ApplicationsState.FILTER_WORK,        // Work
             ApplicationsState.FILTER_WITH_DOMAIN_URLS,   // Apps with Domain URLs
@@ -356,10 +344,6 @@
         }
         if (mListType == LIST_TYPE_NOTIFICATION) {
             mFilterAdapter.enableFilter(FILTER_APPS_BLOCKED);
-            mFilterAdapter.enableFilter(FILTER_APPS_SILENT);
-            mFilterAdapter.enableFilter(FILTER_APPS_SENSITIVE);
-            mFilterAdapter.enableFilter(FILTER_APPS_HIDE_NOTIFICATIONS);
-            mFilterAdapter.enableFilter(FILTER_APPS_PRIORITY);
         }
         if (mListType == LIST_TYPE_HIGH_POWER) {
             mFilterAdapter.enableFilter(FILTER_APPS_POWER_WHITELIST_ALL);
diff --git a/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java b/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java
index db541d5..b8ee1ff 100644
--- a/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java
+++ b/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java
@@ -18,6 +18,7 @@
 import android.content.Context;
 import android.provider.SearchIndexableResource;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -39,7 +40,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return CONNECTED_DEVICE_CATEGORY_FRAGMENT;
+        return MetricsProto.MetricsEvent.SETTINGS_CONNECTED_DEVICE_CATEGORY;
     }
 
     @Override
diff --git a/src/com/android/settings/core/InstrumentedPreferenceFragment.java b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
index 3a4d0c2..29ba287 100644
--- a/src/com/android/settings/core/InstrumentedPreferenceFragment.java
+++ b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
@@ -43,18 +43,6 @@
 
     // metrics placeholder value. Only use this for development.
     protected final int PLACEHOLDER_METRIC = 10000;
-    protected final int SYSTEM_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 1;
-    protected final int STORAGE_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 2;
-    protected final int NETWORK_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 3;
-    protected final int CONNECTED_DEVICE_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 4;
-    protected final int APP_AND_NOTIFICATION_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 5;
-    protected final int INPUT_AND_GESTURE_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 6;
-    protected final int LANGUAGE_AND_REGION_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 7;
-    protected final int GESTURE_SWIPE_TO_NOTIFICATION = PLACEHOLDER_METRIC + 8;
-    protected final int GESTURE_DOUBLE_TAP_POWER = PLACEHOLDER_METRIC + 9;
-    protected final int GESTURE_PICKUP = PLACEHOLDER_METRIC + 10;
-    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();
diff --git a/src/com/android/settings/dashboard/SupportFragment.java b/src/com/android/settings/dashboard/SupportFragment.java
index b1e19fe..8a1a79b 100644
--- a/src/com/android/settings/dashboard/SupportFragment.java
+++ b/src/com/android/settings/dashboard/SupportFragment.java
@@ -119,6 +119,7 @@
                         .build(),
                 mNetworkCallback);
         mSupportItemAdapter.setHasInternet(hasInternet());
+        mSupportItemAdapter.refreshData();
     }
 
     @Override
diff --git a/src/com/android/settings/dashboard/SupportItemAdapter.java b/src/com/android/settings/dashboard/SupportItemAdapter.java
index b125fff..54c5ae6 100644
--- a/src/com/android/settings/dashboard/SupportItemAdapter.java
+++ b/src/com/android/settings/dashboard/SupportItemAdapter.java
@@ -192,7 +192,7 @@
      * Create data for the adapter. If there is already data in the adapter, they will be
      * destroyed and recreated.
      */
-    private void refreshData() {
+    void refreshData() {
         mSupportData.clear();
         addEscalationCards();
         addMoreHelpItems();
@@ -601,7 +601,8 @@
     /**
      * Data for a single support item.
      */
-    private static class SupportData {
+    @VisibleForTesting
+    static class SupportData {
 
         final Intent intent;
         final int metricsEvent;
@@ -688,7 +689,8 @@
     /**
      * Data model for escalation cards.
      */
-    private static class EscalationData extends SupportData {
+    @VisibleForTesting
+    static class EscalationData extends SupportData {
 
         @StringRes
         final int text1;
@@ -813,4 +815,9 @@
             }
         }
     }
+
+    @VisibleForTesting
+    List<SupportData> getSupportData() {
+        return mSupportData;
+    }
 }
diff --git a/src/com/android/settings/datausage/DataSaverSummary.java b/src/com/android/settings/datausage/DataSaverSummary.java
index b0304fc..b424fa2 100644
--- a/src/com/android/settings/datausage/DataSaverSummary.java
+++ b/src/com/android/settings/datausage/DataSaverSummary.java
@@ -54,6 +54,8 @@
         super.onCreate(icicle);
 
         addPreferencesFromResource(R.xml.data_saver);
+        mFooterPreferenceMixin.createFooterPreference()
+                .setTitle(com.android.internal.R.string.data_saver_description);
         mUnrestrictedAccess = findPreference(KEY_UNRESTRICTED_ACCESS);
         mApplicationsState = ApplicationsState.getInstance(
                 (Application) getContext().getApplicationContext());
diff --git a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
index b0685cf..e63a1df 100644
--- a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
+++ b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
@@ -18,7 +18,6 @@
 
 import android.app.AlertDialog;
 import android.app.Dialog;
-import android.app.DialogFragment;
 import android.app.Fragment;
 import android.content.ActivityNotFoundException;
 import android.content.Context;
@@ -37,7 +36,6 @@
 import android.os.storage.VolumeInfo;
 import android.os.storage.VolumeRecord;
 import android.provider.DocumentsContract;
-import android.provider.Settings;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceCategory;
 import android.support.v7.preference.PreferenceGroup;
@@ -65,9 +63,9 @@
 import com.android.settingslib.deviceinfo.StorageMeasurement;
 import com.android.settingslib.deviceinfo.StorageMeasurement.MeasurementDetails;
 import com.android.settingslib.deviceinfo.StorageMeasurement.MeasurementReceiver;
+
 import com.google.android.collect.Lists;
 
-import java.io.File;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Objects;
@@ -107,9 +105,6 @@
             R.string.storage_detail_other,
     };
 
-    private static final int DELETION_HELPER_SETTINGS = 1;
-    private static final int DELETION_HELPER_CLEAR = 1;
-
     private StorageManager mStorageManager;
     private UserManager mUserManager;
 
@@ -285,8 +280,7 @@
         if (mHeaderPoolIndex < mHeaderPreferencePool.size()) {
             category = mHeaderPreferencePool.get(mHeaderPoolIndex);
         } else {
-            category = new PreferenceCategory(getPrefContext(), null,
-                    com.android.internal.R.attr.preferenceCategoryStyle);
+            category = new PreferenceCategory(getPrefContext());
             mHeaderPreferencePool.add(category);
         }
         category.setTitle(title);
diff --git a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
index aa4d834..8992830 100644
--- a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
+++ b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.provider.SearchIndexableResource;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -37,7 +38,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return STORAGE_CATEGORY_FRAGMENT;
+        return MetricsProto.MetricsEvent.SETTINGS_STORAGE_CATEGORY;
     }
 
     @Override
diff --git a/src/com/android/settings/display/NightDisplaySettings.java b/src/com/android/settings/display/NightDisplaySettings.java
index 1ff4297..619c0d4 100644
--- a/src/com/android/settings/display/NightDisplaySettings.java
+++ b/src/com/android/settings/display/NightDisplaySettings.java
@@ -73,7 +73,7 @@
 
         // Load the preferences from xml.
         addPreferencesFromResource(R.xml.night_display_settings);
-
+        mFooterPreferenceMixin.createFooterPreference().setTitle(R.string.night_display_text);
         mAutoModePreference = (DropDownPreference) findPreference(KEY_NIGHT_DISPLAY_AUTO_MODE);
         mStartTimePreference = findPreference(KEY_NIGHT_DISPLAY_START_TIME);
         mEndTimePreference = findPreference(KEY_NIGHT_DISPLAY_END_TIME);
diff --git a/src/com/android/settings/fuelgauge/BatterySaverSettings.java b/src/com/android/settings/fuelgauge/BatterySaverSettings.java
index 4dc8f87..6b7ddf9 100644
--- a/src/com/android/settings/fuelgauge/BatterySaverSettings.java
+++ b/src/com/android/settings/fuelgauge/BatterySaverSettings.java
@@ -78,7 +78,8 @@
         }
         mCreated = true;
         addPreferencesFromResource(R.xml.battery_saver_settings);
-
+        mFooterPreferenceMixin.createFooterPreference()
+                .setTitle(com.android.internal.R.string.battery_saver_description);
         mContext = getActivity();
         mSwitchBar = ((SettingsActivity) mContext).getSwitchBar();
         mSwitch = mSwitchBar.getSwitch();
diff --git a/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java b/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java
index 2219e33..de16fe5 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.fuelgauge;
 
+import android.content.Intent;
+
 /**
  * Feature Provider used in power usage
  */
@@ -25,5 +27,13 @@
    */
   boolean isLocationSettingEnabled(String[] packages);
 
+  /**
+   * Check whether additional battery info feature is enabled.
+   */
   boolean isAdditionalBatteryInfoEnabled();
+
+  /**
+   * Gets an {@link Intent} to show additional battery info.
+   */
+  Intent getAdditionalBatteryInfoIntent();
 }
diff --git a/src/com/android/settings/fuelgauge/PowerUsageSummary.java b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
index 1100a2c..14e6693 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageSummary.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
@@ -175,6 +175,11 @@
                 sa.startPreferencePanel(ManageApplications.class.getName(), args,
                         R.string.high_power_apps, null, null, 0);
                 return true;
+            case MENU_ADDITIONAL_BATTERY_INFO:
+                startActivity(FeatureFactory.getFactory(getContext())
+                        .getPowerUsageFeatureProvider(getContext())
+                        .getAdditionalBatteryInfoIntent());
+                return true;
             default:
                 return super.onOptionsItemSelected(item);
         }
diff --git a/src/com/android/settings/gestures/DoubleTapPowerPreferenceController.java b/src/com/android/settings/gestures/DoubleTapPowerPreferenceController.java
index cb36879..213259b 100644
--- a/src/com/android/settings/gestures/DoubleTapPowerPreferenceController.java
+++ b/src/com/android/settings/gestures/DoubleTapPowerPreferenceController.java
@@ -20,7 +20,10 @@
 import android.provider.Settings;
 import android.support.v7.preference.Preference;
 
+import android.util.ArrayMap;
 import com.android.settings.core.lifecycle.Lifecycle;
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 
 public class DoubleTapPowerPreferenceController extends GesturePreferenceController {
 
@@ -61,4 +64,14 @@
                 Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 0);
         return cameraDisabled == 0;
     }
+
+    @Override
+    public ResultPayload getResultPayload() {
+        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
+        valueMap.put(0, true);
+        valueMap.put(1, false);
+
+        return new InlineSwitchPayload(Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED,
+                ResultPayload.SettingsSource.SECURE, valueMap);
+    }
 }
diff --git a/src/com/android/settings/gestures/DoubleTapPowerSettings.java b/src/com/android/settings/gestures/DoubleTapPowerSettings.java
index b4319f1..c31e999 100644
--- a/src/com/android/settings/gestures/DoubleTapPowerSettings.java
+++ b/src/com/android/settings/gestures/DoubleTapPowerSettings.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.provider.SearchIndexableResource;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -35,7 +36,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return GESTURE_DOUBLE_TAP_POWER;
+        return MetricsProto.MetricsEvent.SETTINGS_GESTURE_DOUBLE_TAP_POWER;
     }
 
     @Override
diff --git a/src/com/android/settings/gestures/DoubleTapScreenPreferenceController.java b/src/com/android/settings/gestures/DoubleTapScreenPreferenceController.java
index 722d66a..02d8dd7 100644
--- a/src/com/android/settings/gestures/DoubleTapScreenPreferenceController.java
+++ b/src/com/android/settings/gestures/DoubleTapScreenPreferenceController.java
@@ -21,8 +21,11 @@
 import android.provider.Settings;
 import android.support.v7.preference.Preference;
 
+import android.util.ArrayMap;
 import com.android.internal.hardware.AmbientDisplayConfiguration;
 import com.android.settings.core.lifecycle.Lifecycle;
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 
 public class DoubleTapScreenPreferenceController extends GesturePreferenceController {
 
@@ -67,4 +70,14 @@
     protected boolean isSwitchPrefEnabled() {
         return mAmbientConfig.pulseOnDoubleTapEnabled(mUserId);
     }
+
+    @Override
+    public ResultPayload getResultPayload() {
+        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
+        valueMap.put(1, true);
+        valueMap.put(0, false);
+
+        return new InlineSwitchPayload(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,
+                ResultPayload.SettingsSource.SECURE, valueMap);
+    }
 }
diff --git a/src/com/android/settings/gestures/DoubleTapScreenSettings.java b/src/com/android/settings/gestures/DoubleTapScreenSettings.java
index c10fbb7..d203fbc 100644
--- a/src/com/android/settings/gestures/DoubleTapScreenSettings.java
+++ b/src/com/android/settings/gestures/DoubleTapScreenSettings.java
@@ -21,6 +21,7 @@
 import android.provider.SearchIndexableResource;
 
 import com.android.internal.hardware.AmbientDisplayConfiguration;
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -37,7 +38,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return GESTURE_DOUBLE_TAP_SCREEN;
+        return MetricsProto.MetricsEvent.SETTINGS_GESTURE_DOUBLE_TAP_SCREEN;
     }
 
     @Override
diff --git a/src/com/android/settings/gestures/DoubleTwistGestureSettings.java b/src/com/android/settings/gestures/DoubleTwistGestureSettings.java
index c11f4a5..1303ca1 100644
--- a/src/com/android/settings/gestures/DoubleTwistGestureSettings.java
+++ b/src/com/android/settings/gestures/DoubleTwistGestureSettings.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.provider.SearchIndexableResource;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -35,7 +36,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return GESTURE_DOUBLE_TWIST;
+        return MetricsProto.MetricsEvent.SETTINGS_GESTURE_DOUBLE_TWIST;
     }
 
     @Override
diff --git a/src/com/android/settings/gestures/DoubleTwistPreferenceController.java b/src/com/android/settings/gestures/DoubleTwistPreferenceController.java
index 5192484..fea1c9d 100644
--- a/src/com/android/settings/gestures/DoubleTwistPreferenceController.java
+++ b/src/com/android/settings/gestures/DoubleTwistPreferenceController.java
@@ -24,8 +24,11 @@
 import android.support.v7.preference.Preference;
 import android.text.TextUtils;
 
+import android.util.ArrayMap;
 import com.android.settings.R;
 import com.android.settings.core.lifecycle.Lifecycle;
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 
 public class DoubleTwistPreferenceController extends GesturePreferenceController {
 
@@ -82,4 +85,14 @@
         }
         return false;
     }
+
+    @Override
+    public ResultPayload getResultPayload() {
+        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
+        valueMap.put(1, true);
+        valueMap.put(0, false);
+
+        return new InlineSwitchPayload(Settings.Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED,
+                ResultPayload.SettingsSource.SECURE, valueMap);
+    }
 }
diff --git a/src/com/android/settings/gestures/GestureSettings.java b/src/com/android/settings/gestures/GestureSettings.java
index 98ed5fb..9b71b96 100644
--- a/src/com/android/settings/gestures/GestureSettings.java
+++ b/src/com/android/settings/gestures/GestureSettings.java
@@ -167,21 +167,32 @@
                 @Override
                 public List<String> getNonIndexableKeys(Context context) {
                     ArrayList<String> result = new ArrayList<String>();
+
+                    List<PreferenceController> preferenceControllers =
+                            getPreferenceControllers(context);
+                    for(PreferenceController controller : preferenceControllers) {
+                        controller.updateNonIndexableKeys(result);
+                    }
+                    return result;
+                }
+
+                @Override
+                public List<PreferenceController> getPreferenceControllers(Context context) {
+                    List<PreferenceController> controllers = new ArrayList<>();
                     AmbientDisplayConfiguration ambientConfig
                             = new AmbientDisplayConfiguration(context);
-                    new DoubleTapPowerPreferenceController(context, null /* lifecycle */)
-                            .updateNonIndexableKeys(result);
-                    new PickupGesturePreferenceController(
-                            context, null /* lifecycle */, ambientConfig, UserHandle.myUserId())
-                            .updateNonIndexableKeys(result);
-                    new DoubleTapScreenPreferenceController(
-                            context, null /* lifecycle */, ambientConfig, UserHandle.myUserId())
-                            .updateNonIndexableKeys(result);
-                    new SwipeToNotificationPreferenceController(context, null /* lifecycle */)
-                            .updateNonIndexableKeys(result);
-                    new DoubleTwistPreferenceController(context, null /* lifecycle */)
-                            .updateNonIndexableKeys(result);
-                    return result;
+
+                    controllers.add(new DoubleTapPowerPreferenceController(context,
+                            null /* lifecycle */));
+                    controllers.add(new PickupGesturePreferenceController(context,
+                            null /* lifecycle */, ambientConfig, UserHandle.myUserId()));
+                    controllers.add(new DoubleTapScreenPreferenceController(context,
+                            null /* lifecycle */, ambientConfig, UserHandle.myUserId()));
+                    controllers.add(new SwipeToNotificationPreferenceController(context,
+                            null /* lifecycle */));
+                    controllers.add(new DoubleTwistPreferenceController(context,
+                            null /* lifecycle */));
+                    return controllers;
                 }
             };
 }
diff --git a/src/com/android/settings/gestures/PickupGesturePreferenceController.java b/src/com/android/settings/gestures/PickupGesturePreferenceController.java
index 225e1d0..f48551e 100644
--- a/src/com/android/settings/gestures/PickupGesturePreferenceController.java
+++ b/src/com/android/settings/gestures/PickupGesturePreferenceController.java
@@ -21,8 +21,11 @@
 import android.provider.Settings;
 import android.support.v7.preference.Preference;
 
+import android.util.ArrayMap;
 import com.android.internal.hardware.AmbientDisplayConfiguration;
 import com.android.settings.core.lifecycle.Lifecycle;
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 
 public class PickupGesturePreferenceController extends GesturePreferenceController {
 
@@ -68,4 +71,13 @@
         return true;
     }
 
+    @Override
+    public ResultPayload getResultPayload() {
+        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
+        valueMap.put(1, true);
+        valueMap.put(0, false);
+
+        return new InlineSwitchPayload(Settings.Secure.DOZE_PULSE_ON_PICK_UP,
+                ResultPayload.SettingsSource.SECURE, valueMap);
+    }
 }
diff --git a/src/com/android/settings/gestures/PickupGestureSettings.java b/src/com/android/settings/gestures/PickupGestureSettings.java
index 63d3968..8c0f74c 100644
--- a/src/com/android/settings/gestures/PickupGestureSettings.java
+++ b/src/com/android/settings/gestures/PickupGestureSettings.java
@@ -21,6 +21,7 @@
 import android.provider.SearchIndexableResource;
 
 import com.android.internal.hardware.AmbientDisplayConfiguration;
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -37,7 +38,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return GESTURE_PICKUP;
+        return MetricsProto.MetricsEvent.SETTINGS_GESTURE_PICKUP;
     }
 
     @Override
diff --git a/src/com/android/settings/gestures/SwipeToNotificationPreferenceController.java b/src/com/android/settings/gestures/SwipeToNotificationPreferenceController.java
index 08dc614..67c8e14 100644
--- a/src/com/android/settings/gestures/SwipeToNotificationPreferenceController.java
+++ b/src/com/android/settings/gestures/SwipeToNotificationPreferenceController.java
@@ -20,7 +20,10 @@
 import android.provider.Settings;
 import android.support.v7.preference.Preference;
 
+import android.util.ArrayMap;
 import com.android.settings.core.lifecycle.Lifecycle;
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 
 public class SwipeToNotificationPreferenceController extends GesturePreferenceController {
 
@@ -60,4 +63,14 @@
                 Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0)
                 == 1;
     }
+
+    @Override
+    public ResultPayload getResultPayload() {
+        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
+        valueMap.put(1, true);
+        valueMap.put(0, false);
+
+        return new InlineSwitchPayload(Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED,
+                ResultPayload.SettingsSource.SECURE, valueMap);
+    }
 }
diff --git a/src/com/android/settings/gestures/SwipeToNotificationSettings.java b/src/com/android/settings/gestures/SwipeToNotificationSettings.java
index 57796a6..fba074e 100644
--- a/src/com/android/settings/gestures/SwipeToNotificationSettings.java
+++ b/src/com/android/settings/gestures/SwipeToNotificationSettings.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.provider.SearchIndexableResource;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -35,7 +36,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return GESTURE_SWIPE_TO_NOTIFICATION;
+        return MetricsProto.MetricsEvent.SETTINGS_GESTURE_SWIPE_TO_NOTIFICATION;
     }
 
     @Override
diff --git a/src/com/android/settings/inputmethod/InputAndGestureSettings.java b/src/com/android/settings/inputmethod/InputAndGestureSettings.java
index eecfd31..43d8b230b 100644
--- a/src/com/android/settings/inputmethod/InputAndGestureSettings.java
+++ b/src/com/android/settings/inputmethod/InputAndGestureSettings.java
@@ -21,6 +21,7 @@
 import android.support.annotation.VisibleForTesting;
 
 import com.android.internal.hardware.AmbientDisplayConfiguration;
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.core.lifecycle.Lifecycle;
@@ -43,7 +44,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return INPUT_AND_GESTURE_CATEGORY_FRAGMENT;
+        return MetricsProto.MetricsEvent.SETTINGS_INPUT_CATEGORY;
     }
 
     @Override
diff --git a/src/com/android/settings/language/LanguageAndRegionSettings.java b/src/com/android/settings/language/LanguageAndRegionSettings.java
index 5741255..7e92e05 100644
--- a/src/com/android/settings/language/LanguageAndRegionSettings.java
+++ b/src/com/android/settings/language/LanguageAndRegionSettings.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.speech.tts.TtsEngines;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -34,7 +35,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return LANGUAGE_AND_REGION_CATEGORY_FRAGMENT;
+        return MetricsProto.MetricsEvent.SETTINGS_LANGUAGE_CATEGORY;
     }
 
     @Override
diff --git a/src/com/android/settings/network/NetworkDashboardFragment.java b/src/com/android/settings/network/NetworkDashboardFragment.java
index a58a879..89dfa02 100644
--- a/src/com/android/settings/network/NetworkDashboardFragment.java
+++ b/src/com/android/settings/network/NetworkDashboardFragment.java
@@ -43,7 +43,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return NETWORK_CATEGORY_FRAGMENT;
+        return MetricsProto.MetricsEvent.SETTINGS_NETWORK_CATEGORY;
     }
 
     @Override
diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java
index c38a72f..c720bb5 100644
--- a/src/com/android/settings/notification/AppNotificationSettings.java
+++ b/src/com/android/settings/notification/AppNotificationSettings.java
@@ -54,12 +54,12 @@
                 .addCategory(Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES);
 
     private static final String KEY_CHANNELS = "channels";
+    private static final String KEY_BLOCK = "block";
 
     private DashboardFeatureProvider mDashboardFeatureProvider;
     private PreferenceCategory mChannels;
     private List<NotificationChannel> mChannelList;
 
-
     @Override
     public void onActivityCreated(Bundle savedInstanceState) {
         super.onActivityCreated(savedInstanceState);
@@ -84,28 +84,17 @@
 
         addPreferencesFromResource(R.xml.app_notification_settings);
 
-        mImportance = (ImportanceSeekBarPreference) findPreference(KEY_IMPORTANCE);
-        mPriority =
-                (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_BYPASS_DND);
-        mVisibilityOverride =
-                (RestrictedDropDownPreference) getPreferenceScreen().findPreference(
-                        KEY_VISIBILITY_OVERRIDE);
         mBlock = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_BLOCK);
-        mSilent = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_SILENT);
         mChannels = (PreferenceCategory) findPreference(KEY_CHANNELS);
 
         if (mPkgInfo != null) {
+            setupBlock(mAppRow.systemApp, mAppRow.banned);
             // load settings intent
             ArrayMap<String, AppRow> rows = new ArrayMap<String, AppRow>();
             rows.put(mAppRow.pkg, mAppRow);
             collectConfigActivities(rows);
             mChannelList = mBackend.getChannels(mPkg, mUid).getList();
 
-            setupImportancePrefs(mAppRow.systemApp, mAppRow.appImportance, mAppRow.banned,
-                    NotificationManager.IMPORTANCE_HIGH);
-            setupPriorityPref(mAppRow.appBypassDnd);
-            setupVisOverridePref(mAppRow.appVisOverride);
-
             if (mChannelList.isEmpty()) {
                 setVisible(mChannels, false);
             } else {
@@ -129,7 +118,7 @@
                     mChannels.addPreference(channelPref);
                 }
             }
-            updateDependents(mAppRow.appImportance);
+            updateDependents(mAppRow.banned);
         }
         if (mDashboardFeatureProvider.isEnabled()) {
             final Preference pref = FeatureFactory.getFactory(activity)
@@ -148,10 +137,40 @@
     }
 
     @Override
-    protected void updateDependents(int importance) {
-        super.updateDependents(importance);
-        setVisible(mChannels,
-                !(mChannelList.isEmpty() || importance == NotificationManager.IMPORTANCE_NONE));
+    public void onResume() {
+        super.onResume();
+        if ((mUid != -1 && getPackageManager().getPackagesForUid(mUid) == null)) {
+            // App isn't around anymore, must have been removed.
+            finish();
+            return;
+        }
+        if (mBlock != null) {
+            mBlock.setDisabledByAdmin(mSuspendedAppsAdmin);
+        }
+    }
+
+    private void setupBlock(boolean notBlockable, boolean banned) {
+        if (notBlockable) {
+            setVisible(mBlock, false);
+        } else {
+            mBlock.setChecked(banned);
+            mBlock.setOnPreferenceChangeListener(
+                    new Preference.OnPreferenceChangeListener() {
+                        @Override
+                        public boolean onPreferenceChange(Preference preference,
+                                Object newValue) {
+                            final boolean blocked = (Boolean) newValue;
+                            mBackend.setNotificationsEnabledForPackage(mPkgInfo.packageName, mUid,
+                                    !blocked);
+                            updateDependents(blocked);
+                            return true;
+                        }
+                    });
+        }
+    }
+
+    private void updateDependents(boolean banned) {
+        setVisible(mChannels, !(mChannelList.isEmpty() || banned));
     }
 
     private List<ResolveInfo> queryNotificationConfigActivities() {
diff --git a/src/com/android/settings/notification/ChannelNotificationSettings.java b/src/com/android/settings/notification/ChannelNotificationSettings.java
index 02cc436..77bf6be 100644
--- a/src/com/android/settings/notification/ChannelNotificationSettings.java
+++ b/src/com/android/settings/notification/ChannelNotificationSettings.java
@@ -16,17 +16,27 @@
 
 package com.android.settings.notification;
 
+import static android.app.NotificationManager.IMPORTANCE_HIGH;
+import static android.app.NotificationManager.IMPORTANCE_LOW;
+import static android.app.NotificationManager.IMPORTANCE_MIN;
+import static android.app.NotificationManager.IMPORTANCE_NONE;
+
 import android.app.Activity;
+import android.app.Notification;
 import android.app.NotificationChannel;
 import android.app.NotificationManager;
+import android.app.admin.DevicePolicyManager;
 import android.content.Intent;
+import android.content.pm.UserInfo;
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.UserHandle;
 import android.provider.Settings;
 import android.service.notification.NotificationListenerService.Ranking;
 import android.support.v7.preference.Preference;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.AppHeader;
 import com.android.settings.R;
 import com.android.settings.RingtonePreference;
@@ -36,17 +46,26 @@
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.RestrictedSwitchPreference;
 
+import java.util.ArrayList;
+
 public class ChannelNotificationSettings extends NotificationSettingsBase {
+    protected static final String KEY_BYPASS_DND = "bypass_dnd";
+    protected static final String KEY_VISIBILITY_OVERRIDE = "visibility_override";
+    protected static final String KEY_IMPORTANCE = "importance";
     protected static final String KEY_LIGHTS = "lights";
     protected static final String KEY_VIBRATE = "vibrate";
     protected static final String KEY_RINGTONE = "ringtone";
+    protected static final String KEY_SHOW = "show";
+    protected static final String KEY_BADGE = "badge";
 
     protected RestrictedSwitchPreference mLights;
     protected RestrictedSwitchPreference mVibrate;
     protected DefaultNotificationTonePreference mRingtone;
+    protected RestrictedDropDownPreference mImportance;
+    protected RestrictedSwitchPreference mPriority;
+    protected RestrictedDropDownPreference mVisibilityOverride;
 
     private DashboardFeatureProvider mDashboardFeatureProvider;
-    private int mMaxImportance;
 
     @Override
     public void onActivityCreated(Bundle savedInstanceState) {
@@ -71,34 +90,26 @@
                 FeatureFactory.getFactory(activity).getDashboardFeatureProvider(activity);
         addPreferencesFromResource(R.xml.channel_notification_settings);
 
-        mImportance = (ImportanceSeekBarPreference) findPreference(KEY_IMPORTANCE);
+        mBlock = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_BLOCK);
+        mShow = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_SHOW);
+        mBadge = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_BADGE);
+        mImportance = (RestrictedDropDownPreference) findPreference(KEY_IMPORTANCE);
         mPriority =
                 (RestrictedSwitchPreference) findPreference(KEY_BYPASS_DND);
         mVisibilityOverride =
                 (RestrictedDropDownPreference) findPreference(KEY_VISIBILITY_OVERRIDE);
-        mBlock = (RestrictedSwitchPreference) findPreference(KEY_BLOCK);
-        mSilent = (RestrictedSwitchPreference) findPreference(KEY_SILENT);
         mLights = (RestrictedSwitchPreference) findPreference(KEY_LIGHTS);
         mVibrate = (RestrictedSwitchPreference) findPreference(KEY_VIBRATE);
         mRingtone = (DefaultNotificationTonePreference) findPreference(KEY_RINGTONE);
 
         if (mPkgInfo != null) {
             setupPriorityPref(mChannel.canBypassDnd());
-            if (mAppRow.appBypassDnd) {
-                mPriority.setShouldDisableView(true);
-            }
             setupVisOverridePref(mChannel.getLockscreenVisibility());
-            if (mAppRow.appVisOverride != Ranking.VISIBILITY_NO_OVERRIDE) {
-                mVisibilityOverride.setShouldDisableView(true);
-            }
             setupLights();
             setupVibrate();
             setupRingtone();
-            mMaxImportance = mAppRow.appImportance == NotificationManager.IMPORTANCE_UNSPECIFIED
-                    ? NotificationManager.IMPORTANCE_HIGH : mAppRow.appImportance;
-            setupImportancePrefs(false, mChannel.getImportance(),
-                    mChannel.getImportance() == NotificationManager.IMPORTANCE_NONE,
-                    mMaxImportance);
+            setupBlockAndImportance();
+            updateDependents();
         }
         if (mDashboardFeatureProvider.isEnabled()) {
             final Preference pref = FeatureFactory.getFactory(activity)
@@ -124,14 +135,14 @@
             finish();
             return;
         }
-        mSuspendedAppsAdmin = RestrictedLockUtils.checkIfApplicationIsSuspended(
-                mContext, mPkg, mUserId);
-        if (mLights != null) {
-            mLights.setDisabledByAdmin(mSuspendedAppsAdmin);
-        }
-        if (mVibrate != null) {
-            mVibrate.setDisabledByAdmin(mSuspendedAppsAdmin);
-        }
+        mLights.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mVibrate.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mImportance.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mPriority.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mVisibilityOverride.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mBlock.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mShow.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mBadge.setDisabledByAdmin(mSuspendedAppsAdmin);
     }
 
     private void setupLights() {
@@ -179,6 +190,209 @@
         });
     }
 
+    protected void setupBlockAndImportance() {
+        mBlock.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mBlock.setChecked(!mChannel.isAllowed());
+        mBlock.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                final boolean value = (Boolean) newValue;
+                mChannel.setAllowed(!value);
+                mChannel.lockFields(NotificationChannel.USER_LOCKED_ALLOWED);
+                mBackend.updateChannel(mPkg, mUid, mChannel);
+                updateDependents();
+                return true;
+            }
+        });
+
+        mShow.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mShow.setChecked(mChannel.getImportance() != NotificationManager.IMPORTANCE_NONE);
+        mShow.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                final boolean value = (Boolean) newValue;
+                int importance = value ? IMPORTANCE_LOW : IMPORTANCE_NONE;
+                mImportance.setValue(String.valueOf(importance));
+                mChannel.setImportance(importance);
+                mChannel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
+                mBackend.updateChannel(mPkg, mUid, mChannel);
+                updateDependents();
+                return true;
+            }
+        });
+        mBadge.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mBadge.setChecked(mChannel.canShowBadge());
+        mBadge.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                final boolean value = (Boolean) newValue;
+                mChannel.setShowBadge(value);
+                mChannel.lockFields(NotificationChannel.USER_LOCKED_SHOW_BADGE);
+                mBackend.updateChannel(mPkg, mUid, mChannel);
+                return true;
+            }
+        });
+
+        mImportance.setDisabledByAdmin(mSuspendedAppsAdmin);
+        final int numImportances = IMPORTANCE_HIGH - IMPORTANCE_MIN + 1;
+        String[] summaries = new String[numImportances];
+        String[] values = new String[numImportances];
+        for (int i = 0; i < numImportances; i++) {
+            int importance = i + 1;
+            summaries[i] = getSummary(importance);
+            values[i] = String.valueOf(importance);
+        }
+        mImportance.setEntryValues(values);
+        mImportance.setEntries(summaries);
+        mImportance.setValue(String.valueOf(mChannel.getImportance()));
+        mImportance.setSummary("%s");
+
+        mImportance.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                int importance = Integer.parseInt((String) newValue);
+                mChannel.setImportance(importance);
+                mChannel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
+                mBackend.updateChannel(mPkg, mUid, mChannel);
+                updateDependents();
+                return true;
+            }
+        });
+    }
+
+    private String getSummary(int importance) {
+        switch (importance) {
+            case NotificationManager.IMPORTANCE_NONE:
+                return getContext().getString(R.string.notification_importance_blocked);
+            case NotificationManager.IMPORTANCE_MIN:
+                return getContext().getString(R.string.notification_importance_min);
+            case NotificationManager.IMPORTANCE_LOW:
+                return getContext().getString(R.string.notification_importance_low);
+            case NotificationManager.IMPORTANCE_DEFAULT:
+                return getContext().getString(R.string.notification_importance_default);
+            case NotificationManager.IMPORTANCE_HIGH:
+            case NotificationManager.IMPORTANCE_MAX:
+            default:
+                return getContext().getString(R.string.notification_importance_high);
+        }
+    }
+
+    protected void setupPriorityPref(boolean priority) {
+        mPriority.setDisabledByAdmin(mSuspendedAppsAdmin);
+        mPriority.setChecked(priority);
+        mPriority.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                final boolean bypassZenMode = (Boolean) newValue;
+                mChannel.setBypassDnd(bypassZenMode);
+                mChannel.lockFields(NotificationChannel.USER_LOCKED_PRIORITY);
+                mBackend.updateChannel(mPkg, mUid, mChannel);
+                return true;
+            }
+        });
+    }
+
+    protected void setupVisOverridePref(int sensitive) {
+        ArrayList<CharSequence> entries = new ArrayList<>();
+        ArrayList<CharSequence> values = new ArrayList<>();
+
+        mVisibilityOverride.clearRestrictedItems();
+        if (getLockscreenNotificationsEnabled() && getLockscreenAllowPrivateNotifications()) {
+            final String summaryShowEntry =
+                    getString(R.string.lock_screen_notifications_summary_show);
+            final String summaryShowEntryValue =
+                    Integer.toString(NotificationManager.VISIBILITY_NO_OVERRIDE);
+            entries.add(summaryShowEntry);
+            values.add(summaryShowEntryValue);
+            setRestrictedIfNotificationFeaturesDisabled(summaryShowEntry, summaryShowEntryValue,
+                    DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS
+                            | DevicePolicyManager.KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS);
+        }
+
+        final String summaryHideEntry = getString(R.string.lock_screen_notifications_summary_hide);
+        final String summaryHideEntryValue = Integer.toString(Notification.VISIBILITY_PRIVATE);
+        entries.add(summaryHideEntry);
+        values.add(summaryHideEntryValue);
+        setRestrictedIfNotificationFeaturesDisabled(summaryHideEntry, summaryHideEntryValue,
+                DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS);
+        entries.add(getString(R.string.lock_screen_notifications_summary_disable));
+        values.add(Integer.toString(Notification.VISIBILITY_SECRET));
+        mVisibilityOverride.setEntries(entries.toArray(new CharSequence[entries.size()]));
+        mVisibilityOverride.setEntryValues(values.toArray(new CharSequence[values.size()]));
+
+        if (sensitive == Ranking.VISIBILITY_NO_OVERRIDE) {
+            mVisibilityOverride.setValue(Integer.toString(getGlobalVisibility()));
+        } else {
+            mVisibilityOverride.setValue(Integer.toString(sensitive));
+        }
+        mVisibilityOverride.setSummary("%s");
+
+        mVisibilityOverride.setOnPreferenceChangeListener(
+                new Preference.OnPreferenceChangeListener() {
+                    @Override
+                    public boolean onPreferenceChange(Preference preference, Object newValue) {
+                        int sensitive = Integer.parseInt((String) newValue);
+                        if (sensitive == getGlobalVisibility()) {
+                            sensitive = Ranking.VISIBILITY_NO_OVERRIDE;
+                        }
+                        mChannel.setLockscreenVisibility(sensitive);
+                        mChannel.lockFields(NotificationChannel.USER_LOCKED_VISIBILITY);
+                        mBackend.updateChannel(mPkg, mUid, mChannel);
+                        return true;
+                    }
+                });
+    }
+
+    private void setRestrictedIfNotificationFeaturesDisabled(CharSequence entry,
+            CharSequence entryValue, int keyguardNotificationFeatures) {
+        RestrictedLockUtils.EnforcedAdmin admin =
+                RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(
+                        mContext, keyguardNotificationFeatures, mUserId);
+        if (admin != null) {
+            RestrictedDropDownPreference.RestrictedItem item =
+                    new RestrictedDropDownPreference.RestrictedItem(entry, entryValue, admin);
+            mVisibilityOverride.addRestrictedItem(item);
+        }
+    }
+
+    private int getGlobalVisibility() {
+        int globalVis = Ranking.VISIBILITY_NO_OVERRIDE;
+        if (!getLockscreenNotificationsEnabled()) {
+            globalVis = Notification.VISIBILITY_SECRET;
+        } else if (!getLockscreenAllowPrivateNotifications()) {
+            globalVis = Notification.VISIBILITY_PRIVATE;
+        }
+        return globalVis;
+    }
+
+    private boolean getLockscreenNotificationsEnabled() {
+        return Settings.Secure.getInt(getContentResolver(),
+                Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) != 0;
+    }
+
+    private boolean getLockscreenAllowPrivateNotifications() {
+        return Settings.Secure.getInt(getContentResolver(),
+                Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0) != 0;
+    }
+
+    private boolean isLockScreenSecure() {
+        LockPatternUtils utils = new LockPatternUtils(getActivity());
+        boolean lockscreenSecure = utils.isSecure(UserHandle.myUserId());
+        UserInfo parentUser = mUm.getProfileParent(UserHandle.myUserId());
+        if (parentUser != null){
+            lockscreenSecure |= utils.isSecure(parentUser.id);
+        }
+
+        return lockscreenSecure;
+    }
+
+    protected boolean checkCanBeVisible(int minImportanceVisible, int importance) {
+        if (importance == NotificationManager.IMPORTANCE_UNSPECIFIED) {
+            return true;
+        }
+        return importance >= minImportanceVisible;
+    }
+
     @Override
     public boolean onPreferenceTreeClick(Preference preference) {
         if (preference instanceof RingtonePreference) {
@@ -205,22 +419,24 @@
                 Settings.System.NOTIFICATION_LIGHT_PULSE, 0) == 1;
     }
 
-    @Override
-    protected void updateDependents(int importance) {
-        if (importance == NotificationManager.IMPORTANCE_UNSPECIFIED) {
-            importance = mMaxImportance;
-        }
-        importance = Math.min(mMaxImportance, importance);
-
-        super.updateDependents(importance);
-        setVisible(mLights, checkCanBeVisible(
+    private void updateDependents() {
+        boolean allowed = mChannel.isAllowed();
+        int importance = mChannel.getImportance();
+        setVisible(mShow, allowed);
+        setVisible(mBadge, allowed);
+        setVisible(mImportance, allowed && importance != NotificationManager.IMPORTANCE_NONE);
+        setVisible(mLights, allowed && checkCanBeVisible(
                 NotificationManager.IMPORTANCE_LOW, importance) && canPulseLight());
-        setVisible(mVibrate, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT, importance));
-        setVisible(mRingtone, checkCanBeVisible(
+        setVisible(mVibrate, allowed
+                && checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT, importance));
+        setVisible(mRingtone, allowed && checkCanBeVisible(
                 NotificationManager.IMPORTANCE_DEFAULT, importance));
-        if (mMaxImportance == NotificationManager.IMPORTANCE_LOW
-                && getPreferenceScreen().findPreference(mBlock.getKey()) != null) {
-            setVisible(mSilent, false);
-        }
+        setVisible(mPriority, allowed
+                && (checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT, importance)
+                || (checkCanBeVisible(NotificationManager.IMPORTANCE_LOW, importance)
+                        && mDndVisualEffectsSuppressed)));
+        setVisible(mVisibilityOverride, allowed
+                && checkCanBeVisible(NotificationManager.IMPORTANCE_MIN, importance)
+                && isLockScreenSecure());
     }
 }
diff --git a/src/com/android/settings/notification/ImportanceSeekBarPreference.java b/src/com/android/settings/notification/ImportanceSeekBarPreference.java
deleted file mode 100644
index 568dc1c..0000000
--- a/src/com/android/settings/notification/ImportanceSeekBarPreference.java
+++ /dev/null
@@ -1,204 +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.
- */
-
-package com.android.settings.notification;
-
-import com.android.settings.R;
-import com.android.settings.SeekBarPreference;
-
-import android.app.NotificationManager;
-import android.content.Context;
-import android.content.res.ColorStateList;
-import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
-import android.os.Handler;
-import android.service.notification.NotificationListenerService;
-import android.support.v7.preference.PreferenceViewHolder;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.SeekBar;
-import android.widget.TextView;
-import com.android.settings.Utils;
-
-/**
- * A slider preference that controls notification importance.
- **/
-public class ImportanceSeekBarPreference extends SeekBarPreference implements
-        SeekBar.OnSeekBarChangeListener {
-    private static final String TAG = "ImportanceSeekBarPref";
-
-    private Callback mCallback;
-    private int mMinProgress;
-    private TextView mSummaryTextView;
-    private String mSummary;
-    private SeekBar mSeekBar;
-    private ColorStateList mActiveSliderTint;
-    private ColorStateList mInactiveSliderTint;
-    private float mActiveSliderAlpha = 1.0f;
-    private float mInactiveSliderAlpha;
-    private boolean mAutoOn;
-    private Handler mHandler;
-
-    public ImportanceSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr,
-            int defStyleRes) {
-        super(context, attrs, defStyleAttr, defStyleRes);
-        setLayoutResource(R.layout.preference_importance_slider);
-        mActiveSliderTint = ColorStateList.valueOf(Utils.getColorAccent(context));
-        mInactiveSliderTint = ColorStateList.valueOf(
-                context.getColor(R.color.importance_disabled_slider_color));
-        mHandler = new Handler();
-        final TypedArray ta =
-                context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.Theme, 0, 0);
-        mInactiveSliderAlpha =
-                ta.getFloat(com.android.internal.R.styleable.Theme_disabledAlpha, 0.5f);
-        ta.recycle();
-    }
-
-    public ImportanceSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) {
-        this(context, attrs, defStyleAttr, 0);
-    }
-
-    public ImportanceSeekBarPreference(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-    }
-
-    public ImportanceSeekBarPreference(Context context) {
-        this(context, null);
-    }
-
-    public void setCallback(Callback callback) {
-        mCallback = callback;
-    }
-
-    public void setMinimumProgress(int minProgress) {
-        mMinProgress = minProgress;
-        notifyChanged();
-    }
-
-    @Override
-    public void setProgress(int progress) {
-        mSummary = getProgressSummary(progress);
-        super.setProgress(progress);
-    }
-
-    public void setAutoOn(boolean autoOn) {
-        mAutoOn = autoOn;
-        notifyChanged();
-    }
-
-    @Override
-    public void onBindViewHolder(PreferenceViewHolder view) {
-        super.onBindViewHolder(view);
-        mSummaryTextView = (TextView) view.findViewById(com.android.internal.R.id.summary);
-        mSeekBar = (SeekBar) view.findViewById(
-                com.android.internal.R.id.seekbar);
-
-        final ImageView autoButton = (ImageView) view.findViewById(R.id.auto_importance);
-        applyAutoUi(autoButton);
-        autoButton.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                applyAuto(autoButton);
-            }
-        });
-    }
-
-    private void applyAuto(ImageView autoButton) {
-        mAutoOn = !mAutoOn;
-        if (!mAutoOn) {
-            setProgress(NotificationManager.IMPORTANCE_DEFAULT);
-            mCallback.onImportanceChanged(NotificationManager.IMPORTANCE_DEFAULT, true);
-        } else {
-            mCallback.onImportanceChanged(NotificationManager.IMPORTANCE_UNSPECIFIED, true);
-        }
-        applyAutoUi(autoButton);
-    }
-
-    private void applyAutoUi(ImageView autoButton) {
-        mSeekBar.setEnabled(!mAutoOn);
-
-        final float alpha = mAutoOn ? mInactiveSliderAlpha : mActiveSliderAlpha;
-        final ColorStateList starTint = mAutoOn ?  mActiveSliderTint : mInactiveSliderTint;
-        Drawable icon = autoButton.getDrawable().mutate();
-        icon.setTintList(starTint);
-        autoButton.setImageDrawable(icon);
-        mSeekBar.setAlpha(alpha);
-
-        if (mAutoOn) {
-            setProgress(NotificationManager.IMPORTANCE_DEFAULT);
-            mSummary = getProgressSummary(NotificationManager.IMPORTANCE_UNSPECIFIED);
-        }
-        mSummaryTextView.setText(mSummary);
-    }
-
-    @Override
-    public CharSequence getSummary() {
-        return mSummary;
-    }
-
-    @Override
-    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) {
-        super.onProgressChanged(seekBar, progress, fromTouch);
-        if (progress < mMinProgress) {
-            seekBar.setProgress(mMinProgress);
-            progress = mMinProgress;
-        }
-        if (mSummaryTextView != null) {
-            mSummary = getProgressSummary(progress);
-            mSummaryTextView.setText(mSummary);
-        }
-        mCallback.onImportanceChanged(progress, fromTouch);
-    }
-
-    private String getProgressSummary(int progress) {
-        switch (progress) {
-            case NotificationManager.IMPORTANCE_NONE:
-                return getContext().getString(R.string.notification_importance_blocked);
-            case NotificationManager.IMPORTANCE_MIN:
-                return getContext().getString(R.string.notification_importance_min);
-            case NotificationManager.IMPORTANCE_LOW:
-                return getContext().getString(R.string.notification_importance_low);
-            case NotificationManager.IMPORTANCE_DEFAULT:
-                return getContext().getString(R.string.notification_importance_default);
-            case NotificationManager.IMPORTANCE_HIGH:
-            case NotificationManager.IMPORTANCE_MAX:
-                return getContext().getString(R.string.notification_importance_high);
-            default:
-                return getContext().getString(R.string.notification_importance_unspecified);
-        }
-    }
-
-    @Override
-    protected void notifyChanged() {
-        mHandler.post(mNotifyChanged);
-    }
-
-    private void postNotifyChanged() {
-        super.notifyChanged();
-    }
-
-    private final Runnable mNotifyChanged = new Runnable() {
-        @Override
-        public void run() {
-            postNotifyChanged();
-        }
-    };
-
-    public interface Callback {
-        void onImportanceChanged(int progress, boolean fromTouch);
-    }
-}
diff --git a/src/com/android/settings/notification/NotificationBackend.java b/src/com/android/settings/notification/NotificationBackend.java
index 5d69203..4013971 100644
--- a/src/com/android/settings/notification/NotificationBackend.java
+++ b/src/com/android/settings/notification/NotificationBackend.java
@@ -16,7 +16,6 @@
 package com.android.settings.notification;
 
 import android.app.INotificationManager;
-import android.app.Notification;
 import android.app.NotificationChannel;
 import android.app.NotificationManager;
 import android.content.Context;
@@ -27,11 +26,8 @@
 import android.content.pm.ParceledListSlice;
 import android.graphics.drawable.Drawable;
 import android.os.ServiceManager;
-import android.os.UserHandle;
-import android.service.notification.NotificationListenerService;
 import android.util.Log;
 
-import com.android.internal.widget.LockPatternUtils;
 import com.android.settingslib.Utils;
 
 public class NotificationBackend {
@@ -52,11 +48,6 @@
         }
         row.icon = app.loadIcon(pm);
         row.banned = getNotificationsBanned(row.pkg, row.uid);
-        row.appImportance = getImportance(row.pkg, row.uid);
-        row.appBypassDnd = getBypassZenMode(row.pkg, row.uid);
-        row.appVisOverride = getVisibilityOverride(row.pkg, row.uid);
-        row.lockScreenSecure = new LockPatternUtils(context).isSecure(
-                UserHandle.myUserId());
         return row;
     }
 
@@ -86,19 +77,9 @@
         }
     }
 
-    public boolean getBypassZenMode(String pkg, int uid) {
+    public boolean setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled) {
         try {
-            return sINM.getPriority(pkg, uid) == Notification.PRIORITY_MAX;
-        } catch (Exception e) {
-            Log.w(TAG, "Error calling NoMan", e);
-            return false;
-        }
-    }
-
-    public boolean setBypassZenMode(String pkg, int uid, boolean bypassZen) {
-        try {
-            sINM.setPriority(pkg, uid,
-                    bypassZen ? Notification.PRIORITY_MAX : Notification.PRIORITY_DEFAULT);
+            sINM.setNotificationsEnabledForPackage(pkg, uid, enabled);
             return true;
         } catch (Exception e) {
             Log.w(TAG, "Error calling NoMan", e);
@@ -106,44 +87,6 @@
         }
     }
 
-    public int getVisibilityOverride(String pkg, int uid) {
-        try {
-            return sINM.getVisibilityOverride(pkg, uid);
-        } catch (Exception e) {
-            Log.w(TAG, "Error calling NoMan", e);
-            return NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE;
-        }
-    }
-
-    public boolean setVisibilityOverride(String pkg, int uid, int override) {
-        try {
-            sINM.setVisibilityOverride(pkg, uid, override);
-            return true;
-        } catch (Exception e) {
-            Log.w(TAG, "Error calling NoMan", e);
-            return false;
-        }
-    }
-
-    public boolean setImportance(String pkg, int uid, int importance) {
-        try {
-            sINM.setImportance(pkg, uid, importance);
-            return true;
-        } catch (Exception e) {
-            Log.w(TAG, "Error calling NoMan", e);
-            return false;
-        }
-    }
-
-    public int getImportance(String pkg, int uid) {
-        try {
-            return sINM.getImportance(pkg, uid);
-        } catch (Exception e) {
-            Log.w(TAG, "Error calling NoMan", e);
-            return NotificationManager.IMPORTANCE_UNSPECIFIED;
-        }
-    }
-
     public NotificationChannel getChannel(String pkg, int uid, String channelId) {
         if (channelId == null) {
             return null;
@@ -186,10 +129,6 @@
         public boolean banned;
         public boolean first;  // first app in section
         public boolean systemApp;
-        public int appImportance;
-        public boolean appBypassDnd;
-        public int appVisOverride;
-        public boolean lockScreenSecure;
     }
 
     public static class ChannelRow extends AppRow {
diff --git a/src/com/android/settings/notification/NotificationSettingsBase.java b/src/com/android/settings/notification/NotificationSettingsBase.java
index 5d6f598..046c5e6 100644
--- a/src/com/android/settings/notification/NotificationSettingsBase.java
+++ b/src/com/android/settings/notification/NotificationSettingsBase.java
@@ -51,15 +51,10 @@
 abstract public class NotificationSettingsBase extends SettingsPreferenceFragment {
     private static final String TAG = "NotifiSettingsBase";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
-    private static final String TUNER_SETTING = "show_importance_slider";
 
     protected static final String ARG_CHANNEL = "channel";
 
-    protected static final String KEY_BYPASS_DND = "bypass_dnd";
-    protected static final String KEY_VISIBILITY_OVERRIDE = "visibility_override";
-    protected static final String KEY_IMPORTANCE = "importance";
     protected static final String KEY_BLOCK = "block";
-    protected static final String KEY_SILENT = "silent";
 
     protected PackageManager mPm;
     protected UserManager mUm;
@@ -70,13 +65,10 @@
     protected int mUserId;
     protected String mPkg;
     protected PackageInfo mPkgInfo;
-    protected ImportanceSeekBarPreference mImportance;
-    protected RestrictedSwitchPreference mPriority;
-    protected RestrictedDropDownPreference mVisibilityOverride;
     protected RestrictedSwitchPreference mBlock;
-    protected RestrictedSwitchPreference mSilent;
+    protected RestrictedSwitchPreference mShow;
+    protected RestrictedSwitchPreference mBadge;
     protected EnforcedAdmin mSuspendedAppsAdmin;
-    protected boolean mShowSlider = false;
     protected boolean mDndVisualEffectsSuppressed;
 
     protected NotificationChannel mChannel;
@@ -138,7 +130,6 @@
 
         mSuspendedAppsAdmin = RestrictedLockUtils.checkIfApplicationIsSuspended(
                 mContext, mPkg, mUserId);
-        mShowSlider = Settings.Secure.getInt(getContentResolver(), TUNER_SETTING, 0) == 1;
         NotificationManager.Policy policy =
                 NotificationManager.from(mContext).getNotificationPolicy();
         mDndVisualEffectsSuppressed = policy == null ? false : policy.suppressedVisualEffects != 0;
@@ -154,237 +145,7 @@
         }
         mSuspendedAppsAdmin = RestrictedLockUtils.checkIfApplicationIsSuspended(
                 mContext, mPkg, mUserId);
-        if (mImportance != null) {
-            mImportance.setDisabledByAdmin(mSuspendedAppsAdmin);
-        }
-        if (mPriority != null) {
-            mPriority.setDisabledByAdmin(mSuspendedAppsAdmin);
-        }
-        if (mBlock != null) {
-            mBlock.setDisabledByAdmin(mSuspendedAppsAdmin);
-        }
-        if (mSilent != null) {
-            mSilent.setDisabledByAdmin(mSuspendedAppsAdmin);
-        }
-        if (mVisibilityOverride != null) {
-            mVisibilityOverride.setDisabledByAdmin(mSuspendedAppsAdmin);
-        }
-    }
-
-    protected void setupImportancePrefs(boolean notBlockable, int importance, boolean banned,
-            int maxImportance) {
-        if (mShowSlider) {
-            setVisible(mBlock, false);
-            setVisible(mSilent, false);
-            mImportance.setDisabledByAdmin(mSuspendedAppsAdmin);
-            mImportance.setMinimumProgress(
-                    notBlockable ? NotificationManager.IMPORTANCE_MIN
-                            : NotificationManager.IMPORTANCE_NONE);
-            mImportance.setMax(maxImportance);
-            mImportance.setProgress(Math.min(importance, maxImportance));
-            mImportance.setAutoOn(importance == NotificationManager.IMPORTANCE_UNSPECIFIED);
-            mImportance.setCallback(new ImportanceSeekBarPreference.Callback() {
-                @Override
-                public void onImportanceChanged(int progress, boolean fromUser) {
-                    if (fromUser) {
-                        if (mChannel != null) {
-                            mChannel.setImportance(progress);
-                            mChannel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
-                            mBackend.updateChannel(mPkg, mUid, mChannel);
-                        } else {
-                            mBackend.setImportance(mPkg, mUid, progress);
-                        }
-                    }
-                    updateDependents(progress);
-                }
-            });
-        } else {
-            setVisible(mImportance, false);
-            if (notBlockable) {
-                setVisible(mBlock, false);
-            } else {
-                mBlock.setChecked(banned);
-                mBlock.setOnPreferenceChangeListener(
-                        new Preference.OnPreferenceChangeListener() {
-                            @Override
-                            public boolean onPreferenceChange(Preference preference,
-                                    Object newValue) {
-                                final boolean blocked = (Boolean) newValue;
-                                final int importance = blocked
-                                        ? NotificationManager.IMPORTANCE_NONE
-                                        : NotificationManager.IMPORTANCE_UNSPECIFIED;
-                                if (mChannel != null) {
-                                    mChannel.setImportance(importance);
-                                    mChannel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
-                                    mBackend.updateChannel(mPkg, mUid, mChannel);
-                                } else {
-                                    mBackend.setImportance(mPkgInfo.packageName, mUid,
-                                            importance);
-                                }
-                                updateDependents(importance);
-                                return true;
-                            }
-                        });
-            }
-            // app silenced; cannot un-silence a channel
-            if (maxImportance == NotificationManager.IMPORTANCE_LOW) {
-                setVisible(mSilent, false);
-                updateDependents(banned ? NotificationManager.IMPORTANCE_NONE
-                        : NotificationManager.IMPORTANCE_LOW);
-            } else {
-                mSilent.setChecked(importance == NotificationManager.IMPORTANCE_LOW);
-                mSilent.setOnPreferenceChangeListener(
-                        new Preference.OnPreferenceChangeListener() {
-                            @Override
-                            public boolean onPreferenceChange(Preference preference,
-                                    Object newValue) {
-                                final boolean silenced = (Boolean) newValue;
-                                final int importance = silenced
-                                        ? NotificationManager.IMPORTANCE_LOW
-                                        : NotificationManager.IMPORTANCE_UNSPECIFIED;
-                                if (mChannel != null) {
-                                    mChannel.setImportance(importance);
-                                    mChannel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
-                                    mBackend.updateChannel(mPkg, mUid, mChannel);
-                                } else {
-                                    mBackend.setImportance(mPkgInfo.packageName, mUid,
-                                            importance);
-                                }
-                                updateDependents(importance);
-                                return true;
-                            }
-                        });
-                updateDependents(banned ? NotificationManager.IMPORTANCE_NONE : importance);
-            }
-        }
-    }
-
-    protected void setupPriorityPref(boolean priority) {
-        mPriority.setDisabledByAdmin(mSuspendedAppsAdmin);
-        mPriority.setChecked(priority);
-        mPriority.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
-            @Override
-            public boolean onPreferenceChange(Preference preference, Object newValue) {
-                final boolean bypassZenMode = (Boolean) newValue;
-                if (mChannel != null) {
-                    mChannel.setBypassDnd(bypassZenMode);
-                    mChannel.lockFields(NotificationChannel.USER_LOCKED_PRIORITY);
-                    mBackend.updateChannel(mPkg, mUid, mChannel);
-                    return true;
-                } else {
-                    return mBackend.setBypassZenMode(mPkgInfo.packageName, mUid, bypassZenMode);
-                }
-            }
-        });
-    }
-
-    protected void setupVisOverridePref(int sensitive) {
-        ArrayList<CharSequence> entries = new ArrayList<>();
-        ArrayList<CharSequence> values = new ArrayList<>();
-
-        mVisibilityOverride.clearRestrictedItems();
-        if (getLockscreenNotificationsEnabled() && getLockscreenAllowPrivateNotifications()) {
-            final String summaryShowEntry =
-                    getString(R.string.lock_screen_notifications_summary_show);
-            final String summaryShowEntryValue =
-                    Integer.toString(NotificationManager.VISIBILITY_NO_OVERRIDE);
-            entries.add(summaryShowEntry);
-            values.add(summaryShowEntryValue);
-            setRestrictedIfNotificationFeaturesDisabled(summaryShowEntry, summaryShowEntryValue,
-                    DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS
-                            | DevicePolicyManager.KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS);
-        }
-
-        final String summaryHideEntry = getString(R.string.lock_screen_notifications_summary_hide);
-        final String summaryHideEntryValue = Integer.toString(Notification.VISIBILITY_PRIVATE);
-        entries.add(summaryHideEntry);
-        values.add(summaryHideEntryValue);
-        setRestrictedIfNotificationFeaturesDisabled(summaryHideEntry, summaryHideEntryValue,
-                DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS);
-        entries.add(getString(R.string.lock_screen_notifications_summary_disable));
-        values.add(Integer.toString(Notification.VISIBILITY_SECRET));
-        mVisibilityOverride.setEntries(entries.toArray(new CharSequence[entries.size()]));
-        mVisibilityOverride.setEntryValues(values.toArray(new CharSequence[values.size()]));
-
-        if (sensitive == Ranking.VISIBILITY_NO_OVERRIDE) {
-            mVisibilityOverride.setValue(Integer.toString(getGlobalVisibility()));
-        } else {
-            mVisibilityOverride.setValue(Integer.toString(sensitive));
-        }
-        mVisibilityOverride.setSummary("%s");
-
-        mVisibilityOverride.setOnPreferenceChangeListener(
-                new Preference.OnPreferenceChangeListener() {
-            @Override
-            public boolean onPreferenceChange(Preference preference, Object newValue) {
-                int sensitive = Integer.parseInt((String) newValue);
-                if (sensitive == getGlobalVisibility()) {
-                    sensitive = Ranking.VISIBILITY_NO_OVERRIDE;
-                }
-                if (mChannel != null) {
-                    mChannel.setLockscreenVisibility(sensitive);
-                    mChannel.lockFields(NotificationChannel.USER_LOCKED_VISIBILITY);
-                    mBackend.updateChannel(mPkg, mUid, mChannel);
-                } else {
-                    mBackend.setVisibilityOverride(mPkgInfo.packageName, mUid, sensitive);
-                }
-                return true;
-            }
-        });
-    }
-
-    private void setRestrictedIfNotificationFeaturesDisabled(CharSequence entry,
-            CharSequence entryValue, int keyguardNotificationFeatures) {
-        EnforcedAdmin admin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(
-                mContext, keyguardNotificationFeatures, mUserId);
-        if (admin != null) {
-            RestrictedItem item = new RestrictedItem(entry, entryValue, admin);
-            mVisibilityOverride.addRestrictedItem(item);
-        }
-    }
-
-    private int getGlobalVisibility() {
-        int globalVis = Ranking.VISIBILITY_NO_OVERRIDE;
-        if (!getLockscreenNotificationsEnabled()) {
-            globalVis = Notification.VISIBILITY_SECRET;
-        } else if (!getLockscreenAllowPrivateNotifications()) {
-            globalVis = Notification.VISIBILITY_PRIVATE;
-        }
-        return globalVis;
-    }
-
-    private boolean getLockscreenNotificationsEnabled() {
-        return Settings.Secure.getInt(getContentResolver(),
-                Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) != 0;
-    }
-
-    private boolean getLockscreenAllowPrivateNotifications() {
-        return Settings.Secure.getInt(getContentResolver(),
-                Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0) != 0;
-    }
-
-    private boolean isLockScreenSecure() {
-        LockPatternUtils utils = new LockPatternUtils(getActivity());
-        boolean lockscreenSecure = utils.isSecure(UserHandle.myUserId());
-        UserInfo parentUser = mUm.getProfileParent(UserHandle.myUserId());
-        if (parentUser != null){
-            lockscreenSecure |= utils.isSecure(parentUser.id);
-        }
-
-        return lockscreenSecure;
-    }
-
-    protected void updateDependents(int importance) {
-        if (getPreferenceScreen().findPreference(mBlock.getKey()) != null) {
-            setVisible(mSilent, checkCanBeVisible(NotificationManager.IMPORTANCE_MIN, importance));
-            mSilent.setChecked(importance == NotificationManager.IMPORTANCE_LOW);
-        }
-        setVisible(mPriority, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT, importance)
-                || (checkCanBeVisible(NotificationManager.IMPORTANCE_LOW, importance)
-                && mDndVisualEffectsSuppressed));
-        setVisible(mVisibilityOverride,
-                checkCanBeVisible(NotificationManager.IMPORTANCE_MIN, importance)
-                        && isLockScreenSecure());
+        mBlock.setDisabledByAdmin(mSuspendedAppsAdmin);
     }
 
     protected void setVisible(Preference p, boolean visible) {
@@ -397,13 +158,6 @@
         }
     }
 
-    protected boolean checkCanBeVisible(int minImportanceVisible, int importance) {
-        if (importance == NotificationManager.IMPORTANCE_UNSPECIFIED) {
-            return true;
-        }
-        return importance >= minImportanceVisible;
-    }
-
     protected void toastAndFinish() {
         Toast.makeText(mContext, R.string.app_not_found_dlg_text, Toast.LENGTH_SHORT).show();
         getActivity().finish();
diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java
index 88df549..1d5f09e 100644
--- a/src/com/android/settings/notification/ZenModeSettings.java
+++ b/src/com/android/settings/notification/ZenModeSettings.java
@@ -18,16 +18,14 @@
 
 import android.app.NotificationManager;
 import android.app.NotificationManager.Policy;
+import android.content.Context;
 import android.os.Bundle;
+import android.support.annotation.VisibleForTesting;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceScreen;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.settings.R;
-import com.android.settings.SettingsActivity;
 
 public class ZenModeSettings extends ZenModeSettingsBase {
     private static final String KEY_PRIORITY_SETTINGS = "priority_settings";
@@ -80,25 +78,25 @@
 
     private void updatePrioritySettingsSummary() {
         String s = getResources().getString(R.string.zen_mode_alarms);
-        s = appendLowercase(s, isCategoryEnabled(mPolicy, Policy.PRIORITY_CATEGORY_REMINDERS),
+        s = append(s, isCategoryEnabled(mPolicy, Policy.PRIORITY_CATEGORY_REMINDERS),
                 R.string.zen_mode_reminders);
-        s = appendLowercase(s, isCategoryEnabled(mPolicy, Policy.PRIORITY_CATEGORY_EVENTS),
+        s = append(s, isCategoryEnabled(mPolicy, Policy.PRIORITY_CATEGORY_EVENTS),
                 R.string.zen_mode_events);
         if (isCategoryEnabled(mPolicy, Policy.PRIORITY_CATEGORY_MESSAGES)) {
             if (mPolicy.priorityMessageSenders == Policy.PRIORITY_SENDERS_ANY) {
-                s = appendLowercase(s, true, R.string.zen_mode_all_messages);
+                s = append(s, true, R.string.zen_mode_all_messages);
             } else {
-                s = appendLowercase(s, true, R.string.zen_mode_selected_messages);
+                s = append(s, true, R.string.zen_mode_selected_messages);
             }
         }
         if (isCategoryEnabled(mPolicy, Policy.PRIORITY_CATEGORY_CALLS)) {
             if (mPolicy.priorityCallSenders == Policy.PRIORITY_SENDERS_ANY) {
-                s = appendLowercase(s, true, R.string.zen_mode_all_callers);
+                s = append(s, true, R.string.zen_mode_all_callers);
             } else {
-                s = appendLowercase(s, true, R.string.zen_mode_selected_callers);
+                s = append(s, true, R.string.zen_mode_selected_callers);
             }
         } else if (isCategoryEnabled(mPolicy, Policy.PRIORITY_CATEGORY_REPEAT_CALLERS)) {
-            s = appendLowercase(s, true, R.string.zen_mode_repeat_callers);
+            s = append(s, true, R.string.zen_mode_repeat_callers);
         }
         mPrioritySettings.setSummary(s);
     }
@@ -124,10 +122,11 @@
         return (policy.priorityCategories & categoryType) != 0;
     }
 
-    private String appendLowercase(String s, boolean condition, int resId) {
+    @VisibleForTesting
+    String append(String s, boolean condition, int resId) {
         if (condition) {
-            return getResources().getString(R.string.join_many_items_middle, s,
-                    getResources().getString(resId).toLowerCase());
+            final Context context = getContext();
+            return context.getString(R.string.join_many_items_middle, s, context.getString(resId));
         }
         return s;
     }
diff --git a/src/com/android/settings/overlay/FeatureFactory.java b/src/com/android/settings/overlay/FeatureFactory.java
index 364d5ed..0b8ee8e 100644
--- a/src/com/android/settings/overlay/FeatureFactory.java
+++ b/src/com/android/settings/overlay/FeatureFactory.java
@@ -81,7 +81,7 @@
     public abstract EnterprisePrivacyFeatureProvider getEnterprisePrivacyFeatureProvider(
             Context context);
 
-    public abstract SearchFeatureProvider getSearchFeatureProvider(Context context);
+    public abstract SearchFeatureProvider getSearchFeatureProvider();
 
     public abstract SurveyFeatureProvider getSurveyFeatureProvider(Context context);
 
diff --git a/src/com/android/settings/overlay/FeatureFactoryImpl.java b/src/com/android/settings/overlay/FeatureFactoryImpl.java
index 2aa9b34..c2d5d79 100644
--- a/src/com/android/settings/overlay/FeatureFactoryImpl.java
+++ b/src/com/android/settings/overlay/FeatureFactoryImpl.java
@@ -104,9 +104,9 @@
     }
 
     @Override
-    public SearchFeatureProvider getSearchFeatureProvider(Context context) {
+    public SearchFeatureProvider getSearchFeatureProvider() {
         if (mSearchFeatureProvider == null) {
-            mSearchFeatureProvider = new SearchFeatureProviderImpl(context);
+            mSearchFeatureProvider = new SearchFeatureProviderImpl();
         }
         return mSearchFeatureProvider;
     }
diff --git a/src/com/android/settings/overlay/SupportFeatureProvider.java b/src/com/android/settings/overlay/SupportFeatureProvider.java
index 24ec7b5..0f8d424 100644
--- a/src/com/android/settings/overlay/SupportFeatureProvider.java
+++ b/src/com/android/settings/overlay/SupportFeatureProvider.java
@@ -21,9 +21,11 @@
 import android.annotation.NonNull;
 import android.annotation.StringRes;
 import android.app.Activity;
+import android.app.FragmentManager;
 import android.content.Context;
 import android.content.Intent;
 
+import android.os.Bundle;
 import com.android.settings.support.SupportPhone;
 
 import java.lang.annotation.Retention;
@@ -142,8 +144,13 @@
     Intent getTipsAndTricksIntent(Context context);
 
     /**
-     * Returns the string for the disclaimer in the Support dialog
+     * Returns the string for the disclaimer in the Support dialog.
      */
     @StringRes
     int getDisclaimerStringResId();
+
+    /**
+     * launches the fragment that displays the system information being sent to support agents.
+     */
+    void launchSystemInfoFragment(Bundle args, FragmentManager manager);
 }
diff --git a/src/com/android/settings/search2/CursorToSearchResultConverter.java b/src/com/android/settings/search2/CursorToSearchResultConverter.java
new file mode 100644
index 0000000..3d29323
--- /dev/null
+++ b/src/com/android/settings/search2/CursorToSearchResultConverter.java
@@ -0,0 +1,190 @@
+/*
+ * 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.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.graphics.drawable.Drawable;
+import android.os.BadParcelableException;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.util.Log;
+import com.android.settings.SettingsActivity;
+import com.android.settings.Utils;
+import com.android.settings.search.Index;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_RANK;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_TITLE;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_SUMMARY_ON;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_CLASS_NAME;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_ICON;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_INTENT_ACTION;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_KEY;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_PAYLOAD_TYPE;
+import static com.android.settings.search2.DatabaseResultLoader.COLUMN_INDEX_PAYLOAD;
+
+/**
+ * Controller to Build search results from {@link Cursor} Objects.
+ *
+ * Each converted {@link Cursor} has the following fields:
+ * - String Title
+ * - String Summary
+ * - int rank
+ * - {@link Drawable} icon
+ * - {@link ResultPayload} payload
+ */
+class CursorToSearchResultConverter {
+
+    private final String TAG = "CursorConverter";
+
+    private final Context mContext;
+
+    public CursorToSearchResultConverter(Context context) {
+        mContext = context;
+    }
+
+    public List<SearchResult> convertCursor(Cursor cursorResults) {
+        if (cursorResults == null) {
+            return null;
+        }
+        final Map<String, Context> contextMap = new HashMap<>();
+        final ArrayList<SearchResult> results = new ArrayList<>();
+
+        while (cursorResults.moveToNext()) {
+            SearchResult result = buildSingleSearchResultFromCursor(contextMap, cursorResults);
+            if (result != null) {
+                results.add(result);
+            }
+        }
+        Collections.sort(results);
+        return results;
+    }
+
+    private SearchResult buildSingleSearchResultFromCursor(Map<String, Context> contextMap,
+            Cursor cursor) {
+        final String pkgName = cursor.getString(COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE);
+        final String action = cursor.getString(COLUMN_INDEX_INTENT_ACTION);
+        final String title = cursor.getString(COLUMN_INDEX_TITLE);
+        final String summaryOn = cursor.getString(COLUMN_INDEX_SUMMARY_ON);
+        final String className = cursor.getString(COLUMN_INDEX_CLASS_NAME);
+        final int rank = cursor.getInt(COLUMN_INDEX_RANK);
+        final String key = cursor.getString(COLUMN_INDEX_KEY);
+        final String iconResStr = cursor.getString(COLUMN_INDEX_ICON);
+        final int payloadType = cursor.getInt(COLUMN_INDEX_PAYLOAD_TYPE);
+        final byte[] marshalledPayload = cursor.getBlob(COLUMN_INDEX_PAYLOAD);
+        final ResultPayload payload;
+
+        if (marshalledPayload != null) {
+            payload = getUnmarshalledPayload(marshalledPayload, payloadType);
+        } else if (payloadType == ResultPayload.PayloadType.INTENT) {
+            payload = getIntentPayload(cursor, action, key, className, pkgName);
+        } else {
+            Log.w(TAG, "Error creating payload - bad marshalling data or mismatched types");
+            return null;
+        }
+
+        final 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(TAG, "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;
+    }
+
+    private IntentPayload getIntentPayload(Cursor cursor, String action, String key,
+            String className, String pkgName ) {
+        IntentPayload 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);
+        }
+        return payload;
+    }
+
+    private ResultPayload getUnmarshalledPayload(byte[] unmarshalledPayload, int payloadType) {
+        try {
+            switch (payloadType) {
+                case ResultPayload.PayloadType.INLINE_SWITCH:
+                    return ResultPayloadUtils.unmarshall(unmarshalledPayload,
+                            InlineSwitchPayload.CREATOR);
+            }
+        } catch (BadParcelableException e) {
+            Log.w(TAG, "Error creating parcelable: " + e);
+        }
+        return null;
+    }
+}
diff --git a/src/com/android/settings/search2/DatabaseIndexingUtils.java b/src/com/android/settings/search2/DatabaseIndexingUtils.java
index c7a7f92..9fdf732 100644
--- a/src/com/android/settings/search2/DatabaseIndexingUtils.java
+++ b/src/com/android/settings/search2/DatabaseIndexingUtils.java
@@ -66,6 +66,10 @@
      */
     public static Map<String, PreferenceController> getPreferenceControllerUriMap(
             String className, Context context) {
+        if (context == null) {
+            return null;
+        }
+
         final Class<?> clazz = getIndexableClass(className);
 
         if (clazz == null) {
@@ -77,6 +81,7 @@
         // 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);
 
@@ -94,8 +99,9 @@
     }
 
     /**
-     * @param uriMap Map between the {@link PreferenceController} keys and the controllers themselves.
-     * @param key The look up key
+     * @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.
      */
@@ -135,15 +141,13 @@
         } 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 + "'");
+            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 + "'");
+            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 + "'");
+            Log.d(TAG, "Illegal argument when accessing field '" +
+                    FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER + "'");
         }
         return null;
     }
diff --git a/src/com/android/settings/search2/DatabaseResultLoader.java b/src/com/android/settings/search2/DatabaseResultLoader.java
index b268f6a..201d76f 100644
--- a/src/com/android/settings/search2/DatabaseResultLoader.java
+++ b/src/com/android/settings/search2/DatabaseResultLoader.java
@@ -48,14 +48,36 @@
 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;
 
+    private final CursorToSearchResultConverter mConverter;
+
+    /* These indices are used to match the columns of the this loader's SELECT statement.
+     These are not necessarily the same order or coverage as the schema defined in
+     IndexDatabaseHelper */
+    public static final int COLUMN_INDEX_RANK = 0;
+    public static final int COLUMN_INDEX_TITLE = 1;
+    public static final int COLUMN_INDEX_SUMMARY_ON = 2;
+    public static final int COLUMN_INDEX_SUMMARY_OFF = 3;
+    public static final int COLUMN_INDEX_ENTRIES = 4;
+    public static final int COLUMN_INDEX_KEYWORDS = 5;
+    public static final int COLUMN_INDEX_CLASS_NAME = 6;
+    public static final int COLUMN_INDEX_SCREEN_TITLE = 7;
+    public static final int COLUMN_INDEX_ICON = 8;
+    public static final int COLUMN_INDEX_INTENT_ACTION = 9;
+    public static final int COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE = 10;
+    public static final int COLUMN_INDEX_INTENT_ACTION_TARGET_CLASS = 11;
+    public static final int COLUMN_INDEX_ENABLED = 12;
+    public static final int COLUMN_INDEX_KEY = 13;
+    public static final int COLUMN_INDEX_PAYLOAD_TYPE = 14;
+    public static final int COLUMN_INDEX_PAYLOAD = 15;
+
     public DatabaseResultLoader(Context context, String queryText) {
         super(context);
         mDatabase = IndexDatabaseHelper.getInstance(context).getReadableDatabase();
         mQueryText = queryText;
-        mContext = context;
+        mConverter = new CursorToSearchResultConverter(context);
     }
 
     @Override
@@ -72,7 +94,7 @@
         String query = getSQLQuery();
         Cursor result = mDatabase.rawQuery(query, null);
 
-        return parseCursorForSearch(result);
+        return mConverter.convertCursor(result);
     }
 
     @Override
@@ -86,100 +108,12 @@
                         "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_key_reference, payload_type, payload 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);
     }
 
-    @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
-    public ArrayList<SearchResult> parseCursorForSearch(Cursor cursorResults) {
-        if (cursorResults == null) {
-            return null;
-        }
-        final Map<String, Context> contextMap = new HashMap<>();
-        final ArrayList<SearchResult> results = new ArrayList<>();
 
-        while (cursorResults.moveToNext()) {
-            SearchResult result = buildSingleSearchResultFromCursor(contextMap, cursorResults);
-            if (result != null) {
-                results.add(result);
-            }
-        }
-        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/InlinePayload.java b/src/com/android/settings/search2/InlinePayload.java
new file mode 100644
index 0000000..4b1c168
--- /dev/null
+++ b/src/com/android/settings/search2/InlinePayload.java
@@ -0,0 +1,43 @@
+/*
+ * 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;
+
+/**
+ * Abstract Payload for inline settings results.
+ */
+public abstract class InlinePayload extends ResultPayload {
+    /**
+     * Defines the URI to access and store the Setting the inline result represents
+     */
+    public String settingsUri;
+
+    /**
+     * The UI type for the inline result.
+     */
+    @PayloadType public int inlineType;
+
+    /**
+     * Defines where the Setting is stored.
+     */
+    @SettingsSource public int settingSource;
+
+    public InlinePayload(String uri, @PayloadType int type, @SettingsSource int source) {
+        settingsUri = uri;
+        inlineType = type;
+        settingSource = source;
+    }
+}
diff --git a/src/com/android/settings/search2/InlineSliderPayload.java b/src/com/android/settings/search2/InlineSliderPayload.java
deleted file mode 100644
index 8f08d59..0000000
--- a/src/com/android/settings/search2/InlineSliderPayload.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.net.Uri;
-import android.os.Parcel;
-
-/**
- * Payload for Inline Settings results represented by a Slider.
- */
-public class InlineSliderPayload extends ResultPayload {
-    public final Uri uri;
-
-    private InlineSliderPayload(Parcel in) {
-        uri = in.readParcelable(InlineSliderPayload.class.getClassLoader());
-    }
-
-    public InlineSliderPayload(Uri newUri) {
-        uri = newUri;
-    }
-
-    @Override
-    public int getType() {
-        return PayloadType.INLINE_SLIDER;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeParcelable(uri, flags);
-    }
-
-    public static final Creator<InlineSliderPayload> CREATOR = new Creator<InlineSliderPayload>() {
-        @Override
-        public InlineSliderPayload createFromParcel(Parcel in) {
-            return new InlineSliderPayload(in);
-        }
-
-        @Override
-        public InlineSliderPayload[] newArray(int size) {
-            return new InlineSliderPayload[size];
-        }
-    };
-}
\ No newline at end of file
diff --git a/src/com/android/settings/search2/InlineSwitchPayload.java b/src/com/android/settings/search2/InlineSwitchPayload.java
new file mode 100644
index 0000000..76fb048
--- /dev/null
+++ b/src/com/android/settings/search2/InlineSwitchPayload.java
@@ -0,0 +1,138 @@
+/*
+ * 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.os.Parcel;
+import android.os.Parcelable;
+import android.provider.Settings;
+import android.util.ArrayMap;
+
+import java.util.Map;
+
+/**
+ * Payload for inline Switch results. Mappings from integer to boolean.
+ */
+public class InlineSwitchPayload extends InlinePayload {
+    /**
+     * Maps Inline values to UI-consumable Values.
+     * For example, if you have a switch preference whose values are stored as ints, the two valid
+     * list of mappings would be:
+     * < (0,True), (1, false) >
+     * < (1,True), (0, false) >
+     */
+    public final Map<Integer, Boolean> valueMap;
+
+    public InlineSwitchPayload(String newUri, @SettingsSource int settingsSource,
+            ArrayMap<Integer, Boolean> map) {
+        super(newUri, PayloadType.INLINE_SWITCH, settingsSource);
+        valueMap = map;
+    }
+
+    private InlineSwitchPayload(Parcel in) {
+        super(in.readString() /* Uri */ , in.readInt() /* Payload Type */,
+                in.readInt() /* Settings Source */);
+        valueMap = in.readHashMap(Integer.class.getClassLoader());
+    }
+
+    @Override
+    public int getType() {
+        return inlineType;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(settingsUri);
+        dest.writeInt(inlineType);
+        dest.writeInt(settingSource);
+        dest.writeMap(valueMap);
+    }
+
+    public static final Parcelable.Creator<InlineSwitchPayload> CREATOR =
+            new Parcelable.Creator<InlineSwitchPayload>() {
+        @Override
+        public InlineSwitchPayload createFromParcel(Parcel in) {
+            return new InlineSwitchPayload(in);
+        }
+
+        @Override
+        public InlineSwitchPayload[] newArray(int size) {
+            return new InlineSwitchPayload[size];
+        }
+    };
+
+    public boolean getSwitchValue(Context context) {
+        if (valueMap == null) {
+            throw new IllegalStateException("Value map is null");
+        }
+
+        int settingsValue = -1;
+        switch(settingSource) {
+            case SettingsSource.SECURE:
+                settingsValue = Settings.Secure.getInt(context.getContentResolver(),
+                        settingsUri, 0);
+        }
+
+        if (settingsValue == -1) {
+            throw new IllegalStateException("Unable to find setting from uri: "
+                    + settingsUri.toString());
+        }
+
+        for (Integer key : valueMap.keySet()) {
+            if ((key == settingsValue)) {
+                return valueMap.get(key);
+            }
+        }
+
+        throw new IllegalStateException("No results matched the key: " + settingsValue);
+    }
+
+    public void setSwitchValue(Context context, boolean isChecked) {
+        if (valueMap == null) {
+            throw new IllegalStateException("Value map is null");
+        }
+        int switchValue = -1;
+
+        for (Map.Entry<Integer, Boolean> pair : valueMap.entrySet()) {
+            if (pair.getValue() == isChecked) {
+                switchValue = pair.getKey();
+                break;
+            }
+        }
+
+        if (switchValue == -1) {
+            throw new IllegalStateException("Switch value is not set");
+        }
+
+        switch(settingSource) {
+            case SettingsSource.GLOBAL:
+                return;
+            case SettingsSource.SECURE:
+                Settings.Secure.putInt(context.getContentResolver(), settingsUri, switchValue);
+            case SettingsSource.SYSTEM:
+                return;
+            case SettingsSource.UNKNOWN:
+                return;
+        }
+    }
+}
diff --git a/src/com/android/settings/search2/InlineSwitchViewHolder.java b/src/com/android/settings/search2/InlineSwitchViewHolder.java
new file mode 100644
index 0000000..54d3523
--- /dev/null
+++ b/src/com/android/settings/search2/InlineSwitchViewHolder.java
@@ -0,0 +1,73 @@
+/*
+ * 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.app.Fragment;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewParent;
+import android.widget.CompoundButton;
+import android.widget.Switch;
+import android.widget.TextView;
+import android.content.Context;
+
+import com.android.internal.widget.PreferenceImageView;
+import com.android.settings.R;
+
+/**
+ * ViewHolder for Settings represented as SwitchPreferences.
+ */
+public class InlineSwitchViewHolder extends SearchViewHolder {
+    public final TextView titleView;
+    public final TextView summaryView;
+    public final PreferenceImageView iconView;
+    public final Switch switchView;
+
+    private final Context mContext;
+
+    private final String TAG = "SwitchViewHolder";
+
+    public InlineSwitchViewHolder(View view, Context context) {
+        super(view);
+        mContext = context;
+        titleView = (TextView) view.findViewById(android.R.id.title);
+        summaryView = (TextView) view.findViewById(android.R.id.summary);
+        iconView = (PreferenceImageView) view.findViewById(android.R.id.icon);
+        switchView = (Switch) view.findViewById(R.id.switchView);
+    }
+
+    @Override
+    public void onBind(Fragment fragment, SearchResult result) {
+        if (mContext == null) {
+            return;
+        }
+        final InlineSwitchPayload payload = (InlineSwitchPayload) result.payload;
+        switchView.setChecked(payload.getSwitchValue(mContext));
+
+        switchView.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                payload.setSwitchValue(mContext, isChecked);
+            }
+        });
+
+        titleView.setText(result.title);
+        summaryView.setText(result.summary);
+        iconView.setImageDrawable(result.icon);
+    }
+}
diff --git a/src/com/android/settings/search2/IntentSearchViewHolder.java b/src/com/android/settings/search2/IntentSearchViewHolder.java
index 0ef27d0..da3f724 100644
--- a/src/com/android/settings/search2/IntentSearchViewHolder.java
+++ b/src/com/android/settings/search2/IntentSearchViewHolder.java
@@ -34,13 +34,13 @@
 
     public IntentSearchViewHolder(View view) {
         super(view);
-        titleView = (TextView) view.findViewById(R.id.title);
-        summaryView = (TextView) view.findViewById(R.id.summary);
-        iconView = (ImageView) view.findViewById(R.id.icon);
+        titleView = (TextView) view.findViewById(android.R.id.title);
+        summaryView = (TextView) view.findViewById(android.R.id.summary);
+        iconView = (ImageView) view.findViewById(android.R.id.icon);
     }
 
     @Override
-    public void onBind(Fragment fragment, SearchResult result) {
+    public void onBind(final Fragment fragment, final SearchResult result) {
         titleView.setText(result.title);
         summaryView.setText(result.summary);
         iconView.setImageDrawable(result.icon);
diff --git a/src/com/android/settings/search2/ResultPayload.java b/src/com/android/settings/search2/ResultPayload.java
index 84df7b6..3842def 100644
--- a/src/com/android/settings/search2/ResultPayload.java
+++ b/src/com/android/settings/search2/ResultPayload.java
@@ -28,7 +28,8 @@
  */
 public abstract class ResultPayload implements Parcelable {
 
-    @IntDef({PayloadType.INLINE_SLIDER, PayloadType.INLINE_SWITCH, PayloadType.INTENT})
+    @IntDef({PayloadType.INLINE_SLIDER, PayloadType.INLINE_SWITCH,
+            PayloadType.INTENT})
     @Retention(RetentionPolicy.SOURCE)
     public @interface PayloadType {
         /**
@@ -47,5 +48,16 @@
         int INLINE_SWITCH = 2;
     }
 
+    @IntDef({SettingsSource.UNKNOWN, SettingsSource.SYSTEM, SettingsSource.SECURE,
+            SettingsSource.GLOBAL})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface SettingsSource {
+        int UNKNOWN = 0;
+        int SYSTEM = 1;
+        int SECURE = 2;
+        int GLOBAL = 3;
+    }
+
+
     @ResultPayload.PayloadType public abstract int getType();
 }
diff --git a/src/com/android/settings/search2/SearchFeatureProvider.java b/src/com/android/settings/search2/SearchFeatureProvider.java
index ad26eae..8a616a7 100644
--- a/src/com/android/settings/search2/SearchFeatureProvider.java
+++ b/src/com/android/settings/search2/SearchFeatureProvider.java
@@ -27,7 +27,7 @@
     /**
      * @return true to use the new version of search
      */
-    boolean isEnabled();
+    boolean isEnabled(Context context);
 
     /**
      * Inserts the Menu items into Settings activity.
diff --git a/src/com/android/settings/search2/SearchFeatureProviderImpl.java b/src/com/android/settings/search2/SearchFeatureProviderImpl.java
index e2d25ad..acb90b7 100644
--- a/src/com/android/settings/search2/SearchFeatureProviderImpl.java
+++ b/src/com/android/settings/search2/SearchFeatureProviderImpl.java
@@ -31,16 +31,11 @@
  * FeatureProvider for the refactored search code.
  */
 public class SearchFeatureProviderImpl implements SearchFeatureProvider {
-    protected Context mContext;
 
     private DatabaseIndexingManager mDatabaseIndexingManager;
 
-    public SearchFeatureProviderImpl(Context context) {
-        mContext = context;
-    }
-
     @Override
-    public boolean isEnabled() {
+    public boolean isEnabled(Context context) {
         return false;
     }
 
@@ -49,7 +44,7 @@
         if (menu == null || activity == null) {
             return;
         }
-        String menuTitle = mContext.getString(R.string.search_menu);
+        String menuTitle = activity.getString(R.string.search_menu);
         MenuItem menuItem = menu.add(Menu.NONE, Menu.NONE, Menu.NONE, menuTitle)
                 .setIcon(R.drawable.abc_ic_search_api_material)
                 .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@@ -86,7 +81,7 @@
 
     @Override
     public void updateIndex(Context context) {
-        if (isEnabled()) {
+        if (isEnabled(context)) {
             getIndexingManager(context).update();
         } else {
             Index.getInstance(context).update();
diff --git a/src/com/android/settings/search2/SearchFragment.java b/src/com/android/settings/search2/SearchFragment.java
index fca52e9..1a4e6dc 100644
--- a/src/com/android/settings/search2/SearchFragment.java
+++ b/src/com/android/settings/search2/SearchFragment.java
@@ -66,7 +66,7 @@
     public void onAttach(Context context) {
         super.onAttach(context);
         mSearchFeatureProvider = FeatureFactory.getFactory(context)
-                .getSearchFeatureProvider(context);
+                .getSearchFeatureProvider();
     }
 
     @Override
diff --git a/src/com/android/settings/search2/SearchResultsAdapter.java b/src/com/android/settings/search2/SearchResultsAdapter.java
index b588496..c318b41 100644
--- a/src/com/android/settings/search2/SearchResultsAdapter.java
+++ b/src/com/android/settings/search2/SearchResultsAdapter.java
@@ -16,8 +16,10 @@
 
 package com.android.settings.search2;
 
+import android.content.Context;
 import android.support.annotation.VisibleForTesting;
 import android.support.v7.widget.RecyclerView.Adapter;
+import android.util.ArrayMap;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -26,7 +28,6 @@
 import com.android.settings.search2.ResultPayload.PayloadType;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -38,22 +39,23 @@
     public SearchResultsAdapter(SearchFragment fragment) {
         mFragment = fragment;
         mSearchResults = new ArrayList<>();
-        mResultsMap = new HashMap<>();
+        mResultsMap = new ArrayMap<>();
 
         setHasStableIds(true);
     }
 
     @Override
     public SearchViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
-        final LayoutInflater inflater = LayoutInflater.from(parent.getContext());
-        switch (viewType) {
+        final Context context = parent.getContext();
+        final LayoutInflater inflater = LayoutInflater.from(context);
+        final View view;
+        switch(viewType) {
             case PayloadType.INTENT:
-                View view = inflater.inflate(R.layout.search_intent_item, parent, false);
+                view = inflater.inflate(R.layout.search_intent_item, parent, false);
                 return new IntentSearchViewHolder(view);
-            case PayloadType.INLINE_SLIDER:
-                return null;
             case PayloadType.INLINE_SWITCH:
-                return null;
+                view = inflater.inflate(R.layout.search_inline_switch_item, parent, false);
+                return new InlineSwitchViewHolder(view, context);
             default:
                 return null;
         }
diff --git a/src/com/android/settings/support/SupportDisclaimerDialogFragment.java b/src/com/android/settings/support/SupportDisclaimerDialogFragment.java
index 8ab607f..3a7102c 100644
--- a/src/com/android/settings/support/SupportDisclaimerDialogFragment.java
+++ b/src/com/android/settings/support/SupportDisclaimerDialogFragment.java
@@ -23,14 +23,18 @@
 import android.app.DialogFragment;
 import android.content.DialogInterface;
 import android.os.Bundle;
+import android.text.Annotation;
 import android.text.Spannable;
+import android.text.Spanned;
 import android.text.TextPaint;
+import android.text.TextUtils;
 import android.text.style.URLSpan;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.CheckBox;
 import android.widget.TextView;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
@@ -44,8 +48,8 @@
         implements DialogInterface.OnClickListener {
 
     public static final String TAG = "SupportDisclaimerDialog";
-    private static final String EXTRA_TYPE = "extra_type";
-    private static final String EXTRA_ACCOUNT = "extra_account";
+    public static final String EXTRA_TYPE = "extra_type";
+    public static final String EXTRA_ACCOUNT = "extra_account";
 
     public static SupportDisclaimerDialogFragment newInstance(Account account,
             @SupportFeatureProvider.SupportType int type) {
@@ -69,8 +73,13 @@
         final Activity activity = getActivity();
         final SupportFeatureProvider supportFeatureProvider =
                 FeatureFactory.getFactory(activity).getSupportFeatureProvider(activity);
+
+        // sets the two links that go to privacy policy and terms of service
         disclaimer.setText(supportFeatureProvider.getDisclaimerStringResId());
-        stripUnderlines((Spannable) disclaimer.getText());
+        Spannable viewText = (Spannable) disclaimer.getText();
+        stripUnderlines(viewText);
+        SystemInformationSpan.linkify(viewText, this);
+        // sets the link that launches a dialog to expose the signals we are sending
         return builder
                 .setView(content)
                 .create();
@@ -112,9 +121,11 @@
         for (URLSpan span : urls) {
             final int start = input.getSpanStart(span);
             final int end = input.getSpanEnd(span);
-            input.removeSpan(span);
-            input.setSpan(new NoUnderlineUrlSpan(span.getURL()), start, end,
-                    Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+            if (!TextUtils.isEmpty(span.getURL())) {
+                input.removeSpan(span);
+                input.setSpan(new NoUnderlineUrlSpan(span.getURL()), start, end,
+                        Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+            }
         }
     }
 
@@ -138,4 +149,69 @@
             ds.setUnderlineText(false);
         }
     }
+
+    /**
+     * A {@link URLSpan} that opens a dialog when clicked
+     */
+    public static class SystemInformationSpan extends URLSpan {
+
+        private static final String ANNOTATION_URL = "url";
+        private final DialogFragment mDialog;
+        private SupportFeatureProvider mSupport;
+
+        public SystemInformationSpan(DialogFragment parent) {
+            // sets the url to empty string so we can prevent the NoUnderlineUrlSpan from stripping
+            // this one
+            super("");
+            mSupport  = FeatureFactory.getFactory(parent.getContext())
+                    .getSupportFeatureProvider(parent.getContext());
+            mDialog = parent;
+        }
+
+        @Override
+        public void onClick(View widget) {
+            Activity activity =  mDialog.getActivity();
+            if (mSupport != null && activity != null) {
+                // launch the system info fragment
+                mSupport.launchSystemInfoFragment(mDialog.getArguments(),
+                        activity.getFragmentManager());
+
+                // dismiss this fragment
+                mDialog.dismiss();
+            }
+        }
+
+        @Override
+        public void updateDrawState(TextPaint ds) {
+            super.updateDrawState(ds);
+            // remove underline
+            ds.setUnderlineText(false);
+        }
+
+        /**
+         * This method takes a string and turns it into a url span that will launch a
+         * SupportSystemInformationDialogFragment
+         * @param msg The text to turn into a link
+         * @param parent The dialog the text is in
+         * @return A CharSequence containing the original text content as a url
+         */
+        public static CharSequence linkify(Spannable msg, DialogFragment parent) {
+            Annotation[] spans = msg.getSpans(0, msg.length(), Annotation.class);
+            for (Annotation annotation : spans) {
+                int start = msg.getSpanStart(annotation);
+                int end = msg.getSpanEnd(annotation);
+                if (ANNOTATION_URL.equals(annotation.getValue())) {
+                    SystemInformationSpan link = new SystemInformationSpan(parent);
+                    msg.removeSpan(annotation);
+                    msg.setSpan(link, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+                }
+            }
+            return msg;
+        }
+
+        @VisibleForTesting
+        public void setSupportProvider(SupportFeatureProvider prov) {
+            mSupport = prov;
+        }
+    }
 }
diff --git a/src/com/android/settings/survey/SurveyMixin.java b/src/com/android/settings/survey/SurveyMixin.java
index 5e0754a..74b7f10 100644
--- a/src/com/android/settings/survey/SurveyMixin.java
+++ b/src/com/android/settings/survey/SurveyMixin.java
@@ -62,7 +62,7 @@
                 if (provider.getSurveyExpirationDate(activity, id) <= -1) {
                     // register the receiver to show the survey on completion.
                     mReceiver = provider.createAndRegisterReceiver(activity);
-                    provider.downloadSurvey(activity, id, "fakeData");
+                    provider.downloadSurvey(activity, id, null /* data */);
                 } else {
                     provider.showSurveyIfAvailable(activity, id);
                 }
diff --git a/src/com/android/settings/system/SystemDashboardFragment.java b/src/com/android/settings/system/SystemDashboardFragment.java
index 5e0a202..b06d403 100644
--- a/src/com/android/settings/system/SystemDashboardFragment.java
+++ b/src/com/android/settings/system/SystemDashboardFragment.java
@@ -19,6 +19,7 @@
 import android.os.UserManager;
 import android.provider.SearchIndexableResource;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.PreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
@@ -42,7 +43,7 @@
 
     @Override
     public int getMetricsCategory() {
-        return SYSTEM_CATEGORY_FRAGMENT;
+        return MetricsProto.MetricsEvent.SETTINGS_SYSTEM_CATEGORY;
     }
 
     @Override
diff --git a/src/com/android/settings/vpn2/AppManagementFragment.java b/src/com/android/settings/vpn2/AppManagementFragment.java
index 23901ce..f86e677 100644
--- a/src/com/android/settings/vpn2/AppManagementFragment.java
+++ b/src/com/android/settings/vpn2/AppManagementFragment.java
@@ -33,7 +33,6 @@
 import android.os.ServiceManager;
 import android.os.UserHandle;
 import android.os.UserManager;
-import android.provider.Settings;
 import android.support.v7.preference.Preference;
 import android.text.TextUtils;
 import android.util.Log;
@@ -63,6 +62,7 @@
 
     private static final String KEY_VERSION = "version";
     private static final String KEY_ALWAYS_ON_VPN = "always_on_vpn";
+    private static final String KEY_LOCKDOWN_VPN = "lockdown_vpn";
     private static final String KEY_FORGET_VPN = "forget_vpn";
 
     private PackageManager mPackageManager;
@@ -78,6 +78,7 @@
     // UI preference
     private Preference mPreferenceVersion;
     private RestrictedSwitchPreference mPreferenceAlwaysOn;
+    private RestrictedSwitchPreference mPreferenceLockdown;
     private RestrictedPreference mPreferenceForget;
 
     // Listener
@@ -87,7 +88,7 @@
         public void onForget() {
             // Unset always-on-vpn when forgetting the VPN
             if (isVpnAlwaysOn()) {
-                setAlwaysOnVpn(false);
+                setAlwaysOnVpn(false, false);
             }
             // Also dismiss and go back to VPN list
             finish();
@@ -118,9 +119,11 @@
 
         mPreferenceVersion = findPreference(KEY_VERSION);
         mPreferenceAlwaysOn = (RestrictedSwitchPreference) findPreference(KEY_ALWAYS_ON_VPN);
+        mPreferenceLockdown = (RestrictedSwitchPreference) findPreference(KEY_LOCKDOWN_VPN);
         mPreferenceForget = (RestrictedPreference) findPreference(KEY_FORGET_VPN);
 
         mPreferenceAlwaysOn.setOnPreferenceChangeListener(this);
+        mPreferenceLockdown.setOnPreferenceChangeListener(this);
         mPreferenceForget.setOnPreferenceClickListener(this);
     }
 
@@ -154,7 +157,9 @@
     public boolean onPreferenceChange(Preference preference, Object newValue) {
         switch (preference.getKey()) {
             case KEY_ALWAYS_ON_VPN:
-                return onAlwaysOnVpnClick((Boolean) newValue);
+                return onAlwaysOnVpnClick((Boolean) newValue, mPreferenceLockdown.isChecked());
+            case KEY_LOCKDOWN_VPN:
+                return onAlwaysOnVpnClick(mPreferenceAlwaysOn.isChecked(), (Boolean) newValue);
             default:
                 Log.w(TAG, "unknown key is clicked: " + preference.getKey());
                 return false;
@@ -176,27 +181,28 @@
         return true;
     }
 
-    private boolean onAlwaysOnVpnClick(final boolean alwaysOnSetting) {
+    private boolean onAlwaysOnVpnClick(final boolean alwaysOnSetting, final boolean lockdown) {
         final boolean replacing = isAnotherVpnActive();
-        final boolean wasAlwaysOn = VpnUtils.isAlwaysOnOrLegacyLockdownActive(getActivity());
-        if (ConfirmLockdownFragment.shouldShow(replacing, wasAlwaysOn, alwaysOnSetting)) {
+        final boolean wasLockdown = VpnUtils.isAnyLockdownActive(getActivity());
+        if (ConfirmLockdownFragment.shouldShow(replacing, wasLockdown, lockdown)) {
             // Place a dialog to confirm that traffic should be locked down.
             final Bundle options = null;
-            ConfirmLockdownFragment.show(this, replacing, wasAlwaysOn, alwaysOnSetting, options);
+            ConfirmLockdownFragment.show(
+                    this, replacing, alwaysOnSetting, wasLockdown, lockdown, options);
             return false;
         }
         // No need to show the dialog. Change the setting straight away.
-        return setAlwaysOnVpnByUI(alwaysOnSetting);
+        return setAlwaysOnVpnByUI(alwaysOnSetting, lockdown);
     }
 
     @Override
-    public void onConfirmLockdown(Bundle options, boolean isEnabled) {
-        if (setAlwaysOnVpnByUI(isEnabled)) {
+    public void onConfirmLockdown(Bundle options, boolean isEnabled, boolean isLockdown) {
+        if (setAlwaysOnVpnByUI(isEnabled, isLockdown)) {
             updateUI();
         }
     }
 
-    private boolean setAlwaysOnVpnByUI(boolean isEnabled) {
+    private boolean setAlwaysOnVpnByUI(boolean isEnabled, boolean isLockdown) {
         updateRestrictedViews();
         if (!mPreferenceAlwaysOn.isEnabled()) {
             return false;
@@ -205,16 +211,16 @@
         if (mUserId == UserHandle.USER_SYSTEM) {
             VpnUtils.clearLockdownVpn(getContext());
         }
-        final boolean success = setAlwaysOnVpn(isEnabled);
+        final boolean success = setAlwaysOnVpn(isEnabled, isLockdown);
         if (isEnabled && (!success || !isVpnAlwaysOn())) {
             CannotConnectFragment.show(this, mVpnLabel);
         }
         return success;
     }
 
-    private boolean setAlwaysOnVpn(boolean isEnabled) {
-         return mConnectivityManager.setAlwaysOnVpnPackageForUser(mUserId,
-                isEnabled ? mPackageName : null, /* lockdownEnabled */ true);
+    private boolean setAlwaysOnVpn(boolean isEnabled, boolean isLockdown) {
+        return mConnectivityManager.setAlwaysOnVpnPackageForUser(mUserId,
+                isEnabled ? mPackageName : null, isLockdown);
     }
 
     @VisibleForTesting
@@ -232,7 +238,12 @@
 
     private void updateUI() {
         if (isAdded()) {
-            mPreferenceAlwaysOn.setChecked(isVpnAlwaysOn());
+            final boolean alwaysOn = isVpnAlwaysOn();
+            final boolean lockdown = alwaysOn
+                    && VpnUtils.isAnyLockdownActive(getActivity());
+
+            mPreferenceAlwaysOn.setChecked(alwaysOn);
+            mPreferenceLockdown.setChecked(lockdown);
             updateRestrictedViews();
         }
     }
@@ -241,6 +252,8 @@
         if (isAdded()) {
             mPreferenceAlwaysOn.checkRestrictionAndSetDisabled(UserManager.DISALLOW_CONFIG_VPN,
                     mUserId);
+            mPreferenceLockdown.checkRestrictionAndSetDisabled(UserManager.DISALLOW_CONFIG_VPN,
+                    mUserId);
             mPreferenceForget.checkRestrictionAndSetDisabled(UserManager.DISALLOW_CONFIG_VPN,
                     mUserId);
 
@@ -251,6 +264,7 @@
                 // should have refreshed the enable state.
             } else {
                 mPreferenceAlwaysOn.setEnabled(false);
+                mPreferenceLockdown.setEnabled(false);
                 mPreferenceAlwaysOn.setSummary(R.string.vpn_not_supported_by_this_app);
             }
         }
diff --git a/src/com/android/settings/vpn2/ConfigDialogFragment.java b/src/com/android/settings/vpn2/ConfigDialogFragment.java
index d9f35af..cf748e4 100644
--- a/src/com/android/settings/vpn2/ConfigDialogFragment.java
+++ b/src/com/android/settings/vpn2/ConfigDialogFragment.java
@@ -134,9 +134,9 @@
     }
 
     @Override
-    public void onConfirmLockdown(Bundle options, boolean isEnabled) {
+    public void onConfirmLockdown(Bundle options, boolean isAlwaysOn, boolean isLockdown) {
         VpnProfile profile = (VpnProfile) options.getParcelable(ARG_PROFILE);
-        connect(profile, isEnabled);
+        connect(profile, isAlwaysOn);
         dismiss();
     }
 
@@ -149,14 +149,15 @@
             // Possibly throw up a dialog to explain lockdown VPN.
             final boolean shouldLockdown = dialog.isVpnAlwaysOn();
             final boolean shouldConnect = shouldLockdown || !dialog.isEditing();
-            final boolean wasAlwaysOn = VpnUtils.isAlwaysOnOrLegacyLockdownActive(mContext);
+            final boolean wasLockdown = VpnUtils.isAnyLockdownActive(mContext);
             try {
                 final boolean replace = VpnUtils.isVpnActive(mContext);
                 if (shouldConnect && !isConnected(profile) &&
-                        ConfirmLockdownFragment.shouldShow(replace, wasAlwaysOn, shouldLockdown)) {
+                        ConfirmLockdownFragment.shouldShow(replace, wasLockdown, shouldLockdown)) {
                     final Bundle opts = new Bundle();
                     opts.putParcelable(ARG_PROFILE, profile);
-                    ConfirmLockdownFragment.show(this, replace, wasAlwaysOn, shouldLockdown, opts);
+                    ConfirmLockdownFragment.show(this, replace, /* alwaysOn */ shouldLockdown,
+                           /* from */  wasLockdown, /* to */ shouldLockdown, opts);
                 } else if (shouldConnect) {
                     connect(profile, shouldLockdown);
                 } else {
diff --git a/src/com/android/settings/vpn2/ConfirmLockdownFragment.java b/src/com/android/settings/vpn2/ConfirmLockdownFragment.java
index 246c2f2..0d40e4c 100644
--- a/src/com/android/settings/vpn2/ConfirmLockdownFragment.java
+++ b/src/com/android/settings/vpn2/ConfirmLockdownFragment.java
@@ -29,7 +29,7 @@
 public class ConfirmLockdownFragment extends InstrumentedDialogFragment
         implements DialogInterface.OnClickListener {
     public interface ConfirmLockdownListener {
-        public void onConfirmLockdown(Bundle options, boolean isEnabled);
+        public void onConfirmLockdown(Bundle options, boolean isEnabled, boolean isLockdown);
     }
 
     private static final String TAG = "ConfirmLockdown";
@@ -40,6 +40,7 @@
     }
 
     private static final String ARG_REPLACING = "replacing";
+    private static final String ARG_ALWAYS_ON = "always_on";
     private static final String ARG_LOCKDOWN_SRC = "lockdown_old";
     private static final String ARG_LOCKDOWN_DST = "lockdown_new";
     private static final String ARG_OPTIONS = "options";
@@ -47,11 +48,11 @@
     public static boolean shouldShow(boolean replacing, boolean fromLockdown, boolean toLockdown) {
         // We only need to show this if we are:
         //  - replacing an existing connection
-        //  - switching on always-on mode where it was not enabled before.
+        //  - switching on always-on mode with lockdown enabled where it was not enabled before.
         return replacing || (toLockdown && !fromLockdown);
     }
 
-    public static void show(Fragment parent, boolean replacing,
+    public static void show(Fragment parent, boolean replacing, boolean alwaysOn,
             boolean fromLockdown, boolean toLockdown, Bundle options) {
         if (parent.getFragmentManager().findFragmentByTag(TAG) != null) {
             // Already exists. Don't show it twice.
@@ -59,6 +60,7 @@
         }
         final Bundle args = new Bundle();
         args.putBoolean(ARG_REPLACING, replacing);
+        args.putBoolean(ARG_ALWAYS_ON, alwaysOn);
         args.putBoolean(ARG_LOCKDOWN_SRC, fromLockdown);
         args.putBoolean(ARG_LOCKDOWN_DST, toLockdown);
         args.putParcelable(ARG_OPTIONS, options);
@@ -72,20 +74,21 @@
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
         final boolean replacing = getArguments().getBoolean(ARG_REPLACING);
-        final boolean wasAlwaysOn = getArguments().getBoolean(ARG_LOCKDOWN_SRC);
-        final boolean nowAlwaysOn = getArguments().getBoolean(ARG_LOCKDOWN_DST);
+        final boolean alwaysOn = getArguments().getBoolean(ARG_ALWAYS_ON);
+        final boolean wasLockdown = getArguments().getBoolean(ARG_LOCKDOWN_SRC);
+        final boolean nowLockdown = getArguments().getBoolean(ARG_LOCKDOWN_DST);
 
         final int titleId = replacing ? R.string.vpn_replace_vpn_title : R.string.vpn_set_vpn_title;
         final int actionId =
                 (replacing ? R.string.vpn_replace :
-                (nowAlwaysOn ? R.string.vpn_turn_on : R.string.okay));
+                (nowLockdown ? R.string.vpn_turn_on : R.string.okay));
         final int messageId;
-        if (nowAlwaysOn) {
+        if (nowLockdown) {
             messageId = replacing
                     ? R.string.vpn_replace_always_on_vpn_enable_message
                     : R.string.vpn_first_always_on_vpn_message;
         } else {
-            messageId = wasAlwaysOn
+            messageId = wasLockdown
                     ? R.string.vpn_replace_always_on_vpn_disable_message
                     : R.string.vpn_replace_vpn_message;
         }
@@ -103,6 +106,7 @@
         if (getTargetFragment() instanceof ConfirmLockdownListener) {
             ((ConfirmLockdownListener) getTargetFragment()).onConfirmLockdown(
                     getArguments().getParcelable(ARG_OPTIONS),
+                    getArguments().getBoolean(ARG_ALWAYS_ON),
                     getArguments().getBoolean(ARG_LOCKDOWN_DST));
         }
     }
diff --git a/src/com/android/settings/vpn2/VpnUtils.java b/src/com/android/settings/vpn2/VpnUtils.java
index 5990381..07e6c52 100644
--- a/src/com/android/settings/vpn2/VpnUtils.java
+++ b/src/com/android/settings/vpn2/VpnUtils.java
@@ -20,6 +20,7 @@
 import android.net.IConnectivityManager;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.provider.Settings;
 import android.security.Credentials;
 import android.security.KeyStore;
 
@@ -53,10 +54,14 @@
         return key.equals(getLockdownVpn());
     }
 
-    public static boolean isAlwaysOnOrLegacyLockdownActive(Context context) {
+    public static boolean isAnyLockdownActive(Context context) {
         final int userId = context.getUserId();
-        return getLockdownVpn() != null
-                || getConnectivityManager(context).getAlwaysOnVpnPackageForUser(userId) != null;
+        if (getLockdownVpn() != null) {
+            return true;
+        }
+        return getConnectivityManager(context).getAlwaysOnVpnPackageForUser(userId) != null
+                && Settings.Secure.getIntForUser(context.getContentResolver(),
+                        Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN, /* default */ 0, userId) != 0;
     }
 
     public static boolean isVpnActive(Context context) throws RemoteException {
diff --git a/tests/robotests/src/com/android/internal/hardware/AmbientDisplayConfiguration.java b/tests/robotests/src/com/android/internal/hardware/AmbientDisplayConfiguration.java
index bea9358..ffa6d96 100644
--- a/tests/robotests/src/com/android/internal/hardware/AmbientDisplayConfiguration.java
+++ b/tests/robotests/src/com/android/internal/hardware/AmbientDisplayConfiguration.java
@@ -17,6 +17,7 @@
 package com.android.internal.hardware;
 
 import android.provider.Settings;
+import android.content.Context;
 
 /**
  * Fake controller to make robolectric test compile. Should be removed when Robolectric supports
@@ -24,6 +25,8 @@
  */
 public class AmbientDisplayConfiguration {
 
+    public AmbientDisplayConfiguration(Context context) {}
+
     public boolean pulseOnPickupAvailable() {
         return false;
     }
diff --git a/tests/robotests/src/com/android/settings/PrivacySettingsTest.java b/tests/robotests/src/com/android/settings/PrivacySettingsTest.java
new file mode 100644
index 0000000..4aac314
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/PrivacySettingsTest.java
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+import android.support.v14.preference.SwitchPreference;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceScreen;
+
+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 static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class PrivacySettingsTest {
+
+    @Mock
+    private PreferenceScreen mScreen;
+    private PrivacySettings mSettings;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        when(mScreen.findPreference(PrivacySettings.BACKUP_DATA))
+                .thenReturn(mock(Preference.class));
+        when(mScreen.findPreference(PrivacySettings.CONFIGURE_ACCOUNT))
+                .thenReturn(mock(Preference.class));
+        when(mScreen.findPreference(PrivacySettings.DATA_MANAGEMENT))
+                .thenReturn(mock(Preference.class));
+        when(mScreen.findPreference(PrivacySettings.AUTO_RESTORE))
+                .thenReturn(mock(SwitchPreference.class));
+        mSettings = new PrivacySettings();
+    }
+
+    @Test
+    public void testSetPreference_noCrash() {
+        mSettings.setPreferenceReferences(mScreen);
+    }
+
+}
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java
index 3ffd059..e4a988f 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java
@@ -124,7 +124,7 @@
         tile.intent = new Intent();
         tile.intent.setComponent(new ComponentName("pkg", "class"));
 
-        when(mActivity.getApplicationContext().getSystemService(Context.USER_SERVICE))
+        when(mActivity.getSystemService(Context.USER_SERVICE))
                 .thenReturn(mUserManager);
 
         mImpl.bindPreferenceToTile(mActivity, preference, tile, "123", Preference.DEFAULT_ORDER);
diff --git a/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java b/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java
index e3d4c94..a877ed2 100644
--- a/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/SupportItemAdapterTest.java
@@ -18,6 +18,7 @@
 
 import android.accounts.Account;
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
 import android.provider.Settings;
 import android.view.LayoutInflater;
@@ -26,7 +27,9 @@
 import android.widget.SpinnerAdapter;
 import com.android.settings.TestConfig;
 import com.android.settings.core.instrumentation.MetricsFeatureProvider;
+import com.android.settings.dashboard.SupportItemAdapter.EscalationData;
 import com.android.settings.overlay.SupportFeatureProvider;
+import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -38,6 +41,8 @@
 import com.android.settings.R;
 import org.robolectric.shadows.ShadowActivity;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.verify;
 import static org.robolectric.Shadows.shadowOf;
 import static org.mockito.Mockito.when;
@@ -111,6 +116,37 @@
         verify(mSupportFeatureProvider).getSupportEligibleAccounts(mActivity);
     }
 
+    @Test
+    public void testRefreshData_CardUpdatedOnEnteringOrLeavingSupportHours() {
+        // pretend we have support right now
+        when(mSupportFeatureProvider.isSupportTypeEnabled(any(), anyInt()))
+                .thenReturn(true);
+        when(mSupportFeatureProvider.isOperatingNow(anyInt())).thenReturn(true);
+        when(mSupportFeatureProvider.getSupportEligibleAccounts(any())).thenReturn(ONE_ACCOUNT);
+        mSupportItemAdapter = new SupportItemAdapter(mActivity, null, mSupportFeatureProvider,
+                mMetricsFeatureProvider, null);
+
+        // If this doesn't return escalation data something has gone wrong
+        EscalationData data = (EscalationData) mSupportItemAdapter.getSupportData().get(0);
+
+        // precondition, support is enabled
+        assertThat(data.enabled1).isTrue();
+
+        // pretend we support hours are over
+        when(mSupportFeatureProvider.isOperatingNow(anyInt())).thenReturn(false);
+        mSupportItemAdapter.refreshData();
+        data = (EscalationData) mSupportItemAdapter.getSupportData().get(0);
+
+        assertThat(data.enabled1).isFalse();
+
+        // pretend support hours have started again
+        when(mSupportFeatureProvider.isOperatingNow(anyInt())).thenReturn(true);
+        mSupportItemAdapter.refreshData();
+        data = (EscalationData) mSupportItemAdapter.getSupportData().get(0);
+
+        assertThat(data.enabled1).isTrue();
+    }
+
     /**
      * 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/fuelgauge/PowerUsageSummaryTest.java b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java
index ba4a9e3..ff84741 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java
@@ -1,6 +1,7 @@
 package com.android.settings.fuelgauge;
 
 import android.content.Context;
+import android.content.Intent;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
@@ -9,6 +10,7 @@
 import com.android.settings.testutils.FakeFeatureFactory;
 import org.junit.Before;
 import org.junit.Test;
+
 import org.junit.runner.RunWith;
 import org.mockito.Answers;
 import org.mockito.Mock;
@@ -18,6 +20,7 @@
 
 import static com.android.settings.fuelgauge.PowerUsageBase.MENU_STATS_REFRESH;
 import static com.android.settings.fuelgauge.PowerUsageSummary.MENU_ADDITIONAL_BATTERY_INFO;
+import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -25,16 +28,22 @@
 /**
  * Unit tests for {@link PowerUsageSummary}.
  */
+// TODO: Improve this test class so that it starts up the real activity and fragment.
 @RunWith(RobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
 public class PowerUsageSummaryTest {
 
+    private static final Intent ADDITIONAL_BATTERY_INFO_INTENT =
+            new Intent("com.example.app.ADDITIONAL_BATTERY_INFO");
+
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private Context mContext;
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private Menu mMenu;
     @Mock
-    private MenuItem mRefresh;
+    private MenuItem mRefreshMenu;
+    @Mock
+    private MenuItem mAdditionalBatteryInfoMenu;
     @Mock
     private MenuInflater mMenuInflater;
 
@@ -49,15 +58,19 @@
 
         mFragment = new TestFragment(mContext);
 
-        when(mMenu.add(Menu.NONE, PowerUsageBase.MENU_STATS_REFRESH, Menu.NONE,
+        when(mMenu.add(Menu.NONE, MENU_STATS_REFRESH, Menu.NONE,
                 R.string.menu_stats_refresh)
                 .setIcon(com.android.internal.R.drawable.ic_menu_refresh)
                 .setAlphabeticShortcut('r'))
-                .thenReturn(mRefresh);
+                .thenReturn(mRefreshMenu);
+        when(mAdditionalBatteryInfoMenu.getItemId())
+                .thenReturn(MENU_ADDITIONAL_BATTERY_INFO);
+        when(mFeatureFactory.powerUsageFeatureProvider.getAdditionalBatteryInfoIntent())
+                .thenReturn(ADDITIONAL_BATTERY_INFO_INTENT);
     }
 
     @Test
-    public void testOnCreateOptionsMenu_additionalBatteryInfoEnabled() {
+    public void testOptionsMenu_additionalBatteryInfoEnabled() {
         when(mFeatureFactory.powerUsageFeatureProvider.isAdditionalBatteryInfoEnabled())
                 .thenReturn(true);
 
@@ -65,10 +78,15 @@
 
         verify(mMenu).add(Menu.NONE, MENU_ADDITIONAL_BATTERY_INFO,
                 Menu.NONE, R.string.additional_battery_info);
+
+        mFragment.onOptionsItemSelected(mAdditionalBatteryInfoMenu);
+
+        assertThat(mFragment.mStartActivityCalled).isTrue();
+        assertThat(mFragment.mStartActivityIntent).isEqualTo(ADDITIONAL_BATTERY_INFO_INTENT);
     }
 
     @Test
-    public void testOnCreateOptionsMenu_additionalBatteryInfoDisabled() {
+    public void testOptionsMenu_additionalBatteryInfoDisabled() {
         when(mFeatureFactory.powerUsageFeatureProvider.isAdditionalBatteryInfoEnabled())
                 .thenReturn(false);
 
@@ -81,6 +99,8 @@
     public static class TestFragment extends PowerUsageSummary {
 
         private Context mContext;
+        private boolean mStartActivityCalled;
+        private Intent mStartActivityIntent;
 
         public TestFragment(Context context) {
             mContext = context;
@@ -90,5 +110,11 @@
         public Context getContext() {
             return mContext;
         }
+
+        @Override
+        public void startActivity(Intent intent) {
+            mStartActivityCalled = true;
+            mStartActivityIntent = intent;
+        }
     }
 }
diff --git a/tests/robotests/src/com/android/settings/gestures/DoubleTapPowerPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/DoubleTapPowerPreferenceControllerTest.java
index 6a2e4ea..5f7d8b5 100644
--- a/tests/robotests/src/com/android/settings/gestures/DoubleTapPowerPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/gestures/DoubleTapPowerPreferenceControllerTest.java
@@ -23,6 +23,8 @@
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -91,4 +93,23 @@
 
         assertThat(mController.isSwitchPrefEnabled()).isFalse();
     }
+
+    @Test
+    public void testPreferenceController_ProperResultPayloadType() {
+        final Context context = ShadowApplication.getInstance().getApplicationContext();
+        mController = new DoubleTapPowerPreferenceController(context, null);
+        ResultPayload payload = mController.getResultPayload();
+        assertThat(payload).isInstanceOf(InlineSwitchPayload.class);
+    }
+
+    @Test
+    public void testPreferenceController_CorrectPayload() {
+        final Context context = ShadowApplication.getInstance().getApplicationContext();
+        mController = new DoubleTapPowerPreferenceController(context, null);
+        InlineSwitchPayload payload = (InlineSwitchPayload) mController.getResultPayload();
+        assertThat(payload.settingsUri).isEqualTo("camera_double_tap_power_gesture_disabled");
+        assertThat(payload.settingSource).isEqualTo(ResultPayload.SettingsSource.SECURE);
+        assertThat(payload.valueMap.get(0)).isEqualTo(true);
+        assertThat(payload.valueMap.get(1)).isEqualTo(false);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/gestures/DoubleTapScreenPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/DoubleTapScreenPreferenceControllerTest.java
index a25d34b..2f922d5 100644
--- a/tests/robotests/src/com/android/settings/gestures/DoubleTapScreenPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/gestures/DoubleTapScreenPreferenceControllerTest.java
@@ -22,6 +22,8 @@
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -79,4 +81,19 @@
 
         assertThat(mController.isSwitchPrefEnabled()).isFalse();
     }
+
+    @Test
+    public void testPreferenceController_ProperResultPayloadType() {
+        ResultPayload payload = mController.getResultPayload();
+        assertThat(payload).isInstanceOf(InlineSwitchPayload.class);
+    }
+
+    @Test
+    public void testPreferenceController_CorrectPayload() {
+        InlineSwitchPayload payload = (InlineSwitchPayload) mController.getResultPayload();
+        assertThat(payload.settingsUri).isEqualTo("doze_pulse_on_double_tap");
+        assertThat(payload.settingSource).isEqualTo(ResultPayload.SettingsSource.SECURE);
+        assertThat(payload.valueMap.get(1)).isEqualTo(true);
+        assertThat(payload.valueMap.get(0)).isEqualTo(false);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/gestures/DoubleTwistPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/DoubleTwistPreferenceControllerTest.java
index 5b02182..ad682b2 100644
--- a/tests/robotests/src/com/android/settings/gestures/DoubleTwistPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/gestures/DoubleTwistPreferenceControllerTest.java
@@ -24,6 +24,8 @@
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -111,4 +113,19 @@
 
         assertThat(mController.isSwitchPrefEnabled()).isFalse();
     }
+
+    @Test
+    public void testPreferenceController_ProperResultPayloadType() {
+        ResultPayload payload = mController.getResultPayload();
+        assertThat(payload).isInstanceOf(InlineSwitchPayload.class);
+    }
+
+    @Test
+    public void testPreferenceController_CorrectPayload() {
+        InlineSwitchPayload payload = (InlineSwitchPayload) mController.getResultPayload();
+        assertThat(payload.settingsUri).isEqualTo("camera_double_twist_to_flip_enabled");
+        assertThat(payload.settingSource).isEqualTo(ResultPayload.SettingsSource.SECURE);
+        assertThat(payload.valueMap.get(1)).isEqualTo(true);
+        assertThat(payload.valueMap.get(0)).isEqualTo(false);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/gestures/PIckupGesturePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/PIckupGesturePreferenceControllerTest.java
index 66ae679..f112b9e 100644
--- a/tests/robotests/src/com/android/settings/gestures/PIckupGesturePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/gestures/PIckupGesturePreferenceControllerTest.java
@@ -22,6 +22,8 @@
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -82,4 +84,18 @@
         assertThat(mController.isSwitchPrefEnabled()).isFalse();
     }
 
+    @Test
+    public void testPreferenceController_ProperResultPayloadType() {
+        ResultPayload payload = mController.getResultPayload();
+        assertThat(payload).isInstanceOf(InlineSwitchPayload.class);
+    }
+
+    @Test
+    public void testPreferenceController_CorrectPayload() {
+        InlineSwitchPayload payload = (InlineSwitchPayload) mController.getResultPayload();
+        assertThat(payload.settingsUri).isEqualTo("doze_pulse_on_pick_up");
+        assertThat(payload.settingSource).isEqualTo(ResultPayload.SettingsSource.SECURE);
+        assertThat(payload.valueMap.get(1)).isEqualTo(true);
+        assertThat(payload.valueMap.get(0)).isEqualTo(false);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationPreferenceControllerTest.java
index 7b34666..49d73ea 100644
--- a/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationPreferenceControllerTest.java
@@ -22,6 +22,8 @@
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -87,4 +89,19 @@
 
         assertThat(mController.isSwitchPrefEnabled()).isFalse();
     }
+
+    @Test
+    public void testPreferenceController_ProperResultPayloadType() {
+        ResultPayload payload = mController.getResultPayload();
+        assertThat(payload).isInstanceOf(InlineSwitchPayload.class);
+    }
+
+    @Test
+    public void testPreferenceController_CorrectPayload() {
+        InlineSwitchPayload payload = (InlineSwitchPayload) mController.getResultPayload();
+        assertThat(payload.settingsUri).isEqualTo("system_navigation_keys_enabled");
+        assertThat(payload.settingSource).isEqualTo(ResultPayload.SettingsSource.SECURE);
+        assertThat(payload.valueMap.get(1)).isEqualTo(true);
+        assertThat(payload.valueMap.get(0)).isEqualTo(false);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/notification/ZenModeSettingsTest.java b/tests/robotests/src/com/android/settings/notification/ZenModeSettingsTest.java
new file mode 100644
index 0000000..40cfed5
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/notification/ZenModeSettingsTest.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.notification;
+
+import android.content.Context;
+
+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.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class ZenModeSettingsTest {
+
+    private ZenModeSettings mSettings;
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        mContext = RuntimeEnvironment.application.getApplicationContext();
+        mSettings = spy(ZenModeSettings.class);
+        doReturn(mContext).when(mSettings).getContext();
+    }
+
+    @Test
+    public void testAppend_conditionFalse_shouldNotAppend() {
+        String original = "test";
+
+        final String result = mSettings.append(original, false, R.string.zen_mode_alarms);
+
+        assertThat(result).isEqualTo(original);
+    }
+
+    @Test
+    public void testAppend_conditionTrue_shouldAppend() {
+        String original = "test";
+        String alarm = mContext.getString(R.string.zen_mode_alarms);
+
+        final String result = mSettings.append(original, true, R.string.zen_mode_alarms);
+
+        assertThat(result).contains(alarm);
+    }
+
+}
diff --git a/tests/robotests/src/com/android/settings/search/DatabaseIndexingUtilsTest.java b/tests/robotests/src/com/android/settings/search/DatabaseIndexingUtilsTest.java
new file mode 100644
index 0000000..5b6824d
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/search/DatabaseIndexingUtilsTest.java
@@ -0,0 +1,130 @@
+/*
+ * 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.util.ArrayMap;
+import com.android.internal.hardware.AmbientDisplayConfiguration;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.core.PreferenceController;
+import com.android.settings.gestures.DoubleTapPowerPreferenceController;
+import com.android.settings.gestures.DoubleTapScreenPreferenceController;
+import com.android.settings.gestures.DoubleTwistPreferenceController;
+import com.android.settings.gestures.PickupGesturePreferenceController;
+import com.android.settings.gestures.SwipeToNotificationPreferenceController;
+import com.android.settings.search2.DatabaseIndexingUtils;
+
+import com.android.settings.search2.IntentPayload;
+import com.android.settings.search2.ResultPayload;
+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 java.util.Map;
+
+import static com.google.common.truth.Truth.assertThat;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class DatabaseIndexingUtilsTest {
+
+    private Context mContext;
+    @Mock
+    private AmbientDisplayConfiguration mAmbientDisplayConfiguration;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = ShadowApplication.getInstance().getApplicationContext();
+    }
+
+    @Test
+    public void testGetPreferenceControllerUriMap_BadClassName_ReturnsNull() {
+        Map map = DatabaseIndexingUtils.getPreferenceControllerUriMap("dummy", mContext);
+        assertThat(map).isNull();
+    }
+
+    @Test
+    public void testGetPreferenceControllerUriMap_NullContext_ReturnsNull() {
+        Map map = DatabaseIndexingUtils.getPreferenceControllerUriMap("dummy", null);
+        assertThat(map).isNull();
+    }
+
+    @Test
+    public void testGetPreferenceControllerUriMap_CompatibleClass_ReturnsNotNull() {
+        String className = "com.android.settings.gestures.GestureSettings";
+
+        Map map = DatabaseIndexingUtils.getPreferenceControllerUriMap(className, mContext);
+        assertThat(map).isNotNull();
+    }
+
+    @Test
+    public void testGetPreferenceControllerUriMap_CompatibleClass_ReturnsValidMap() {
+        String className = "com.android.settings.gestures.GestureSettings";
+
+        Map map = DatabaseIndexingUtils.getPreferenceControllerUriMap(className, mContext);
+        assertThat(map.get("gesture_double_twist"))
+                .isInstanceOf(DoubleTwistPreferenceController.class);
+        assertThat(map.get("gesture_swipe_down_fingerprint"))
+                .isInstanceOf(SwipeToNotificationPreferenceController.class);
+        assertThat(map.get("gesture_double_tap_screen"))
+                .isInstanceOf(DoubleTapScreenPreferenceController.class);
+        assertThat(map.get("gesture_pick_up"))
+                .isInstanceOf(PickupGesturePreferenceController.class);
+        assertThat(map.get("gesture_double_tap_power"))
+                .isInstanceOf(DoubleTapPowerPreferenceController.class);
+    }
+
+    @Test
+    public void testGetPayloadFromMap_NullMap_ReturnsNull() {
+        ResultPayload payload = DatabaseIndexingUtils.getPayloadFromUriMap(null, "");
+        assertThat(payload).isNull();
+    }
+
+    @Test
+    public void testGetPayloadFromMap_MatchingKey_ReturnsPayloa() {
+        final String key = "key";
+        PreferenceController prefController = new PreferenceController(mContext) {
+            @Override
+            public boolean isAvailable() {
+                return false;
+            }
+
+            @Override
+            public String getPreferenceKey() {
+                return key;
+            }
+
+            @Override
+            public ResultPayload getResultPayload() {
+                return new IntentPayload(null);
+            }
+        };
+        ArrayMap<String,PreferenceController> map = new ArrayMap<>();
+        map.put(key, prefController);
+
+        ResultPayload payload = DatabaseIndexingUtils.getPayloadFromUriMap(map, key);
+        assertThat(payload).isInstanceOf(IntentPayload.class);
+    }
+}
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/search/InlineSliderPayloadTest.java b/tests/robotests/src/com/android/settings/search/InlineSliderPayloadTest.java
deleted file mode 100644
index d52eb94..0000000
--- a/tests/robotests/src/com/android/settings/search/InlineSliderPayloadTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.net.Uri;
-import android.os.Parcel;
-import com.android.settings.SettingsRobolectricTestRunner;
-import com.android.settings.TestConfig;
-import com.android.settings.search2.InlineSliderPayload;
-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 InlineSliderPayloadTest {
-    private InlineSliderPayload mPayload;
-
-    @Test
-    public void testParcelOrdering_StaysValid() {
-        Uri uri = Uri.parse("http://www.TESTURI.com");
-        Parcel parcel = Parcel.obtain();
-
-        mPayload = new InlineSliderPayload(uri);
-        mPayload.writeToParcel(parcel, 0);
-        // Reset parcel for reading
-        parcel.setDataPosition(0);
-        InlineSliderPayload newPayload = InlineSliderPayload.CREATOR.createFromParcel(parcel);
-
-        String originalUri = mPayload.uri.toString();
-        String copiedUri = newPayload.uri.toString();
-        assertThat(originalUri).isEqualTo(copiedUri);
-    }
-}
diff --git a/tests/robotests/src/com/android/settings/search/InlineSwitchPayloadTest.java b/tests/robotests/src/com/android/settings/search/InlineSwitchPayloadTest.java
new file mode 100644
index 0000000..701679c
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/search/InlineSwitchPayloadTest.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.search;
+
+import android.os.Parcel;
+import android.util.ArrayMap;
+import android.content.Context;
+
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.ResultPayload;
+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;
+import static org.junit.Assert.fail;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class InlineSwitchPayloadTest {
+
+    @Test
+    public void testGetSwitch_EmptyMap_ExceptionThrown() {
+        final String uri = "test.com";
+        final int source = ResultPayload.SettingsSource.SECURE;
+
+        final Context context = ShadowApplication.getInstance().getApplicationContext();
+        InlineSwitchPayload payload = new InlineSwitchPayload(uri, source, null);
+        try {
+            payload.getSwitchValue(context);
+            fail("Should have thrown exception for null map");
+        } catch (IllegalStateException e) {
+            assertThat(e).isNotNull();
+        }
+    }
+
+    @Test
+    public void testGetSwitch_BadMap_ExceptionThrown() {
+        final String uri = "test.com";
+        final int source = ResultPayload.SettingsSource.SECURE;
+        final ArrayMap<Integer, Boolean> map = new ArrayMap<>();
+
+        final Context context = ShadowApplication.getInstance().getApplicationContext();
+        InlineSwitchPayload payload = new InlineSwitchPayload(uri, source, map);
+        try {
+            payload.getSwitchValue(context);
+            fail("Should have thrown exception for bad map");
+        } catch (IllegalStateException e) {
+            assertThat(e).isNotNull();
+        }
+    }
+
+    @Test
+    public void testConstructor_DataRetained() {
+        final String uri = "test.com";
+        final int type = ResultPayload.PayloadType.INLINE_SWITCH;
+        final int source = ResultPayload.SettingsSource.SECURE;
+        final ArrayMap<Integer, Boolean> map = new ArrayMap<>();
+        map.put(1, true);
+        map.put(0, false);
+
+        InlineSwitchPayload payload = new InlineSwitchPayload(uri, source, map);
+        assertThat(payload.settingsUri).isEqualTo(uri);
+        assertThat(payload.inlineType).isEqualTo(type);
+        assertThat(payload.settingSource).isEqualTo(source);
+        assertThat(payload.valueMap.get(1)).isTrue();
+        assertThat(payload.valueMap.get(0)).isFalse();
+    }
+
+    @Test
+    public void testParcelConstructor_DataRetained() {
+        String uri = "test.com";
+        int type = ResultPayload.PayloadType.INLINE_SWITCH;
+        int source = ResultPayload.SettingsSource.SECURE;
+        final ArrayMap<Integer, Boolean> map = new ArrayMap<>();
+        map.put(1, true);
+        map.put(0, false);
+
+        Parcel parcel = Parcel.obtain();
+        parcel.writeString(uri);
+        parcel.writeInt(type);
+        parcel.writeInt(source);
+        parcel.writeMap(map);
+        parcel.setDataPosition(0);
+
+        InlineSwitchPayload payload = InlineSwitchPayload.CREATOR.createFromParcel(parcel);
+        assertThat(payload.settingsUri).isEqualTo(uri);
+        assertThat(payload.inlineType).isEqualTo(type);
+        assertThat(payload.settingSource).isEqualTo(source);
+        assertThat(payload.valueMap.get(1)).isTrue();
+        assertThat(payload.valueMap.get(0)).isFalse();
+    }
+
+
+}
diff --git a/tests/robotests/src/com/android/settings/search/InlineSwitchViewHolderTest.java b/tests/robotests/src/com/android/settings/search/InlineSwitchViewHolderTest.java
new file mode 100644
index 0000000..efbad2f
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/search/InlineSwitchViewHolderTest.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.search;
+
+import android.app.Fragment;
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.view.LayoutInflater;
+import android.view.View;
+
+import com.android.settings.R;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.search2.InlineSwitchPayload;
+import com.android.settings.search2.InlineSwitchViewHolder;
+import com.android.settings.search2.IntentPayload;
+import com.android.settings.search2.SearchResult;
+
+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 java.util.ArrayList;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class InlineSwitchViewHolderTest {
+
+    private static final String TITLE = "title";
+    private static final String SUMMARY = "summary";
+
+    @Mock
+    private Fragment mFragment;
+
+    @Mock
+    private InlineSwitchPayload mPayload;
+    private InlineSwitchViewHolder mHolder;
+    private Drawable mIcon;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        final Context context = ShadowApplication.getInstance().getApplicationContext();
+        View view = LayoutInflater.from(context).inflate(R.layout.search_inline_switch_item, null);
+        mHolder = new InlineSwitchViewHolder(view, context);
+
+        mIcon = context.getDrawable(R.drawable.ic_search_history);
+    }
+
+    @Test
+    public void testConstructor_MembersNotNull() {
+        assertThat(mHolder.titleView).isNotNull();
+        assertThat(mHolder.summaryView).isNotNull();
+        assertThat(mHolder.iconView).isNotNull();
+        assertThat(mHolder.switchView).isNotNull();
+    }
+
+    @Test
+    public void testBindViewElements_AllUpdated() {
+        when(mPayload.getSwitchValue(any(Context.class))).thenReturn(true);
+        SearchResult result = getSearchResult();
+        mHolder.onBind(mFragment, result);
+        mHolder.switchView.setChecked(true);
+
+        assertThat(mHolder.titleView.getText()).isEqualTo(TITLE);
+        assertThat(mHolder.summaryView.getText()).isEqualTo(SUMMARY);
+        assertThat(mHolder.iconView.getDrawable()).isEqualTo(mIcon);
+        assertThat(mHolder.switchView.isChecked()).isTrue();
+    }
+
+    private SearchResult getSearchResult() {
+        SearchResult.Builder builder = new SearchResult.Builder();
+        builder.addTitle(TITLE)
+                .addSummary(SUMMARY)
+                .addRank(1)
+                .addPayload(new InlineSwitchPayload("", 0, null))
+                .addBreadcrumbs(new ArrayList<String>())
+                .addIcon(mIcon)
+                .addPayload(mPayload);
+
+        return builder.build();
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/search/IntentSearchViewHolderTest.java b/tests/robotests/src/com/android/settings/search/IntentSearchViewHolderTest.java
index 805c7cb..ed503d8 100644
--- a/tests/robotests/src/com/android/settings/search/IntentSearchViewHolderTest.java
+++ b/tests/robotests/src/com/android/settings/search/IntentSearchViewHolderTest.java
@@ -93,7 +93,7 @@
                 .addSummary(SUMMARY)
                 .addRank(1)
                 .addPayload(new IntentPayload(null))
-                .addBreadcrumbs(new ArrayList<>())
+                .addBreadcrumbs(new ArrayList<String>())
                 .addIcon(mIcon);
 
         return builder.build();
diff --git a/tests/robotests/src/com/android/settings/search/SearchAdapterTest.java b/tests/robotests/src/com/android/settings/search/SearchAdapterTest.java
index 0756d3f..3627898 100644
--- a/tests/robotests/src/com/android/settings/search/SearchAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/search/SearchAdapterTest.java
@@ -21,17 +21,22 @@
 import android.content.Context;
 import android.graphics.drawable.Drawable;
 
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
 import com.android.settings.R;
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 import com.android.settings.search2.DatabaseResultLoader;
+import com.android.settings.search2.InlineSwitchViewHolder;
 import com.android.settings.search2.IntentPayload;
+import com.android.settings.search2.IntentSearchViewHolder;
 import com.android.settings.search2.ResultPayload;
 import com.android.settings.search2.SearchFragment;
 import com.android.settings.search2.SearchResult;
 import com.android.settings.search2.SearchResult.Builder;
 import com.android.settings.search2.SearchResultsAdapter;
 
+import com.android.settings.search2.SearchViewHolder;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -39,6 +44,8 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.Robolectric;
 import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+import org.robolectric.shadows.ShadowViewGroup;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -63,6 +70,47 @@
         mLoaderClassName = DatabaseResultLoader.class.getName();
     }
 
+    @Test
+    public void testNoResultsAdded_EmptyListReturned() {
+        List<SearchResult> updatedResults = mAdapter.getSearchResults();
+        assertThat(updatedResults).isEmpty();
+    }
+
+    @Test
+    public void testSingleSourceMerge_ExactCopyReturned() {
+        ArrayList<SearchResult> intentResults = getIntentSampleResults();
+        mAdapter.mergeResults(intentResults, mLoaderClassName);
+
+        List<SearchResult> updatedResults = mAdapter.getSearchResults();
+        assertThat(updatedResults).containsAllIn(intentResults);
+    }
+
+    @Test
+    public void testDuplicateSourceMerge_ExactCopyReturned() {
+        ArrayList<SearchResult> intentResults = getIntentSampleResults();
+        mAdapter.mergeResults(intentResults, mLoaderClassName);
+        mAdapter.mergeResults(intentResults, mLoaderClassName);
+
+        List<SearchResult> updatedResults = mAdapter.getSearchResults();
+        assertThat(updatedResults).containsAllIn(intentResults);
+    }
+
+    @Test
+    public void testCreatViewHolder_ReturnsIntentResult() {
+        ViewGroup group = new FrameLayout(mContext);
+        SearchViewHolder view = mAdapter.onCreateViewHolder(group,
+                ResultPayload.PayloadType.INTENT);
+        assertThat(view).isInstanceOf(IntentSearchViewHolder.class);
+    }
+
+    @Test
+    public void testCreatViewHolder_ReturnsInlineSwitchResult() {
+        ViewGroup group = new FrameLayout(mContext);
+        SearchViewHolder view = mAdapter.onCreateViewHolder(group,
+                ResultPayload.PayloadType.INLINE_SWITCH);
+        assertThat(view).isInstanceOf(InlineSwitchViewHolder.class);
+    }
+
     private ArrayList<SearchResult> getIntentSampleResults() {
         ArrayList<SearchResult> sampleResults = new ArrayList<>();
         ArrayList<String> breadcrumbs = new ArrayList<>();
@@ -84,31 +132,4 @@
         sampleResults.add(builder.build());
         return sampleResults;
     }
-
-
-    @Test
-    public void testNoResultsAdded_EmptyListReturned() {
-        List<SearchResult> updatedResults = mAdapter.getSearchResults();
-        assertThat(updatedResults).isEmpty();
-    }
-
-
-    @Test
-    public void testSingleSourceMerge_ExactCopyReturned() {
-        ArrayList<SearchResult> intentResults = getIntentSampleResults();
-        mAdapter.mergeResults(intentResults, mLoaderClassName);
-
-        List<SearchResult> updatedResults = mAdapter.getSearchResults();
-        assertThat(updatedResults).containsAllIn(intentResults);
-    }
-
-    @Test
-    public void testDuplicateSourceMerge_ExactCopyReturned() {
-        ArrayList<SearchResult> intentResults = getIntentSampleResults();
-        mAdapter.mergeResults(intentResults, mLoaderClassName);
-        mAdapter.mergeResults(intentResults, mLoaderClassName);
-
-        List<SearchResult> updatedResults = mAdapter.getSearchResults();
-        assertThat(updatedResults).containsAllIn(intentResults);
-    }
 }
\ 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 d9e2dd6..c0b1b3d 100644
--- a/tests/robotests/src/com/android/settings/search/SearchFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/search/SearchFeatureProviderImplTest.java
@@ -61,7 +61,7 @@
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mActivity = Robolectric.buildActivity(Activity.class).create().visible().get();
-        mProvider = new SearchFeatureProviderImpl(mActivity);
+        mProvider = new SearchFeatureProviderImpl();
     }
 
     @Test
@@ -78,8 +78,8 @@
 
     @Test
     public void testUpdateIndexNewSearch_UsesDatabaseIndexingManager() {
-        mProvider = spy(new SearchFeatureProviderImpl(mActivity));
-        when(mProvider.isEnabled()).thenReturn(true);
+        mProvider = spy(new SearchFeatureProviderImpl());
+        when(mProvider.isEnabled(mActivity)).thenReturn(true);
 
         mProvider.updateIndex(mActivity);
         verify(mProvider).getIndexingManager(any(Context.class));
@@ -87,8 +87,8 @@
 
     @Test
     public void testUpdateIndexNewSearch_UsesIndex() {
-        mProvider = spy(new SearchFeatureProviderImpl(mActivity));
-        when(mProvider.isEnabled()).thenReturn(false);
+        mProvider = spy(new SearchFeatureProviderImpl());
+        when(mProvider.isEnabled(mActivity)).thenReturn(false);
 
         mProvider.updateIndex(mActivity);
         verify(mProvider, never()).getIndexingManager(any(Context.class));
diff --git a/tests/robotests/src/com/android/settings/search/DatabaseResultLoaderTest.java b/tests/robotests/src/com/android/settings/search2/CursorToSearchResultConverterTest.java
similarity index 66%
rename from tests/robotests/src/com/android/settings/search/DatabaseResultLoaderTest.java
rename to tests/robotests/src/com/android/settings/search2/CursorToSearchResultConverterTest.java
index 1df7b1f..98b250d 100644
--- a/tests/robotests/src/com/android/settings/search/DatabaseResultLoaderTest.java
+++ b/tests/robotests/src/com/android/settings/search2/CursorToSearchResultConverterTest.java
@@ -15,7 +15,7 @@
  *
  */
 
-package com.android.settings.search;
+package com.android.settings.search2;
 
 import android.app.Activity;
 import android.content.Context;
@@ -23,16 +23,13 @@
 import android.database.MatrixCursor;
 import android.graphics.drawable.Drawable;
 
+import android.util.ArrayMap;
 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 org.junit.Before;
 import org.junit.Test;
@@ -47,12 +44,14 @@
 
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
-public class DatabaseResultLoaderTest {
-    private DatabaseResultLoader mLoader;
+public class CursorToSearchResultConverterTest {
+
+    private CursorToSearchResultConverter mConverter;
 
     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"};
+            "intent action", "target package", "target class", "enabled", "key",
+            "payload_type", "payload"};
 
     private static final String[] TITLES = new String[]{"title1", "title2", "title3"};
     private static final String SUMMARY = "SUMMARY";
@@ -66,24 +65,24 @@
     public void setUp() {
         Context context = Robolectric.buildActivity(Activity.class).get();
         mDrawable = context.getDrawable(mIcon);
-        mLoader = new DatabaseResultLoader(context, "");
+        mConverter = new CursorToSearchResultConverter(context);
     }
 
     @Test
     public void testParseNullResults_ReturnsNull() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(null);
+        List<SearchResult> results = mConverter.convertCursor(null);
         assertThat(results).isNull();
     }
 
     @Test
     public void testParseCursor_NotNull() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
+        List<SearchResult> results = mConverter.convertCursor(getDummyCursor());
         assertThat(results).isNotNull();
     }
 
     @Test
     public void testParseCursor_MatchesRank() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
+        List<SearchResult> results = mConverter.convertCursor(getDummyCursor());
         for (int i = 0; i < EXAMPLES; i++) {
             assertThat(results.get(i).rank).isEqualTo(i);
         }
@@ -91,7 +90,7 @@
 
     @Test
     public void testParseCursor_MatchesTitle() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
+        List<SearchResult> results = mConverter.convertCursor(getDummyCursor());
         for (int i = 0; i < EXAMPLES; i++) {
             assertThat(results.get(i).title).isEqualTo(TITLES[i]);
         }
@@ -99,7 +98,7 @@
 
     @Test
     public void testParseCursor_MatchesSummary() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
+        List<SearchResult> results = mConverter.convertCursor(getDummyCursor());
         for (int i = 0; i < EXAMPLES; i++) {
             assertThat(results.get(i).summary).isEqualTo(SUMMARY);
         }
@@ -107,7 +106,7 @@
 
     @Test
     public void testParseCursor_MatchesIcon() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
+        List<SearchResult> results = mConverter.convertCursor(getDummyCursor());
         for (int i = 0; i < EXAMPLES; i++) {
             Drawable resultDrawable = results.get(i).icon;
             assertThat(resultDrawable.toString()).isEqualTo(mDrawable.toString());
@@ -116,7 +115,7 @@
 
     @Test
     public void testParseCursor_NoIcon() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(
+        List<SearchResult> results = mConverter.convertCursor(
                 getDummyCursor(false /* hasIcon */));
         for (int i = 0; i < EXAMPLES; i++) {
             Drawable resultDrawable = results.get(i).icon;
@@ -126,7 +125,7 @@
 
     @Test
     public void testParseCursor_MatchesPayloadType() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
+        List<SearchResult> results = mConverter.convertCursor(getDummyCursor());
         ResultPayload payload;
         for (int i = 0; i < EXAMPLES; i++) {
             payload = results.get(i).payload;
@@ -153,9 +152,10 @@
                 BLANK,   // target class
                 BLANK,   // enabled
                 BLANK,   // key
-                BLANK    // user id
+                0,       // Payload Type
+                null     // Payload
         });
-        List<SearchResult> results = mLoader.parseCursorForSearch(cursor);
+        List<SearchResult> results = mConverter.convertCursor(cursor);
         IntentPayload payload = (IntentPayload) results.get(0).payload;
         Intent intent = payload.intent;
         assertThat(intent.getComponent().getClassName()).isEqualTo(SubSettings.class.getName());
@@ -163,7 +163,7 @@
 
     @Test
     public void testParseCursor_MatchesIntentPayload() {
-        List<SearchResult> results = mLoader.parseCursorForSearch(getDummyCursor());
+        List<SearchResult> results = mConverter.convertCursor(getDummyCursor());
         IntentPayload payload;
         for (int i = 0; i < EXAMPLES; i++) {
             payload = (IntentPayload) results.get(i).payload;
@@ -172,6 +172,46 @@
         }
     }
 
+    @Test
+    public void testParseCursor_MatchesInlineSwitchPayload() {
+        MatrixCursor cursor = new MatrixCursor(COLUMNS);
+        final String BLANK = "";
+        final String uri = "test.com";
+        final int type = ResultPayload.PayloadType.INLINE_SWITCH;
+        final int source = ResultPayload.SettingsSource.SECURE;
+        final ArrayMap<Integer, Boolean> map = new ArrayMap<>();
+        map.put(1, true);
+        map.put(0, false);
+        final InlineSwitchPayload payload = new InlineSwitchPayload(uri, source, map);
+
+        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
+                type,    // Payload Type
+                ResultPayloadUtils.marshall(payload) // Payload
+        });
+        List<SearchResult> results = mConverter.convertCursor(cursor);
+        InlineSwitchPayload newPayload = (InlineSwitchPayload) results.get(0).payload;
+
+        assertThat(newPayload.settingsUri).isEqualTo(uri);
+        assertThat(newPayload.inlineType).isEqualTo(type);
+        assertThat(newPayload.settingSource).isEqualTo(source);
+        assertThat(newPayload.valueMap.get(1)).isTrue();
+        assertThat(newPayload.valueMap.get(0)).isFalse();
+    }
+
     private MatrixCursor getDummyCursor() {
         return getDummyCursor(true /* hasIcon */);
     }
@@ -196,7 +236,10 @@
             item.add(BLANK); // target class
             item.add(BLANK); // enabled
             item.add(BLANK); // key
-            item.add(BLANK); // user id
+                             // Note there is no user id. This is omitted because it is not being
+                             // queried. Should the queries change, so should this method.
+            item.add(Integer.toString(0));     // Payload Type
+            item.add(null); // Payload
 
             cursor.addRow(item);
         }
diff --git a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
index a9c1764..1625f35 100644
--- a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
+++ b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
@@ -116,7 +116,7 @@
     }
 
     @Override
-    public SearchFeatureProvider getSearchFeatureProvider(Context context) {
+    public SearchFeatureProvider getSearchFeatureProvider() {
         return searchFeatureProvider;
     }
 
