Merge "Default payment settings to disabled" into nyc-dev am: 6b421dd
am: c6d5902

* commit 'c6d59023709b7e86db3b07b5e8b99c34b25f3c29':
  Default payment settings to disabled

Change-Id: I075e3be940e4cfec1582c1d4a928a269327f2431
diff --git a/Android.mk b/Android.mk
index 61734fb..537004e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,6 +1,16 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
+LOCAL_SRC_FILES := \
+        $(call all-logtags-files-under, src)
+
+LOCAL_MODULE := settings-logtags
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+# Build the Settings APK
+include $(CLEAR_VARS)
+
 LOCAL_JAVA_LIBRARIES := bouncycastle core-oj telephony-common ims-common
 LOCAL_STATIC_JAVA_LIBRARIES := \
     android-support-v4 \
@@ -9,13 +19,13 @@
     android-support-v7-preference \
     android-support-v7-appcompat \
     android-support-v14-preference \
-    jsr305
+    jsr305 \
+    settings-logtags
 
 LOCAL_MODULE_TAGS := optional
 
 LOCAL_SRC_FILES := \
-        $(call all-java-files-under, src) \
-        src/com/android/settings/EventLogTags.logtags
+        $(call all-java-files-under, src)
 
 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \
     frameworks/support/v7/preference/res \
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4f52512..84c0f72 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -81,6 +81,7 @@
     <uses-permission android:name="android.permission.CHANGE_APP_IDLE_STATE" />
     <uses-permission android:name="android.permission.PEERS_MAC_ADDRESS"/>
     <uses-permission android:name="android.permission.MANAGE_NOTIFICATIONS"/>
+    <uses-permission android:name="android.permission.DELETE_PACKAGES"/>
 
     <application android:label="@string/settings_label"
             android:icon="@mipmap/ic_launcher_settings"
@@ -1579,7 +1580,7 @@
             android:enabled="false"
             android:exported="true"
             android:taskAffinity="com.android.wizard"
-            android:theme="@style/SetupWizardDisableAppStartingTheme"
+            android:theme="@style/SuwThemeGlif.Light"
             android:icon="@drawable/ic_suggested_notifications">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
diff --git a/proguard.flags b/proguard.flags
index 3c3300e..f3c218a 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -17,6 +17,7 @@
 -keep class com.android.settings.users.*
 -keep class com.android.settings.nfc.*
 -keep class com.android.settings.notification.*
+-keep class com.android.settings.overlay.FeatureFactoryImpl
 -keep class com.android.settings.accessibility.*FragmentForSetupWizard
 -keep class com.android.settings.display.*FragmentForSetupWizard
 
diff --git a/res/drawable/ic_call_24dp.xml b/res/drawable/ic_call_24dp.xml
new file mode 100644
index 0000000..950547a
--- /dev/null
+++ b/res/drawable/ic_call_24dp.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27
+         0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55
+          -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1
+          0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z"/>
+</vector>
\ No newline at end of file
diff --git a/res/drawable/ic_chat_24dp.xml b/res/drawable/ic_chat_24dp.xml
new file mode 100644
index 0000000..2df12b3
--- /dev/null
+++ b/res/drawable/ic_chat_24dp.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M20,2H4c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2V4c0,-1.1
+         -0.9,-2 -2,-2zM6,9h12v2H6V9zm8,5H6v-2h8v2zm4,-6H6V6h12v2z"/>
+</vector>
\ No newline at end of file
diff --git a/res/drawable/ic_feedback_24dp.xml b/res/drawable/ic_feedback_24dp.xml
new file mode 100644
index 0000000..f616f95
--- /dev/null
+++ b/res/drawable/ic_feedback_24dp.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52
+        22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8
+        -8,8zm3.5,-9c0.83,0 1.5,-0.67 1.5,-1.5S16.33,8 15.5,8 14,8.67 14,9.5s0.67,1.5
+        1.5,1.5zm-7,0c0.83,0 1.5,-0.67 1.5,-1.5S9.33,8 8.5,8 7,8.67 7,9.5 7.67,11
+        8.5,11zm3.5,6.5c2.33,0 4.31,-1.46 5.11,-3.5H6.89c0.8,2.04 2.78,3.5 5.11,3.5z"/>
+</vector>
\ No newline at end of file
diff --git a/res/drawable/ic_fingerprint_header.xml b/res/drawable/ic_fingerprint_header.xml
new file mode 100644
index 0000000..e7ac81a
--- /dev/null
+++ b/res/drawable/ic_fingerprint_header.xml
@@ -0,0 +1,38 @@
+<!--
+    Copyright (C) 2016 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:tint="?android:attr/colorPrimary"
+    android:viewportHeight="32.0"
+    android:viewportWidth="32.0">
+    <path
+        android:fillColor="#ffffff"
+        android:pathData="M23.7,5.9c-0.1,0.0 -0.2,0.0 -0.3,-0.1C21.0,4.5 18.6,3.9 16.0,3.9c-2.5,0.0 -4.6,0.6 -6.9,1.9C8.8,6.0 8.3,5.9 8.1,5.5C7.9,5.2 8.0,4.7 8.4,4.5c2.5,-1.4 4.9,-2.1 7.7,-2.1c2.8,0.0 5.4,0.7 8.0,2.1c0.4,0.2 0.5,0.6 0.3,1.0C24.2,5.7 24.0,5.9 23.7,5.9z" />
+    <path
+        android:fillColor="#ffffff"
+        android:pathData="M5.3,13.2c-0.1,0.0 -0.3,0.0 -0.4,-0.1c-0.3,-0.2 -0.4,-0.7 -0.2,-1.0c1.3,-1.9 2.9,-3.4 4.9,-4.5c4.1,-2.2 9.3,-2.2 13.4,0.0c1.9,1.1 3.6,2.5 4.9,4.4c0.2,0.3 0.1,0.8 -0.2,1.0c-0.3,0.2 -0.8,0.1 -1.0,-0.2c-1.2,-1.7 -2.6,-3.0 -4.3,-4.0c-3.7,-2.0 -8.3,-2.0 -12.0,0.0c-1.7,0.9 -3.2,2.3 -4.3,4.0C5.7,13.1 5.5,13.2 5.3,13.2z" />
+    <path
+        android:fillColor="#ffffff"
+        android:pathData="M13.3,29.6c-0.2,0.0 -0.4,-0.1 -0.5,-0.2c-1.1,-1.2 -1.7,-2.0 -2.6,-3.6c-0.9,-1.7 -1.4,-3.7 -1.4,-5.9c0.0,-4.1 3.3,-7.4 7.4,-7.4c4.1,0.0 7.4,3.3 7.4,7.4c0.0,0.4 -0.3,0.7 -0.7,0.7s-0.7,-0.3 -0.7,-0.7c0.0,-3.3 -2.7,-5.9 -5.9,-5.9c-3.3,0.0 -5.9,2.7 -5.9,5.9c0.0,2.0 0.4,3.8 1.2,5.2c0.8,1.6 1.4,2.2 2.4,3.3c0.3,0.3 0.3,0.8 0.0,1.0C13.7,29.5 13.5,29.6 13.3,29.6z" />
+    <path
+        android:fillColor="#ffffff"
+        android:pathData="M22.6,27.1c-1.6,0.0 -2.9,-0.4 -4.1,-1.2c-1.9,-1.4 -3.1,-3.6 -3.1,-6.0c0.0,-0.4 0.3,-0.7 0.7,-0.7s0.7,0.3 0.7,0.7c0.0,1.9 0.9,3.7 2.5,4.8c0.9,0.6 1.9,1.0 3.2,1.0c0.3,0.0 0.8,0.0 1.3,-0.1c0.4,-0.1 0.8,0.2 0.8,0.6c0.1,0.4 -0.2,0.8 -0.6,0.8C23.4,27.1 22.8,27.1 22.6,27.1z" />
+    <path
+        android:fillColor="#ffffff"
+        android:pathData="M20.0,29.9c-0.1,0.0 -0.1,0.0 -0.2,0.0c-2.1,-0.6 -3.4,-1.4 -4.8,-2.9c-1.8,-1.9 -2.8,-4.4 -2.8,-7.1c0.0,-2.2 1.8,-4.1 4.1,-4.1c2.2,0.0 4.1,1.8 4.1,4.1c0.0,1.4 1.2,2.6 2.6,2.6c1.4,0.0 2.6,-1.2 2.6,-2.6c0.0,-5.1 -4.2,-9.3 -9.3,-9.3c-3.6,0.0 -6.9,2.1 -8.4,5.4C7.3,17.1 7.0,18.4 7.0,19.8c0.0,1.1 0.1,2.7 0.9,4.9c0.1,0.4 -0.1,0.8 -0.4,0.9c-0.4,0.1 -0.8,-0.1 -0.9,-0.4c-0.6,-1.8 -0.9,-3.6 -0.9,-5.4c0.0,-1.6 0.3,-3.1 0.9,-4.4c1.7,-3.8 5.6,-6.3 9.8,-6.3c5.9,0.0 10.7,4.8 10.7,10.7c0.0,2.2 -1.8,4.1 -4.1,4.1s-4.0,-1.8 -4.0,-4.1c0.0,-1.4 -1.2,-2.6 -2.6,-2.6c-1.4,0.0 -2.6,1.2 -2.6,2.6c0.0,2.3 0.9,4.5 2.4,6.1c1.2,1.3 2.4,2.0 4.2,2.5c0.4,0.1 0.6,0.5 0.5,0.9C20.6,29.7 20.3,29.9 20.0,29.9z" />
+</vector>
diff --git a/res/drawable/ic_forum_24dp.xml b/res/drawable/ic_forum_24dp.xml
new file mode 100644
index 0000000..34c0869
--- /dev/null
+++ b/res/drawable/ic_forum_24dp.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M21,6h-2v9H6v2c0,0.55 0.45,1 1,1h11l4,4V7c0,-0.55 -0.45,-1
+         -1,-1zm-4,6V3c0,-0.55 -0.45,-1 -1,-1H3c-0.55,0 -1,0.45 -1,1v14l4,-4h10c0.55,0
+         1,-0.45 1,-1z"/>
+</vector>
\ No newline at end of file
diff --git a/res/drawable/ic_help_24dp.xml b/res/drawable/ic_help_24dp.xml
new file mode 100644
index 0000000..5fd1e79
--- /dev/null
+++ b/res/drawable/ic_help_24dp.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48
+        10,-10S17.52,2 12,2zm1,17h-2v-2h2v2zm2.07,-7.75l-0.9,0.92C13.45,12.9 13,13.5
+        13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41
+        0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2H8c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88
+        -0.36,1.68 -0.93,2.25z"/>
+</vector>
\ No newline at end of file
diff --git a/res/drawable/ic_lock.xml b/res/drawable/ic_lock.xml
new file mode 100644
index 0000000..975cbf5
--- /dev/null
+++ b/res/drawable/ic_lock.xml
@@ -0,0 +1,24 @@
+<!--
+    Copyright (C) 2016 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0">
+    <path
+        android:fillColor="?android:attr/colorPrimary"
+        android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z" />
+</vector>
diff --git a/res/drawable/ic_mail_24dp.xml b/res/drawable/ic_mail_24dp.xml
new file mode 100644
index 0000000..46f4584
--- /dev/null
+++ b/res/drawable/ic_mail_24dp.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M20,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9
+        2,-2V6c0,-1.1 -0.9,-2 -2,-2zm0,4l-8,5 -8,-5V6l8,5 8,-5v2z"/>
+</vector>
\ No newline at end of file
diff --git a/res/layout-land/fingerprint_enroll_enrolling.xml b/res/layout-land/fingerprint_enroll_enrolling.xml
index c72c029..2223cf8 100644
--- a/res/layout-land/fingerprint_enroll_enrolling.xml
+++ b/res/layout-land/fingerprint_enroll_enrolling.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
@@ -79,4 +79,4 @@
 
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout-land/fingerprint_enroll_find_sensor.xml b/res/layout-land/fingerprint_enroll_find_sensor.xml
index 81d1dac..60d93a6 100644
--- a/res/layout-land/fingerprint_enroll_find_sensor.xml
+++ b/res/layout-land/fingerprint_enroll_find_sensor.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
@@ -70,4 +70,4 @@
 
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout-land/fingerprint_enroll_finish.xml b/res/layout-land/fingerprint_enroll_finish.xml
index e051f15..1f6252d 100644
--- a/res/layout-land/fingerprint_enroll_finish.xml
+++ b/res/layout-land/fingerprint_enroll_finish.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
@@ -100,4 +100,4 @@
 
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout-land/setup_choose_lock_pattern.xml b/res/layout-land/setup_choose_lock_pattern.xml
index 6ee8e81..86f1841 100644
--- a/res/layout-land/setup_choose_lock_pattern.xml
+++ b/res/layout-land/setup_choose_lock_pattern.xml
@@ -15,15 +15,13 @@
     limitations under the License.
 -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    settings:suwBackgroundTile="@drawable/setup_illustration_tile"
-    settings:suwHeaderText="@string/wifi_setup_wizard_title"
-    settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
-    settings:suwIllustrationImage="@drawable/setup_illustration_lock_screen">
+    android:icon="@drawable/ic_lock"
+    settings:suwHeaderText="@string/lock_settings_picker_title">
 
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
         android:id="@+id/topLayout"
@@ -49,40 +47,30 @@
                 android:gravity="start|bottom"
                 android:textSize="18sp" />
 
-            <Button android:id="@+id/retryButton"
-                style="@android:style/Widget.Material.Button.Borderless.Colored"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="start"
-                android:layout_marginStart="-12dp"
-                android:minWidth="0dp"
-                android:text="@string/lockpattern_retry_button_text" />
-
             <!-- footer can show a message, or confirm / restart buttons -->
             <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_height="0dip"
-                android:layout_weight="1.0"
-                android:visibility="gone">
+                android:layout_weight="1.0">
 
                 <!-- confirm / restart buttons -->
                 <LinearLayout android:id="@+id/buttonContainer"
-                    style="@style/SecurityPreferenceButtonContainer"
                     android:layout_centerHorizontal="true"
                     android:layout_alignParentBottom="true"
+                    android:gravity="end"
                     android:orientation="horizontal">
 
                     <!-- left / top button: skip, or re-try -->
                     <Button android:id="@+id/footerLeftButton"
-                        style="@style/SecurityPreferenceButton"
-                        android:layout_width="match_parent"
+                        style="@style/SetupWizardButton.Negative"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:text="@string/lockpattern_restart_button_text" />
 
                     <!-- right / bottom button: confirm or ok -->
                     <Button android:id="@+id/footerRightButton"
-                        style="@style/SecurityPreferenceButton"
-                        android:layout_width="match_parent"
+                        style="@style/SetupWizardButton.Positive"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:text="@string/lockpattern_confirm_button_text" />
 
@@ -110,4 +98,4 @@
 
     </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout-land/setup_fingerprint_enroll_find_sensor.xml b/res/layout-land/setup_fingerprint_enroll_find_sensor.xml
index 3873e00..bb2c02d 100644
--- a/res/layout-land/setup_fingerprint_enroll_find_sensor.xml
+++ b/res/layout-land/setup_fingerprint_enroll_find_sensor.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/setup_wizard_layout"
         android:layout_width="match_parent"
@@ -70,4 +70,4 @@
 
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/app_item.xml b/res/layout/app_item.xml
index ea0008e..15a9014 100644
--- a/res/layout/app_item.xml
+++ b/res/layout/app_item.xml
@@ -60,6 +60,14 @@
         android:textColor="?android:attr/textColorSecondary"
         android:duplicateParentState="true" />
 
+    <Switch
+            android:id="@android:id/switch_widget"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:background="@null"
+            android:visibility="gone"/>
+
     <FrameLayout
         android:id="@android:id/widget_frame"
         android:layout_width="wrap_content"
diff --git a/res/layout/dashboard_container.xml b/res/layout/dashboard_container.xml
new file mode 100644
index 0000000..4cab75c
--- /dev/null
+++ b/res/layout/dashboard_container.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<android.support.v4.view.ViewPager
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/pager"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
diff --git a/res/layout/dashboard_container_header.xml b/res/layout/dashboard_container_header.xml
new file mode 100644
index 0000000..a12f249
--- /dev/null
+++ b/res/layout/dashboard_container_header.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<com.android.settings.widget.SlidingTabLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/sliding_tabs"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="?android:attr/colorPrimary"/>
diff --git a/res/layout/fingerprint_enroll_enrolling_base.xml b/res/layout/fingerprint_enroll_enrolling_base.xml
index c93de4e..0446c66 100644
--- a/res/layout/fingerprint_enroll_enrolling_base.xml
+++ b/res/layout/fingerprint_enroll_enrolling_base.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
@@ -70,6 +70,15 @@
             android:accessibilityLiveRegion="polite"
             android:visibility="invisible"/>
 
+        <Button
+            android:id="@+id/skip_button"
+            style="@style/SetupWizardButton.Negative"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="end"
+            android:text="@string/skip_label"
+            android:visibility="gone" />
+
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/fingerprint_enroll_find_sensor_base.xml b/res/layout/fingerprint_enroll_find_sensor_base.xml
index 3f69a0a..4e60644 100644
--- a/res/layout/fingerprint_enroll_find_sensor_base.xml
+++ b/res/layout/fingerprint_enroll_find_sensor_base.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
@@ -63,9 +63,8 @@
                 android:layout_marginBottom="4dp"
                 android:layout_marginEnd="-12dp"
                 android:layout_gravity="end"
-                android:gravity="end|center_vertical"
                 android:text="@string/fingerprint_enroll_button_next" />
 
         </LinearLayout>
     </FrameLayout>
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/fingerprint_enroll_finish_base.xml b/res/layout/fingerprint_enroll_finish_base.xml
index 15ee22a..1f6a8b0 100644
--- a/res/layout/fingerprint_enroll_finish_base.xml
+++ b/res/layout/fingerprint_enroll_finish_base.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
@@ -91,11 +91,10 @@
                 android:id="@+id/next_button"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:gravity="end|center_vertical"
                 android:text="@string/security_settings_fingerprint_enroll_done" />
 
         </LinearLayout>
 
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/fingerprint_enroll_introduction.xml b/res/layout/fingerprint_enroll_introduction.xml
index f43bdb6..6d1c699 100644
--- a/res/layout/fingerprint_enroll_introduction.xml
+++ b/res/layout/fingerprint_enroll_introduction.xml
@@ -15,10 +15,10 @@
     limitations under the License
 -->
 
-<com.android.setupwizardlib.SetupWizardRecyclerLayout
+<com.android.setupwizardlib.GlifRecyclerLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    style="?attr/fingerprint_layout_theme"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:entries="@xml/fingerprint_enroll_introduction_items"
-    style="?attr/fingerprint_layout_theme" />
+    android:entries="@xml/fingerprint_enroll_introduction_items" />
diff --git a/res/layout/setup_choose_lock_password.xml b/res/layout/setup_choose_lock_password.xml
index 164233c..a91a671 100644
--- a/res/layout/setup_choose_lock_password.xml
+++ b/res/layout/setup_choose_lock_password.xml
@@ -15,15 +15,13 @@
     limitations under the License.
 -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    settings:suwBackgroundTile="@drawable/setup_illustration_tile"
-    settings:suwHeaderText="@string/wifi_setup_wizard_title"
-    settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
-    settings:suwIllustrationImage="@drawable/setup_illustration_lock_screen">
+    android:icon="@drawable/ic_lock"
+    settings:suwHeaderText="@string/lockpassword_choose_your_password_header">
 
     <LinearLayout
         style="@style/SuwContentFrame"
@@ -45,45 +43,42 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:layout_marginStart="30dip"
-            android:layout_marginEnd="30dip"
             android:gravity="center"
             android:inputType="textPassword"
             android:imeOptions="actionNext|flagNoExtractUi"
             android:textSize="24sp"
             style="@style/TextAppearance.PasswordEntry"/>
 
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:clipChildren="false"
+            android:clipToPadding="false"
+            android:gravity="end"
+            android:orientation="horizontal">
+
+            <!-- left : cancel -->
+            <Button android:id="@+id/cancel_button"
+                style="@style/SetupWizardButton.Negative"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/lockpassword_cancel_label" />
+
+            <!-- right : continue -->
+            <Button android:id="@+id/next_button"
+                style="@style/SetupWizardButton.Positive"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/lockpassword_continue_label" />
+
+        </LinearLayout>
+
         <!-- Spacer between password entry and keyboard -->
         <View
             android:layout_width="match_parent"
             android:layout_height="0dip"
             android:layout_weight="1"/>
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:visibility="gone"
-            style="@style/SecurityPreferenceButtonContainer">
-
-            <!-- left : cancel -->
-            <Button android:id="@+id/cancel_button"
-                android:layout_width="0dip"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:text="@string/lockpassword_cancel_label"
-                style="@style/SecurityPreferenceButton"/>
-
-            <!-- right : continue -->
-            <Button android:id="@+id/next_button"
-                android:layout_width="0dip"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:text="@string/lockpassword_continue_label"
-                style="@style/SecurityPreferenceButton"/>
-
-        </LinearLayout>
-
         <!-- Alphanumeric keyboard -->
         <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
             android:layout_width="match_parent"
@@ -94,4 +89,4 @@
 
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/setup_choose_lock_pattern_common.xml b/res/layout/setup_choose_lock_pattern_common.xml
index 857f244..7e59bbf 100644
--- a/res/layout/setup_choose_lock_pattern_common.xml
+++ b/res/layout/setup_choose_lock_pattern_common.xml
@@ -16,15 +16,13 @@
 -->
 
 <!-- Used in phone portrait and tablet, as referenced in alias.xml. -->
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    settings:suwBackgroundTile="@drawable/setup_illustration_tile"
-    settings:suwHeaderText="@string/wifi_setup_wizard_title"
-    settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
-    settings:suwIllustrationImage="@drawable/setup_illustration_lock_screen">
+    android:icon="@drawable/ic_lock"
+    settings:suwHeaderText="@string/wifi_setup_wizard_title">
 
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
         android:id="@+id/topLayout"
@@ -49,19 +47,35 @@
                 android:minHeight="50dip"
                 android:textSize="18sp"/>
 
-            <Button android:id="@+id/retryButton"
-                style="@android:style/Widget.Material.Button.Borderless.Colored"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_horizontal"
-                android:text="@string/lockpattern_retry_button_text"/>
-
             <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
                 android:layout_width="match_parent"
                 android:layout_height="0dip"
                 android:layout_weight="4"
                 android:background="@color/lock_pattern_background"/>
 
+            <!-- Buttons are hidden during setup, and use the buttons in setup navigation bar instead -->
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="end"
+                android:orientation="horizontal">
+
+                <!-- left : cancel, or re-try -->
+                <Button android:id="@+id/footerLeftButton"
+                    style="@style/SetupWizardButton.Negative"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/lockpattern_tutorial_cancel_label" />
+
+                <!-- right : confirm or ok -->
+                <Button android:id="@+id/footerRightButton"
+                    style="@style/SetupWizardButton.Positive"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/lockpattern_tutorial_continue_label" />
+
+            </LinearLayout>
+
         </LinearLayout>
 
         <TextView android:id="@+id/footerText"
@@ -72,32 +86,6 @@
             android:textSize="14sp"
             android:visibility="gone"/>
 
-        <!-- Buttons are hidden during setup, and use the buttons in setup navigation bar instead -->
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:visibility="gone"
-            style="@style/SecurityPreferenceButtonContainer">
-
-            <!-- left : cancel, or re-try -->
-            <Button android:id="@+id/footerLeftButton"
-                android:layout_width="0dip"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:text="@string/lockpattern_tutorial_cancel_label"
-                style="@style/SecurityPreferenceButton"/>
-
-            <!-- right : confirm or ok -->
-            <Button android:id="@+id/footerRightButton"
-                android:layout_width="0dip"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:text="@string/lockpattern_tutorial_continue_label"
-                style="@style/SecurityPreferenceButton"/>
-
-        </LinearLayout>
-
     </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/setup_fingerprint_enroll_find_sensor_base.xml b/res/layout/setup_fingerprint_enroll_find_sensor_base.xml
index 184d6b9..805a82e 100644
--- a/res/layout/setup_fingerprint_enroll_find_sensor_base.xml
+++ b/res/layout/setup_fingerprint_enroll_find_sensor_base.xml
@@ -15,7 +15,7 @@
     limitations under the License
   -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/setup_wizard_layout"
         android:layout_width="match_parent"
@@ -68,4 +68,4 @@
 
         </LinearLayout>
     </FrameLayout>
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/setup_preference.xml b/res/layout/setup_preference.xml
index f5496f4..298bc9a 100644
--- a/res/layout/setup_preference.xml
+++ b/res/layout/setup_preference.xml
@@ -15,11 +15,8 @@
     limitations under the License.
 -->
 
-<com.android.setupwizardlib.SetupWizardPreferenceLayout
+<com.android.setupwizardlib.GlifPreferenceLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:id="@android:id/list_container"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    settings:suwBackgroundTile="@drawable/setup_illustration_tile"
-    settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile" />
+    android:layout_height="match_parent" />
diff --git a/res/layout/setup_redaction_interstitial.xml b/res/layout/setup_redaction_interstitial.xml
index e0f2d94..965d77f 100644
--- a/res/layout/setup_redaction_interstitial.xml
+++ b/res/layout/setup_redaction_interstitial.xml
@@ -15,31 +15,25 @@
     limitations under the License
 -->
 
-<com.android.setupwizardlib.SetupWizardLayout
+<com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    settings:suwBackgroundTile="@drawable/setup_illustration_tile"
-    settings:suwHeaderText="@string/lock_screen_notifications_interstitial_title"
-    settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
-    settings:suwIllustrationImage="@drawable/setup_illustration_lock_screen">
+    android:icon="@drawable/ic_lock"
+    settings:suwHeaderText="@string/lock_screen_notifications_interstitial_title">
 
     <LinearLayout
         style="@style/SuwContentFrame"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:paddingStart="?attr/side_margin"
-        android:paddingEnd="?attr/side_margin">
+        android:orientation="vertical">
 
         <TextView
             style="@style/SuwDescription"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
-            android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
             android:text="@string/lock_screen_notifications_interstitial_message" />
 
         <RadioGroup
@@ -47,8 +41,6 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/redaction_vertical_margins"
-            android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
-            android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
             android:checkedButton="@+id/redact_sensitive">
 
             <com.android.settings.RestrictedRadioButton
@@ -81,8 +73,17 @@
                 android:layout_height="wrap_content"
                 android:layout_marginTop="@dimen/redaction_vertical_margins"
                 android:text="@string/lockscreen_remote_input" />
+
         </RadioGroup>
 
+        <Button
+            android:id="@+id/redaction_next_button"
+            style="@style/SetupWizardButton.Positive"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="end"
+            android:text="@string/next_label" />
+
     </LinearLayout>
 
-</com.android.setupwizardlib.SetupWizardLayout>
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/sliding_tab_indicator_view.xml b/res/layout/sliding_tab_indicator_view.xml
new file mode 100644
index 0000000..9b2942f
--- /dev/null
+++ b/res/layout/sliding_tab_indicator_view.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+
+<View
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/sliding_tab_selected_indicator"
+    android:layout_width="wrap_content"
+    android:layout_height="@dimen/pager_tabs_selected_indicator_height"
+    android:background="?android:attr/colorAccent"/>
diff --git a/res/layout/sliding_tab_title_view.xml b/res/layout/sliding_tab_title_view.xml
new file mode 100644
index 0000000..0386345
--- /dev/null
+++ b/res/layout/sliding_tab_title_view.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="0dp"
+    android:layout_weight="1"
+    android:layout_height="wrap_content"
+    android:ellipsize="end"
+    android:maxLines="1"
+    android:textColor="@android:color/white"
+    android:gravity="center"
+    android:background="?android:attr/selectableItemBackground"
+    android:textAllCaps="true"
+    android:padding="@dimen/pager_tabs_title_padding"/>
\ No newline at end of file
diff --git a/res/layout/support_escalation_card.xml b/res/layout/support_escalation_card.xml
new file mode 100644
index 0000000..e2f9fe4
--- /dev/null
+++ b/res/layout/support_escalation_card.xml
@@ -0,0 +1,46 @@
+<?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.
+-->
+
+<android.support.v7.widget.CardView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginBottom="4dp"
+    android:layout_marginEnd="8dp"
+    android:layout_marginStart="8dp"
+    android:layout_marginTop="4dp"
+    android:clickable="true"
+    android:foreground="?android:attr/selectableItemBackground">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="16dp"
+        android:orientation="horizontal">
+        <ImageView
+            android:id="@android:id/icon"
+            android:layout_width="@dimen/dashboard_tile_image_size"
+            android:layout_height="@dimen/dashboard_tile_image_size"
+            android:layout_marginStart="@dimen/dashboard_tile_image_margin_start"
+            android:layout_marginEnd="@dimen/dashboard_tile_image_margin_end"
+            android:scaleType="centerInside"/>
+        <TextView
+            android:id="@android:id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="@style/TextAppearance.TileTitle"/>
+    </LinearLayout>
+</android.support.v7.widget.CardView>
\ No newline at end of file
diff --git a/res/layout/support_fragment.xml b/res/layout/support_fragment.xml
new file mode 100644
index 0000000..481a548
--- /dev/null
+++ b/res/layout/support_fragment.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+
+<android.support.v7.widget.RecyclerView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/support_items"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"/>
\ No newline at end of file
diff --git a/res/layout/support_item_subtitle.xml b/res/layout/support_item_subtitle.xml
new file mode 100644
index 0000000..62b2fc1
--- /dev/null
+++ b/res/layout/support_item_subtitle.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/title"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingBottom="16dp"
+    android:paddingEnd="8dp"
+    android:paddingStart="8dp"
+    android:paddingTop="8dp"
+    android:textAppearance="@style/TextAppearance.CategoryTitle"/>
\ No newline at end of file
diff --git a/res/layout/support_item_title.xml b/res/layout/support_item_title.xml
new file mode 100644
index 0000000..eff3f7f
--- /dev/null
+++ b/res/layout/support_item_title.xml
@@ -0,0 +1,40 @@
+<?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:orientation="vertical">
+    <TextView
+        android:id="@android:id/title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingEnd="8dp"
+        android:paddingStart="8dp"
+        android:paddingTop="8dp"
+        android:textAppearance="@style/TextAppearance.SupportTitle"/>
+    <TextView
+        android:id="@android:id/summary"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingBottom="16dp"
+        android:paddingEnd="8dp"
+        android:paddingStart="8dp"
+        android:paddingTop="8dp"
+        android:textAppearance="@style/TextAppearance.CategoryTitle"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/support_tile.xml b/res/layout/support_tile.xml
new file mode 100644
index 0000000..74d460e
--- /dev/null
+++ b/res/layout/support_tile.xml
@@ -0,0 +1,41 @@
+<?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:background="?android:attr/selectableItemBackground"
+    android:gravity="center_vertical"
+    android:minHeight="@dimen/dashboard_tile_minimum_height"
+    android:orientation="horizontal">
+    <ImageView
+        android:id="@android:id/icon"
+        android:layout_width="@dimen/dashboard_tile_image_size"
+        android:layout_height="@dimen/dashboard_tile_image_size"
+        android:scaleType="centerInside"
+        android:layout_marginStart="@dimen/dashboard_tile_image_margin_start"
+        android:layout_marginEnd="@dimen/dashboard_tile_image_margin_end"/>
+    <TextView
+        android:id="@android:id/title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:singleLine="true"
+        android:textAppearance="@style/TextAppearance.TileTitle"
+        android:ellipsize="end"
+        android:fadingEdge="horizontal"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/menu/storage_volume.xml b/res/menu/storage_volume.xml
index efa468c..bf9f985 100644
--- a/res/menu/storage_volume.xml
+++ b/res/menu/storage_volume.xml
@@ -30,4 +30,7 @@
     <item
         android:id="@+id/storage_migrate"
         android:title="@string/storage_menu_migrate" />
+    <item
+        android:id="@+id/storage_free"
+        android:title="@string/storage_menu_free" />
 </menu>
diff --git a/res/values/config.xml b/res/values/config.xml
index 3f25fc6..6cae9cf 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -38,4 +38,6 @@
     <!-- When true enable color temperature setting. -->
     <bool name="config_enableColorTemperature">false</bool>
 
+    <!-- Fully-qualified class name for the implementation of the FeatureFactory to be instantiated. -->
+    <string name="config_featureFactory" translatable="false">com.android.settings.overlay.FeatureFactoryImpl</string>
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ef7efa2..5c81f12 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -59,6 +59,8 @@
     <dimen name="appwidget_min_height">40dip</dimen>
 
     <dimen name="pager_tabs_padding">0dp</dimen>
+    <dimen name="pager_tabs_title_padding">16dp</dimen>
+    <dimen name="pager_tabs_selected_indicator_height">3dp</dimen>
 
     <!-- Minimum width for the popup for updating a user's photo. -->
     <dimen name="update_user_photo_popup_min_width">300dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4f5c7b3..9ab8c61 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2456,6 +2456,8 @@
     <string name="storage_menu_set_up">Set up</string>
     <!-- Storage setting.  Menu option for exploring a storage device [CHAR LIMIT=30]-->
     <string name="storage_menu_explore">Explore</string>
+    <!-- Storage setting. Menu option for using the deletion helper. [CHAR LIMIT=30] -->
+    <string name="storage_menu_free">Free up space</string>
 
     <!-- Storage setting.  Title for USB transfer settings [CHAR LIMIT=30]-->
     <string name="storage_title_usb">USB computer connection</string>
@@ -7437,6 +7439,10 @@
     <string name="notification_suggestion_title">Control lock screen notifications</string>
     <!-- Summary of notification suggestion during optional steps of setup. [CHAR_LIMIT=80] -->
     <string name="notification_suggestion_summary">Show or hide notification content</string>
+    <!-- Setting tab title for all setting options. [CHAR LIMIT=20] -->
+    <string name="page_tab_title_summary">All</string>
+    <!-- Setting tab title for support setting options. [CHAR LIMIT=20] -->
+    <string name="page_tab_title_support">Support</string>
 
     <!-- Summary of developer options to set the smallest width of the screen [CHAR LIMIT=60]-->
     <string name="developer_density_summary"><xliff:g name="count" example="320">%d</xliff:g> dp</string>
@@ -7459,4 +7465,52 @@
     <!-- [CHAR LIMIT=60] Name of dev option called demo mode -->
     <string name="demo_mode">Demo mode</string>
 
+    <!-- Activity title for deletion helper. [CHAR LIMIT=25] -->
+    <string name="deletion_helper_title">Remove from Device</string>
+    <!-- Preference group title for the list of apps to uninstall. [CHAR LIMIT=40]-->
+    <string name="deletion_helper_apps_title">Apps</string>
+    <!-- Summary of how much storage an app is using and the number of days since last use. [CHAR LIMIT=NONE]-->
+    <string name="deletion_helper_app_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g>, last used <xliff:g id="days" example="67">%2$d</xliff:g> days ago</string>
+    <!-- Summary of how much storage an app is using when it has never been used before. [CHAR LIMIT=NONE]-->
+    <string name="deletion_helper_app_summary_never_used"><xliff:g id="used" example="1.2GB">%1$s</xliff:g>, never used before</string>
+    <!-- Summary of how much storage an app is using when its last use is unknown. [CHAR LIMIT=NONE]-->
+    <string name="deletion_helper_app_summary_unknown_used"><xliff:g id="used" example="1.2GB">%1$s</xliff:g>, not sure when last used</string>
+    <!-- Button which clears out storage in the deletion helper. [CHAR LIMIT=60]-->
+    <string name="deletion_helper_free_button">Free up <xliff:g id="freeable" example="1.2GB">%1$s</xliff:g></string>
+
+    <!-- Title text for connecting to customer support [CHAR LIMIT=80]-->
+    <string name="support_escalation_title">Around the clock help</string>
+
+    <!-- Summary text for connecting to customer support [CHAR LIMIT=NONE]-->
+    <string name="support_escalation_summary">Call or email us and we\'ll get your issue solved right away. No muss, no fuss.</string>
+
+    <!-- Title text that indicates there is not internet connection. [CHAR LIMIT=80]-->
+    <string name="support_offline_title">You\'re offline</string>
+
+    <!-- Summary text telling user to connect to Internet in order to request customer support. [CHAR LIMIT=NONE]-->
+    <string name="support_offline_summary">To reach support, first connect to Wi-Fi or data.</string>
+
+    <!-- Title text for showing a list of help options [CHAR LIMIT=80]-->
+    <string name="support_more_help_title">More help</string>
+
+    <!-- Button label for contacting customer support by phone [CHAR LIMIT=20]-->
+    <string name="support_escalation_by_phone">Phone</string>
+
+    <!-- Button label for contacting customer support by phone [CHAR LIMIT=20]-->
+    <string name="support_escalation_by_phone_offline">Phone</string>
+
+    <!-- Button label for contacting customer support by email [CHAR LIMIT=20]-->
+    <string name="support_escalation_by_email">Email</string>
+
+    <!-- Button label for contacting customer support by chat [CHAR LIMIT=20]-->
+    <string name="support_escalation_by_chat">Chat</string>
+
+    <!-- Button label for visiting help forum [CHAR LIMIT=60]-->
+    <string name="support_forum_title">Help forum</string>
+
+    <!-- Button label for visiting help articles [CHAR LIMIT=60]-->
+    <string name="support_articles_title">Help articles</string>
+
+    <!-- Button label for sending user feedback [CHAR LIMIT=60]-->
+    <string name="support_feedback_title">Send feedback</string>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 45d2c11..345edc9 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -276,6 +276,10 @@
         <item name="android:singleLine">true</item>
     </style>
 
+    <style name="SetupWizardButton.Negative" parent="@android:style/Widget.Material.Button.Borderless" />
+
+    <style name="SetupWizardButton.Positive" parent="@android:style/Widget.Material.Button.Colored" />
+
     <style name="vpn_label">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">wrap_content</item>
@@ -340,16 +344,16 @@
         <item name="android:textColor">@color/warning</item>
     </style>
 
-    <style name="FingerprintLayoutTheme">
-        <item name="suwBackground">@drawable/fp_enrollment_header</item>
-        <item name="suwIllustrationAspectRatio">@dimen/fingerprint_illustration_aspect_ratio</item>
-        <item name="suwDecorPaddingTop">@dimen/fingerprint_decor_padding_top</item>
+    <style name="TextAppearance.SupportTitle"
+           parent="@android:style/TextAppearance.Material.Subhead">
+        <item name="android:textColor">?android:attr/colorAccent</item>
+        <item name="android:textSize">24sp</item>
     </style>
 
-    <style name="SetupWizardFingerprintLayoutTheme">
-        <item name="suwBackgroundTile">@drawable/setup_illustration_tile</item>
-        <item name="suwIllustration">@drawable/setup_illustration_lock_screen</item>
-        <item name="suwIllustrationHorizontalTile">@drawable/setup_illustration_horizontal_tile</item>
+    <style name="TextAppearance.SupportSummary" parent="TextAppearance.CategoryTitle"/>
+
+    <style name="FingerprintLayoutTheme">
+        <item name="android:icon">@drawable/ic_fingerprint_header</item>
     </style>
 
     <style name="TextAppearance.ConfirmDeviceCredentialsErrorText"
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 427e11f..2e3ca4f 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -32,15 +32,13 @@
         <item name="android:windowBackground">@null</item>
     </style>
 
-    <style name="SetupWizardTheme" parent="SuwThemeMaterial">
+    <style name="SetupWizardTheme" parent="SuwThemeGlif">
         <!-- For all Alert Dialogs -->
         <item name="android:alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
         <item name="android:colorPrimary">@color/suw_color_accent_dark</item>
-        <item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
-        <item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
         <item name="android:windowBackground">?android:attr/colorBackground</item>
         <item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
-        <item name="fingerprint_layout_theme">@style/SetupWizardFingerprintLayoutTheme</item>
+        <item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
         <item name="fingerprint_progress_bar_size">@dimen/setup_fingerprint_progress_bar_size</item>
         <item name="fingerprint_ring_radius">@dimen/setup_fingerprint_ring_radius</item>
         <item name="ic_menu_add">@drawable/ic_menu_add_dark</item>
@@ -59,15 +57,13 @@
         <item name="@*android:errorColor">@color/setup_lock_pattern_view_error_color_dark</item>
     </style>
 
-    <style name="SetupWizardTheme.Light" parent="SuwThemeMaterial.Light">
+    <style name="SetupWizardTheme.Light" parent="SuwThemeGlif.Light">
         <!-- For all Alert Dialogs -->
         <item name="android:alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
         <item name="android:colorPrimary">@color/suw_color_accent_light</item>
-        <item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
-        <item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
         <item name="android:windowBackground">?android:attr/colorBackground</item>
         <item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
-        <item name="fingerprint_layout_theme">@style/SetupWizardFingerprintLayoutTheme</item>
+        <item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
         <item name="fingerprint_progress_bar_size">@dimen/setup_fingerprint_progress_bar_size</item>
         <item name="fingerprint_ring_radius">@dimen/setup_fingerprint_ring_radius</item>
         <item name="ic_menu_add">@drawable/ic_menu_add_light</item>
@@ -78,7 +74,7 @@
         <item name="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>
         <item name="wifi_signal">@drawable/wifi_signal</item>
         <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
-        <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
+        <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard.Light</item>
 
         <!-- LockPatternView colors -->
         <item name="@*android:regularColor">@color/setup_lock_pattern_view_regular_color_light</item>
@@ -108,9 +104,11 @@
         <item name="apnPreferenceStyle">@style/ApnPreference</item>
     </style>
 
-    <style name="PreferenceTheme.SetupWizard">
-        <item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
-        <item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
+    <style name="PreferenceTheme.SetupWizard" parent="SetupWizardTheme">
+        <item name="preferenceFragmentStyle">@style/SetupWizardPreferenceFragmentStyle</item>
+    </style>
+
+    <style name="PreferenceTheme.SetupWizard.Light" parent="SetupWizardTheme.Light">
         <item name="preferenceFragmentStyle">@style/SetupWizardPreferenceFragmentStyle</item>
     </style>
 
diff --git a/res/xml/deletion_helper_list.xml b/res/xml/deletion_helper_list.xml
new file mode 100644
index 0000000..7979b46
--- /dev/null
+++ b/res/xml/deletion_helper_list.xml
@@ -0,0 +1,24 @@
+<?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.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+                  android:title="@string/deletion_helper_title">
+
+    <PreferenceCategory
+            android:key="apps_group"
+            android:title="@string/deletion_helper_apps_title" />
+
+</PreferenceScreen>
diff --git a/src/com/android/settings/InstrumentedFragment.java b/src/com/android/settings/InstrumentedFragment.java
index 0e3528a..3977426 100644
--- a/src/com/android/settings/InstrumentedFragment.java
+++ b/src/com/android/settings/InstrumentedFragment.java
@@ -16,11 +16,11 @@
 
 package com.android.settings;
 
-import com.android.internal.logging.MetricsLogger;
-
 import android.os.Bundle;
 import android.support.v14.preference.PreferenceFragment;
 
+import com.android.internal.logging.MetricsLogger;
+
 /**
  * Instrumented fragment that logs visibility state.
  */
@@ -30,6 +30,9 @@
 
     // Used by PreferenceActivity for the dummy fragment it adds, no useful data here.
     public static final int PREFERENCE_ACTIVITY_FRAGMENT = UNDECLARED + 1;
+    public static final int DASHBOARD_CONTAINER = UNDECLARED + 2;
+
+    public static final int SUPPORT_FRAGMENT = UNDECLARED + 3;
 
     /**
      * Declare the view of this category.
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 45a1294..45d5cad 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -49,6 +49,7 @@
 import android.view.ViewGroup;
 import android.widget.Button;
 import android.widget.SearchView;
+
 import com.android.internal.util.ArrayUtils;
 import com.android.settings.Settings.WifiSettingsActivity;
 import com.android.settings.accessibility.AccessibilitySettings;
@@ -68,7 +69,7 @@
 import com.android.settings.applications.WriteSettingsDetails;
 import com.android.settings.applications.VrListenerSettings;
 import com.android.settings.bluetooth.BluetoothSettings;
-import com.android.settings.dashboard.DashboardSummary;
+import com.android.settings.dashboard.DashboardContainerFragment;
 import com.android.settings.dashboard.SearchResultsSummary;
 import com.android.settings.datausage.DataUsageSummary;
 import com.android.settings.deviceinfo.PrivateVolumeForget;
@@ -102,6 +103,7 @@
 import com.android.settings.notification.ZenModeScheduleRuleSettings;
 import com.android.settings.notification.ZenModeSettings;
 import com.android.settings.notification.ZenModeVisualInterruptionSettings;
+import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.print.PrintJobSettingsFragment;
 import com.android.settings.print.PrintSettingsFragment;
 import com.android.settings.qstile.DevelopmentTiles;
@@ -613,7 +615,7 @@
                 // Show Search affordance
                 mDisplaySearch = true;
                 mInitialTitleResId = R.string.dashboard_title;
-                switchToFragment(DashboardSummary.class.getName(), null, false, false,
+                switchToFragment(DashboardContainerFragment.class.getName(), null, false, false,
                         mInitialTitleResId, mInitialTitle, false);
             }
         }
@@ -687,7 +689,7 @@
     }
 
     /**
-     * Sets the id of the view continaing the main content. Should be called before calling super's
+     * Sets the id of the view containing the main content. Should be called before calling super's
      * onCreate.
      */
     protected void setMainContentId(int contentId) {
@@ -729,7 +731,7 @@
         setTitleFromBackStack();
     }
 
-    private int setTitleFromBackStack() {
+    private void setTitleFromBackStack() {
         final int count = getFragmentManager().getBackStackEntryCount();
 
         if (count == 0) {
@@ -738,13 +740,11 @@
             } else {
                 setTitle(mInitialTitle);
             }
-            return 0;
+            return;
         }
 
         FragmentManager.BackStackEntry bse = getFragmentManager().getBackStackEntryAt(count - 1);
         setTitleFromBackStackEntry(bse);
-
-        return count;
     }
 
     private void setTitleFromBackStackEntry(FragmentManager.BackStackEntry bse) {
@@ -1198,6 +1198,7 @@
         if (current != null && current instanceof SearchResultsSummary) {
             mSearchResultsFragment = (SearchResultsSummary) current;
         } else {
+            setContentHeaderView(null);
             mSearchResultsFragment = (SearchResultsSummary) switchToFragment(
                     SearchResultsSummary.class.getName(), null, false, true,
                     R.string.search_results_title, null, true);
diff --git a/src/com/android/settings/SetupChooseLockGeneric.java b/src/com/android/settings/SetupChooseLockGeneric.java
index bc3a2ec..63c2873 100644
--- a/src/com/android/settings/SetupChooseLockGeneric.java
+++ b/src/com/android/settings/SetupChooseLockGeneric.java
@@ -16,7 +16,6 @@
 
 package com.android.settings;
 
-import android.app.Activity;
 import android.app.admin.DevicePolicyManager;
 import android.content.ComponentName;
 import android.content.Context;
@@ -25,20 +24,17 @@
 import android.content.res.Resources;
 import android.os.Bundle;
 import android.os.UserHandle;
-import android.support.v7.preference.Preference;
 import android.support.v14.preference.PreferenceFragment;
+import android.support.v7.preference.Preference;
 import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.Button;
 import android.widget.LinearLayout;
 
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.fingerprint.SetupSkipDialog;
-import com.android.setupwizardlib.SetupWizardLayout;
-import com.android.setupwizardlib.SetupWizardPreferenceLayout;
-import com.android.setupwizardlib.view.NavigationBar;
+import com.android.setupwizardlib.GlifPreferenceLayout;
 
 /**
  * Setup Wizard's version of ChooseLockGeneric screen. It inherits the logic and basic structure
@@ -74,8 +70,7 @@
         layout.setFitsSystemWindows(false);
     }
 
-    public static class SetupChooseLockGenericFragment extends ChooseLockGenericFragment
-            implements NavigationBar.NavigationBarListener {
+    public static class SetupChooseLockGenericFragment extends ChooseLockGenericFragment {
 
         public static final String EXTRA_PASSWORD_QUALITY = ":settings:password_quality";
 
@@ -83,24 +78,14 @@
         public void onViewCreated(View view, Bundle savedInstanceState) {
             super.onViewCreated(view, savedInstanceState);
 
-            SetupWizardUtils.setImmersiveMode(getActivity());
-
-            SetupWizardPreferenceLayout layout = (SetupWizardPreferenceLayout) view;
+            GlifPreferenceLayout layout = (GlifPreferenceLayout) view;
             layout.setDividerInset(getContext().getResources().getDimensionPixelSize(
-                    R.dimen.suw_items_text_divider_inset));
-            final NavigationBar navigationBar = layout.getNavigationBar();
-            Button nextButton = navigationBar.getNextButton();
-            nextButton.setText(null);
-            nextButton.setEnabled(false);
-            navigationBar.setNavigationBarListener(this);
+                    R.dimen.suw_items_glif_text_divider_inset));
 
-            layout.setIllustration(R.drawable.setup_illustration_lock_screen,
-                    R.drawable.setup_illustration_horizontal_tile);
-            if (!mForFingerprint) {
-                layout.setHeaderText(R.string.setup_lock_settings_picker_title);
-            } else {
-                layout.setHeaderText(R.string.lock_settings_picker_title);
-            }
+            layout.setIcon(getContext().getDrawable(R.drawable.ic_lock));
+            layout.setHeaderText(mForFingerprint ?
+                    R.string.lock_settings_picker_title
+                    : R.string.setup_lock_settings_picker_title);
 
             // Use the dividers in SetupWizardRecyclerLayout. Suppress the dividers in
             // PreferenceFragment.
@@ -143,7 +128,7 @@
         @Override
         public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,
                 Bundle savedInstanceState) {
-            SetupWizardPreferenceLayout layout = (SetupWizardPreferenceLayout) parent;
+            GlifPreferenceLayout layout = (GlifPreferenceLayout) parent;
             return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
         }
 
@@ -251,17 +236,5 @@
             SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
             return intent;
         }
-
-        @Override
-        public void onNavigateBack() {
-            Activity activity = getActivity();
-            if (activity != null) {
-                activity.onBackPressed();
-            }
-        }
-
-        @Override
-        public void onNavigateNext() {
-        }
     }
 }
diff --git a/src/com/android/settings/SetupChooseLockPassword.java b/src/com/android/settings/SetupChooseLockPassword.java
index d483d8f..94cc728 100644
--- a/src/com/android/settings/SetupChooseLockPassword.java
+++ b/src/com/android/settings/SetupChooseLockPassword.java
@@ -16,7 +16,6 @@
 
 package com.android.settings;
 
-import android.app.Activity;
 import android.app.Fragment;
 import android.content.Context;
 import android.content.Intent;
@@ -27,9 +26,7 @@
 import android.view.ViewGroup;
 import android.widget.LinearLayout;
 
-import com.android.setupwizardlib.SetupWizardLayout;
-import com.android.setupwizardlib.util.SystemBarHelper;
-import com.android.setupwizardlib.view.NavigationBar;
+import com.android.setupwizardlib.GlifLayout;
 
 /**
  * Setup Wizard's version of ChooseLockPassword screen. It inherits the logic and basic structure
@@ -91,27 +88,21 @@
         super.onApplyThemeResource(theme, resid, first);
     }
 
-    public static class SetupChooseLockPasswordFragment extends ChooseLockPasswordFragment
-            implements NavigationBar.NavigationBarListener {
+    public static class SetupChooseLockPasswordFragment extends ChooseLockPasswordFragment {
 
-        private SetupWizardLayout mLayout;
-        private NavigationBar mNavigationBar;
+        private GlifLayout mLayout;
 
         @Override
         public View onCreateView(LayoutInflater inflater, ViewGroup container,
                 Bundle savedInstanceState) {
-            mLayout = (SetupWizardLayout) inflater.inflate(
+            mLayout = (GlifLayout) inflater.inflate(
                     R.layout.setup_choose_lock_password, container, false);
-            mNavigationBar = mLayout.getNavigationBar();
-            mNavigationBar.setNavigationBarListener(this);
             return mLayout;
         }
 
         @Override
         public void onViewCreated(View view, Bundle savedInstanceState) {
             super.onViewCreated(view, savedInstanceState);
-            SystemBarHelper.setImeInsetView(mLayout);
-            SetupWizardUtils.setImmersiveMode(getActivity());
             mLayout.setHeaderText(getActivity().getTitle());
         }
 
@@ -119,28 +110,5 @@
         protected Intent getRedactionInterstitialIntent(Context context) {
             return null;
         }
-
-        @Override
-        protected void setNextEnabled(boolean enabled) {
-            mNavigationBar.getNextButton().setEnabled(enabled);
-        }
-
-        @Override
-        protected void setNextText(int text) {
-            mNavigationBar.getNextButton().setText(text);
-        }
-
-        @Override
-        public void onNavigateBack() {
-            final Activity activity = getActivity();
-            if (activity != null) {
-                activity.onBackPressed();
-            }
-        }
-
-        @Override
-        public void onNavigateNext() {
-            handleNext();
-        }
     }
 }
diff --git a/src/com/android/settings/SetupChooseLockPattern.java b/src/com/android/settings/SetupChooseLockPattern.java
index 8a7842d..2978196 100644
--- a/src/com/android/settings/SetupChooseLockPattern.java
+++ b/src/com/android/settings/SetupChooseLockPattern.java
@@ -16,7 +16,6 @@
 
 package com.android.settings;
 
-import android.app.Activity;
 import android.app.Fragment;
 import android.content.Context;
 import android.content.Intent;
@@ -26,11 +25,9 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.Button;
 import android.widget.LinearLayout;
 
-import com.android.setupwizardlib.SetupWizardLayout;
-import com.android.setupwizardlib.view.NavigationBar;
+import com.android.setupwizardlib.GlifLayout;
 
 /**
  * Setup Wizard's version of ChooseLockPattern screen. It inherits the logic and basic structure
@@ -86,87 +83,20 @@
         super.onApplyThemeResource(theme, resid, first);
     }
 
-    public static class SetupChooseLockPatternFragment extends ChooseLockPatternFragment
-            implements NavigationBar.NavigationBarListener {
-
-        private NavigationBar mNavigationBar;
-        private Button mRetryButton;
+    public static class SetupChooseLockPatternFragment extends ChooseLockPatternFragment {
 
         @Override
         public View onCreateView(LayoutInflater inflater, ViewGroup container,
                 Bundle savedInstanceState) {
-            final SetupWizardLayout layout = (SetupWizardLayout) inflater.inflate(
+            final GlifLayout layout = (GlifLayout) inflater.inflate(
                     R.layout.setup_choose_lock_pattern, container, false);
-            mNavigationBar = layout.getNavigationBar();
-            mNavigationBar.setNavigationBarListener(this);
             layout.setHeaderText(getActivity().getTitle());
             return layout;
         }
 
         @Override
-        public void onViewCreated(View view, Bundle savedInstanceState) {
-            mRetryButton = (Button) view.findViewById(R.id.retryButton);
-            mRetryButton.setOnClickListener(this);
-            super.onViewCreated(view, savedInstanceState);
-            SetupWizardUtils.setImmersiveMode(getActivity());
-        }
-
-        @Override
         protected Intent getRedactionInterstitialIntent(Context context) {
             return null;
         }
-
-        @Override
-        public void onClick(View v) {
-            if (v == mRetryButton) {
-                handleLeftButton();
-            } else {
-                super.onClick(v);
-            }
-        }
-
-        @Override
-        protected void setRightButtonEnabled(boolean enabled) {
-            mNavigationBar.getNextButton().setEnabled(enabled);
-        }
-
-        @Override
-        protected void setRightButtonText(int text) {
-            mNavigationBar.getNextButton().setText(text);
-        }
-
-        @Override
-        protected void updateStage(Stage stage) {
-            super.updateStage(stage);
-            // Only enable the button for retry
-            mRetryButton.setEnabled(stage == Stage.FirstChoiceValid);
-
-            switch (stage) {
-                case Introduction:
-                case HelpScreen:
-                case ChoiceTooShort:
-                case FirstChoiceValid:
-                    mRetryButton.setVisibility(View.VISIBLE);
-                    break;
-                case NeedToConfirm:
-                case ConfirmWrong:
-                case ChoiceConfirmed:
-                    mRetryButton.setVisibility(View.INVISIBLE);
-                    break;
-            }
-        }
-
-        @Override
-        public void onNavigateBack() {
-            final Activity activity = getActivity();
-            if (activity != null) {
-                activity.onBackPressed();
-            }
-        }
-
-        @Override
-        public void onNavigateNext() {
-            handleRightButton();
-        }
     }
 }
diff --git a/src/com/android/settings/SetupEncryptionInterstitial.java b/src/com/android/settings/SetupEncryptionInterstitial.java
index 39c8af1..deeaf71 100644
--- a/src/com/android/settings/SetupEncryptionInterstitial.java
+++ b/src/com/android/settings/SetupEncryptionInterstitial.java
@@ -16,7 +16,6 @@
 
 package com.android.settings;
 
-import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
@@ -25,13 +24,10 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-import com.android.setupwizardlib.SetupWizardLayout;
-import com.android.setupwizardlib.SetupWizardPreferenceLayout;
-import com.android.setupwizardlib.view.NavigationBar;
+import com.android.setupwizardlib.GlifPreferenceLayout;
 
 /**
  * Setup Wizard's version of EncryptionInterstitial screen. It inherits the logic and basic
@@ -78,30 +74,18 @@
         layout.setFitsSystemWindows(false);
     }
 
-    public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment
-            implements NavigationBar.NavigationBarListener {
+    public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment {
 
         @Override
         public void onViewCreated(View view, Bundle savedInstanceState) {
             super.onViewCreated(view, savedInstanceState);
 
-            final SetupWizardPreferenceLayout layout = (SetupWizardPreferenceLayout) view;
+            final GlifPreferenceLayout layout = (GlifPreferenceLayout) view;
             layout.setDividerInset(getContext().getResources().getDimensionPixelSize(
-                    R.dimen.suw_items_icon_divider_inset));
-            layout.setIllustration(R.drawable.setup_illustration_lock_screen,
-                    R.drawable.setup_illustration_horizontal_tile);
-
-            final NavigationBar navigationBar = layout.getNavigationBar();
-            navigationBar.setNavigationBarListener(this);
-            Button nextButton = navigationBar.getNextButton();
-            nextButton.setText(null);
-            nextButton.setEnabled(false);
+                    R.dimen.suw_items_glif_icon_divider_inset));
+            layout.setIcon(getContext().getDrawable(R.drawable.ic_lock));
 
             layout.setHeaderText(R.string.encryption_interstitial_header);
-            Activity activity = getActivity();
-            if (activity != null) {
-                SetupWizardUtils.setImmersiveMode(activity);
-            }
 
             // Use the dividers in SetupWizardRecyclerLayout. Suppress the dividers in
             // PreferenceFragment.
@@ -118,21 +102,8 @@
         @Override
         public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,
                                                  Bundle savedInstanceState) {
-            SetupWizardPreferenceLayout layout = (SetupWizardPreferenceLayout) parent;
+            GlifPreferenceLayout layout = (GlifPreferenceLayout) parent;
             return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
         }
-
-        @Override
-        public void onNavigateBack() {
-            final Activity activity = getActivity();
-            if (activity != null) {
-                activity.onBackPressed();
-            }
-        }
-
-        @Override
-        public void onNavigateNext() {
-            // next is handled via the onPreferenceTreeClick method in EncryptionInterstitial
-        }
     }
 }
diff --git a/src/com/android/settings/SetupRedactionInterstitial.java b/src/com/android/settings/SetupRedactionInterstitial.java
index e487a50..225fe46 100644
--- a/src/com/android/settings/SetupRedactionInterstitial.java
+++ b/src/com/android/settings/SetupRedactionInterstitial.java
@@ -16,20 +16,16 @@
 
 package com.android.settings;
 
-import android.app.Activity;
-import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
 import android.os.Bundle;
-import android.os.UserHandle;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.Button;
 import android.widget.LinearLayout;
 
 import com.android.settings.notification.RedactionInterstitial;
-import com.android.setupwizardlib.SetupWizardLayout;
-import com.android.setupwizardlib.view.NavigationBar;
 
 /**
  * Setup Wizard's version of RedactionInterstitial screen. It inherits the logic and basic structure
@@ -67,7 +63,7 @@
     }
 
     public static class SetupRedactionInterstitialFragment extends RedactionInterstitialFragment
-            implements NavigationBar.NavigationBarListener {
+            implements View.OnClickListener {
 
         @Override
         public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -78,29 +74,19 @@
         @Override
         public void onViewCreated(View view, Bundle savedInstanceState) {
             super.onViewCreated(view, savedInstanceState);
-            final SetupWizardLayout layout =
-                    (SetupWizardLayout) view.findViewById(R.id.setup_wizard_layout);
-
-            final NavigationBar navigationBar = layout.getNavigationBar();
-            navigationBar.setNavigationBarListener(this);
-            navigationBar.getBackButton().setVisibility(View.GONE);
-            SetupWizardUtils.setImmersiveMode(getActivity());
+            final Button button = (Button) view.findViewById(R.id.redaction_next_button);
+            button.setOnClickListener(this);
         }
 
         @Override
-        public void onNavigateBack() {
-            final Activity activity = getActivity();
-            if (activity != null) {
-                activity.onBackPressed();
-            }
-        }
-
-        @Override
-        public void onNavigateNext() {
-            final SetupRedactionInterstitial activity = (SetupRedactionInterstitial) getActivity();
-            if (activity != null) {
-                activity.setResult(RESULT_OK, activity.getResultIntentData());
-                finish();
+        public void onClick(View v) {
+            if (v.getId() == R.id.redaction_next_button) {
+                final SetupRedactionInterstitial activity =
+                        (SetupRedactionInterstitial) getActivity();
+                if (activity != null) {
+                    activity.setResult(RESULT_OK, activity.getResultIntentData());
+                    finish();
+                }
             }
         }
     }
diff --git a/src/com/android/settings/SetupWizardUtils.java b/src/com/android/settings/SetupWizardUtils.java
index 71501b1..5563c3b 100644
--- a/src/com/android/settings/SetupWizardUtils.java
+++ b/src/com/android/settings/SetupWizardUtils.java
@@ -24,14 +24,6 @@
 import com.android.setupwizardlib.util.WizardManagerHelper;
 
 public class SetupWizardUtils {
-    private static final String TAG = "SetupWizardUtils";
-
-    // From WizardManager (must match constants maintained there)
-    public static final String EXTRA_SCRIPT_URI = "scriptUri";
-
-    public static boolean isUsingWizardManager(Activity activity) {
-        return activity.getIntent().hasExtra(EXTRA_SCRIPT_URI);
-    }
 
     public static int getTheme(Intent intent) {
         if (WizardManagerHelper.isLightTheme(intent, true)) {
diff --git a/src/com/android/settings/dashboard/DashboardContainerFragment.java b/src/com/android/settings/dashboard/DashboardContainerFragment.java
new file mode 100644
index 0000000..b75cef2
--- /dev/null
+++ b/src/com/android/settings/dashboard/DashboardContainerFragment.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.dashboard;
+
+import android.app.Activity;
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v13.app.FragmentPagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.android.settings.InstrumentedFragment;
+import com.android.settings.R;
+import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.overlay.SupportFeatureProvider;
+import com.android.settings.widget.SlidingTabLayout;
+import com.android.settingslib.drawer.SettingsDrawerActivity;
+import com.android.settingslib.HelpUtils;
+
+/**
+ * Container for Dashboard fragments.
+ */
+public final class DashboardContainerFragment extends InstrumentedFragment {
+
+    private static final int INDEX_SUMMARY_FRAGMENT = 0;
+    private static final int INDEX_SUPPORT_FRAGMENT = 1;
+
+    private ViewPager mViewPager;
+    private View mHeaderView;
+    private DashboardViewPagerAdapter mPagerAdapter;
+
+    @Override
+    protected int getMetricsCategory() {
+        return DASHBOARD_CONTAINER;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
+        final View content = inflater.inflate(R.layout.dashboard_container, parent, false);
+        mViewPager = (ViewPager) content.findViewById(R.id.pager);
+        mPagerAdapter = new DashboardViewPagerAdapter(getContext(), getChildFragmentManager());
+        mViewPager.setAdapter(mPagerAdapter);
+        mHeaderView = inflater.inflate(R.layout.dashboard_container_header, parent, false);
+        ((SlidingTabLayout) mHeaderView).setViewPager(mViewPager);
+        return content;
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (mPagerAdapter.getCount() > 1) {
+            final Activity activity = getActivity();
+            if (activity instanceof SettingsDrawerActivity) {
+                ((SettingsDrawerActivity) getActivity()).setContentHeaderView(mHeaderView);
+            }
+        }
+    }
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        super.onCreateOptionsMenu(menu, inflater);
+        if (getActivity() == null) return;
+        HelpUtils.prepareHelpMenuItem(getActivity(), menu, R.string.help_uri_dashboard,
+                getClass().getName());
+    }
+
+    private static final class DashboardViewPagerAdapter extends FragmentPagerAdapter {
+
+        private final Context mContext;
+        private final SupportFeatureProvider mSupportFeatureProvider;
+
+        public DashboardViewPagerAdapter(Context context, FragmentManager fragmentManager) {
+            super(fragmentManager);
+            mContext = context;
+            mSupportFeatureProvider =
+                    FeatureFactory.getFactory(context).getSupportFeatureProvider(context);
+        }
+
+        @Override
+        public CharSequence getPageTitle(int position) {
+            switch (position) {
+                case INDEX_SUMMARY_FRAGMENT:
+                    return mContext.getString(R.string.page_tab_title_summary);
+                case INDEX_SUPPORT_FRAGMENT:
+                    return mContext.getString(R.string.page_tab_title_support);
+            }
+            return super.getPageTitle(position);
+        }
+
+        @Override
+        public Fragment getItem(int position) {
+            switch (position) {
+                case INDEX_SUMMARY_FRAGMENT:
+                    return new DashboardSummary();
+                case INDEX_SUPPORT_FRAGMENT:
+                    return new SupportFragment();
+                default:
+                    throw new IllegalArgumentException(
+                            String.format(
+                                    "Position %d does not map to a valid dashboard fragment",
+                                    position));
+            }
+        }
+
+        @Override
+        public int getCount() {
+            return mSupportFeatureProvider == null ? 1 : 2;
+        }
+    }
+}
diff --git a/src/com/android/settings/dashboard/DashboardSummary.java b/src/com/android/settings/dashboard/DashboardSummary.java
index 66b3730..80054d0 100644
--- a/src/com/android/settings/dashboard/DashboardSummary.java
+++ b/src/com/android/settings/dashboard/DashboardSummary.java
@@ -21,13 +21,11 @@
 import android.support.v7.widget.LinearLayoutManager;
 import android.util.Log;
 import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
 import android.view.View;
 import android.view.ViewGroup;
+
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.MetricsProto.MetricsEvent;
-import com.android.settingslib.HelpUtils;
 import com.android.settings.InstrumentedFragment;
 import com.android.settings.R;
 import com.android.settings.Settings;
@@ -83,7 +81,6 @@
         List<DashboardCategory> categories =
                 ((SettingsActivity) getActivity()).getDashboardCategories();
         mSummaryLoader = new SummaryLoader(getActivity(), categories);
-        setHasOptionsMenu(true);
         Context context = getContext();
         mConditionManager = ConditionManager.get(context);
         mSuggestionParser = new SuggestionParser(context,
@@ -99,14 +96,6 @@
     }
 
     @Override
-    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
-        super.onCreateOptionsMenu(menu, inflater);
-        if (getActivity() == null) return;
-        HelpUtils.prepareHelpMenuItem(getActivity(), menu, R.string.help_uri_dashboard,
-                getClass().getName());
-    }
-
-    @Override
     public void onResume() {
         long startTime = System.currentTimeMillis();
         super.onResume();
diff --git a/src/com/android/settings/dashboard/SupportFragment.java b/src/com/android/settings/dashboard/SupportFragment.java
new file mode 100644
index 0000000..8a6c5a8
--- /dev/null
+++ b/src/com/android/settings/dashboard/SupportFragment.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.dashboard;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.accounts.OnAccountsUpdateListener;
+import android.app.Activity;
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkInfo;
+import android.net.NetworkRequest;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.android.settings.InstrumentedFragment;
+import com.android.settings.R;
+import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.overlay.SupportFeatureProvider;
+
+/**
+ * Fragment for support tab in SettingsGoogle.
+ */
+public final class SupportFragment extends InstrumentedFragment implements View.OnClickListener,
+        OnAccountsUpdateListener {
+
+    private final Handler mHandler = new Handler(Looper.getMainLooper());
+    private final ConnectivityManager.NetworkCallback mNetworkCallback =
+            new ConnectivityManager.NetworkCallback() {
+
+                @Override
+                public void onCapabilitiesChanged(Network network,
+                        NetworkCapabilities capabilities) {
+                    postConnectivityChanged();
+                }
+
+                @Override
+                public void onAvailable(Network network) {
+                    postConnectivityChanged();
+                }
+
+                @Override
+                public void onLost(Network network) {
+                    postConnectivityChanged();
+                }
+            };
+
+    private Activity mActivity;
+    private View mContent;
+    private RecyclerView mRecyclerView;
+    private SupportItemAdapter mSupportItemAdapter;
+    private AccountManager mAccountManager;
+    private SupportFeatureProvider mSupportFeatureProvider;
+    private ConnectivityManager mConnectivityManager;
+
+    @Override
+    protected int getMetricsCategory() {
+        return SUPPORT_FRAGMENT;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        mActivity = getActivity();
+        mAccountManager = AccountManager.get(mActivity);
+        mSupportFeatureProvider =
+                FeatureFactory.getFactory(mActivity).getSupportFeatureProvider(mActivity);
+        mSupportItemAdapter = new SupportItemAdapter(mActivity, mSupportFeatureProvider,
+                this /* itemClickListener */);
+        mConnectivityManager =
+                (ConnectivityManager) mActivity.getSystemService(Context.CONNECTIVITY_SERVICE);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        mContent = inflater.inflate(R.layout.support_fragment, container, false);
+        mRecyclerView = (RecyclerView) mContent.findViewById(R.id.support_items);
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(
+                getActivity(), LinearLayoutManager.VERTICAL, false /* reverseLayout */));
+        mRecyclerView.setAdapter(mSupportItemAdapter);
+        return mContent;
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        // Monitor account change.
+        mAccountManager.addOnAccountsUpdatedListener(
+                this /* listener */, null /* handler */, true /* updateImmediately */);
+        // Monitor connectivity
+        mConnectivityManager.registerNetworkCallback(
+                new NetworkRequest.Builder()
+                        .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
+                        .build(),
+                mNetworkCallback);
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        // Stop monitor account change.
+        mAccountManager.removeOnAccountsUpdatedListener(this /* listener */);
+        // Stop monitor connectivity.
+        mConnectivityManager.unregisterNetworkCallback(mNetworkCallback);
+    }
+
+    @Override
+    public void onAccountsUpdated(Account[] accounts) {
+        // Account changed, update support items.
+        mSupportItemAdapter.refreshData();
+    }
+
+    @Override
+    public void onClick(View v) {
+        final SupportItemAdapter.ViewHolder vh =
+                (SupportItemAdapter.ViewHolder) mRecyclerView.getChildViewHolder(v);
+        mSupportItemAdapter.onItemClicked(vh.getAdapterPosition());
+    }
+
+    private void postConnectivityChanged() {
+        mHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                if (mSupportItemAdapter != null) {
+                    mSupportItemAdapter.setHasInternet(hasInternet());
+                }
+            }
+        });
+    }
+
+    private boolean hasInternet() {
+        final NetworkInfo activeNetwork = mConnectivityManager.getActiveNetworkInfo();
+        return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
+    }
+}
diff --git a/src/com/android/settings/dashboard/SupportItemAdapter.java b/src/com/android/settings/dashboard/SupportItemAdapter.java
new file mode 100644
index 0000000..2d8f5dd
--- /dev/null
+++ b/src/com/android/settings/dashboard/SupportItemAdapter.java
@@ -0,0 +1,215 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.dashboard;
+
+import android.accounts.Account;
+import android.annotation.DrawableRes;
+import android.annotation.LayoutRes;
+import android.annotation.StringRes;
+import android.app.Activity;
+import android.content.Intent;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.android.settings.R;
+import com.android.settings.overlay.SupportFeatureProvider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.android.settings.overlay.SupportFeatureProvider.SupportType.CHAT;
+import static com.android.settings.overlay.SupportFeatureProvider.SupportType.EMAIL;
+import static com.android.settings.overlay.SupportFeatureProvider.SupportType.PHONE;
+
+/**
+ * Item adapter for support tiles.
+ */
+public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAdapter.ViewHolder> {
+
+    private static final String TAG = "SupportItemAdapter";
+
+    private static final int TYPE_TITLE = R.layout.support_item_title;
+    private static final int TYPE_SUBTITLE = R.layout.support_item_subtitle;
+    private static final int TYPE_ESCALATION_CARD = R.layout.support_escalation_card;
+    private static final int TYPE_SUPPORT_TILE = R.layout.support_tile;
+
+    private final Activity mActivity;
+    private final SupportFeatureProvider mSupportFeatureProvider;
+    private final View.OnClickListener mItemClickListener;
+    private final List<SupportData> mSupportData;
+
+    private boolean mHasInternet;
+
+    public SupportItemAdapter(Activity activity, SupportFeatureProvider supportFeatureProvider,
+            View.OnClickListener itemClickListener) {
+        mActivity = activity;
+        mSupportFeatureProvider = supportFeatureProvider;
+        mItemClickListener = itemClickListener;
+        mSupportData = new ArrayList<>();
+        // Optimistically assume we have Internet access. It will be updated later to correct value.
+        mHasInternet = true;
+        setHasStableIds(true);
+        refreshData();
+    }
+
+    @Override
+    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(
+                viewType, parent, false));
+    }
+
+    @Override
+    public void onBindViewHolder(ViewHolder holder, int position) {
+        final SupportData data = mSupportData.get(position);
+        if (holder.iconView != null) {
+            holder.iconView.setImageResource(data.icon);
+        }
+        if (holder.titleView != null) {
+            holder.titleView.setText(data.title);
+        }
+        if (holder.summaryView != null) {
+            holder.summaryView.setText(data.summary);
+        }
+        holder.itemView.setOnClickListener(mItemClickListener);
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        return mSupportData.get(position).type;
+    }
+
+    @Override
+    public int getItemCount() {
+        return mSupportData.size();
+    }
+
+    /**
+     * Called when a support item is clicked.
+     */
+    public void onItemClicked(int position) {
+        if (position >= 0 && position < mSupportData.size()) {
+            final SupportData data = mSupportData.get(position);
+            if (data.intent != null) {
+                mActivity.startActivityForResult(data.intent, 0);
+            }
+        }
+    }
+
+    public void setHasInternet(boolean hasInternet) {
+        if (mHasInternet != hasInternet) {
+            mHasInternet = hasInternet;
+            refreshData();
+        }
+    }
+
+    /**
+     * Create data for the adapter. If there is already data in the adapter, they will be
+     * destroyed and recreated.
+     */
+    public void refreshData() {
+        mSupportData.clear();
+        final Account[] accounts = mSupportFeatureProvider.getSupportEligibleAccounts(mActivity);
+        if (accounts.length == 0) {
+            Log.d(TAG, "Account unavailable. Skipping");
+        } else {
+            addEscalationCards(accounts[0]);
+        }
+        addMoreHelpItems();
+        notifyDataSetChanged();
+    }
+
+    private void addEscalationCards(Account account) {
+        if (mHasInternet) {
+            mSupportData.add(new SupportData(TYPE_TITLE, 0 /* icon */,
+                    R.string.support_escalation_title, R.string.support_escalation_summary,
+                    null /* intent */));
+        } else {
+            mSupportData.add(new SupportData(TYPE_TITLE, 0 /* icon */,
+                    R.string.support_offline_title, R.string.support_offline_summary,
+                    null /* intent */));
+        }
+        if (mSupportFeatureProvider.isSupportTypeEnabled(mActivity, PHONE)) {
+            mSupportData.add(new SupportData(TYPE_ESCALATION_CARD, R.drawable.ic_call_24dp,
+                    R.string.support_escalation_by_phone, 0 /* summary */,
+                    mSupportFeatureProvider.getSupportIntent(mActivity, account, PHONE)));
+        }
+        if (mSupportFeatureProvider.isSupportTypeEnabled(mActivity, EMAIL)) {
+            mSupportData.add(new SupportData(TYPE_ESCALATION_CARD, R.drawable.ic_mail_24dp,
+                    R.string.support_escalation_by_email, 0 /* summary */,
+                    mSupportFeatureProvider.getSupportIntent(mActivity, account, EMAIL)));
+        }
+        if (mSupportFeatureProvider.isSupportTypeEnabled(mActivity, CHAT)) {
+            mSupportData.add(new SupportData(TYPE_ESCALATION_CARD, R.drawable.ic_chat_24dp,
+                    R.string.support_escalation_by_chat, 0 /* summary */,
+                    mSupportFeatureProvider.getSupportIntent(mActivity, account, CHAT)));
+        }
+    }
+
+    private void addMoreHelpItems() {
+        mSupportData.add(new SupportData(TYPE_SUBTITLE, 0 /* icon */,
+                R.string.support_more_help_title, 0 /* summary */, null /* intent */));
+        mSupportData.add(new SupportData(TYPE_SUPPORT_TILE, R.drawable.ic_forum_24dp,
+                R.string.support_forum_title, 0 /* summary */,
+                mSupportFeatureProvider.getForumIntent()));
+        mSupportData.add(new SupportData(TYPE_SUPPORT_TILE, R.drawable.ic_help_24dp,
+                R.string.support_articles_title, 0 /* summary */, null /*intent */));
+        mSupportData.add(new SupportData(TYPE_SUPPORT_TILE, R.drawable.ic_feedback_24dp,
+                R.string.support_feedback_title, 0 /* summary */, null /*intent */));
+    }
+
+    /**
+     * {@link RecyclerView.ViewHolder} for support items.
+     */
+    static final class ViewHolder extends RecyclerView.ViewHolder {
+
+        final ImageView iconView;
+        final TextView titleView;
+        final TextView summaryView;
+
+        ViewHolder(View itemView) {
+            super(itemView);
+            iconView = (ImageView) itemView.findViewById(android.R.id.icon);
+            titleView = (TextView) itemView.findViewById(android.R.id.title);
+            summaryView = (TextView) itemView.findViewById(android.R.id.summary);
+        }
+    }
+
+    /**
+     * Data for a single support item.
+     */
+    private static final class SupportData {
+
+        final Intent intent;
+        @LayoutRes final int type;
+        @DrawableRes final int icon;
+        @StringRes final int title;
+        @StringRes final int summary;
+
+        SupportData(@LayoutRes int type, @DrawableRes int icon, @StringRes int title,
+                @StringRes int summary, Intent intent) {
+            this.type = type;
+            this.icon = icon;
+            this.title = title;
+            this.summary = summary;
+            this.intent = intent;
+        }
+    }
+}
diff --git a/src/com/android/settings/deletionhelper/AppDeletionPreference.java b/src/com/android/settings/deletionhelper/AppDeletionPreference.java
new file mode 100644
index 0000000..cb025ab
--- /dev/null
+++ b/src/com/android/settings/deletionhelper/AppDeletionPreference.java
@@ -0,0 +1,90 @@
+/*
+ * 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.deletionhelper;
+
+import android.content.Context;
+import android.support.v14.preference.SwitchPreference;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceViewHolder;
+import android.text.format.Formatter;
+import android.view.View;
+import android.widget.Switch;
+import android.widget.TextView;
+import com.android.settings.R;
+
+import com.android.settingslib.applications.ApplicationsState;
+import com.android.settingslib.applications.ApplicationsState.AppEntry;
+
+/**
+ * Preference item for an app with a switch to signify if it should be uninstalled.
+ * This shows the name and icon of the app along with the days since its last use.
+ */
+public class AppDeletionPreference extends SwitchPreference {
+    private AppEntry mEntry;
+    private Context mContext;
+
+    public AppDeletionPreference(Context context, AppEntry item, ApplicationsState state) {
+        super(context);
+        mEntry = item;
+        mContext = context;
+        setLayoutResource(com.android.settings.R.layout.preference_app);
+        setWidgetLayoutResource(R.layout.widget_text_views);
+
+        synchronized (item) {
+            state.ensureIcon(item);
+            if (item.icon != null)
+                setIcon(item.icon);
+            if (item.label != null)
+                setTitle(item.label);
+        }
+    }
+
+    @Override
+    public void onBindViewHolder(PreferenceViewHolder holder) {
+        super.onBindViewHolder(holder);
+        Switch switchWidget = (Switch) holder.findViewById(com.android.internal.R.id.switch_widget);
+        switchWidget.setVisibility(View.VISIBLE);
+
+        TextView summary = (TextView) holder.findViewById(R.id.widget_text1);
+        updateSummaryText(summary);
+    }
+
+    public String getPackageName() {
+        return mEntry.label;
+    }
+
+    private void updateSummaryText(TextView summary) {
+        if (mEntry.extraInfo == null) return;
+        if (mEntry.size == ApplicationsState.SIZE_UNKNOWN ||
+                mEntry.size == ApplicationsState.SIZE_INVALID) {
+            return;
+        }
+
+        long daysSinceLastUse = (long) mEntry.extraInfo;
+        String fileSize = Formatter.formatFileSize(mContext, mEntry.size);
+        if (daysSinceLastUse == AppStateUsageStatsBridge.NEVER_USED) {
+            summary.setText(mContext.getString(R.string.deletion_helper_app_summary_never_used,
+                    fileSize));
+        } else if (daysSinceLastUse == AppStateUsageStatsBridge.UNKNOWN_LAST_USE) {
+            summary.setText(mContext.getString(R.string.deletion_helper_app_summary_unknown_used,
+                    fileSize));
+        } else {
+            summary.setText(mContext.getString(R.string.deletion_helper_app_summary,
+                    fileSize,
+                    daysSinceLastUse));
+        }
+    }
+
+}
diff --git a/src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java b/src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java
new file mode 100644
index 0000000..013c801
--- /dev/null
+++ b/src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.deletionhelper;
+
+import android.app.usage.UsageStats;
+import android.app.usage.UsageStatsManager;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+
+import com.android.settings.applications.AppStateBaseBridge;
+import com.android.settingslib.applications.ApplicationsState;
+import com.android.settingslib.applications.ApplicationsState.AppEntry;
+import com.android.settingslib.applications.ApplicationsState.AppFilter;
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Connects data from the UsageStatsManager to the ApplicationsState.
+ */
+public class AppStateUsageStatsBridge extends AppStateBaseBridge {
+    private UsageStatsManager mUsageStatsManager;
+    public static final long NEVER_USED = -1;
+    public static final long UNKNOWN_LAST_USE = -2;
+
+    public AppStateUsageStatsBridge(Context context, ApplicationsState appState,
+                                    Callback callback) {
+        super(appState, callback);
+        mUsageStatsManager =
+                (UsageStatsManager) context.getSystemService(Context.USAGE_STATS_SERVICE);
+    }
+
+    @Override
+    protected void loadAllExtraInfo() {
+        ArrayList<AppEntry> apps = mAppSession.getAllApps();
+        if (apps == null) return;
+
+        final Map<String, UsageStats> map = mUsageStatsManager.queryAndAggregateUsageStats(0,
+                System.currentTimeMillis());
+        for (AppEntry entry : apps) {
+            UsageStats usageStats = map.get(entry.info.packageName);
+            entry.extraInfo = getDaysSinceLastUse(usageStats);
+        }
+    }
+
+    @Override
+    protected void updateExtraInfo(AppEntry app, String pkg, int uid) {
+        Map<String, UsageStats> map = mUsageStatsManager.queryAndAggregateUsageStats(0,
+                System.currentTimeMillis());
+        UsageStats usageStats = map.get(app.info.packageName);
+        app.extraInfo = getDaysSinceLastUse(usageStats);
+    }
+
+    private long getDaysSinceLastUse(UsageStats stats) {
+        if (stats == null) {
+            return NEVER_USED;
+        }
+        long lastUsed = stats.getLastTimeUsed();
+        // Sometimes, a usage is recorded without a time and we don't know when the use was.
+        if (lastUsed == 0) {
+            return UNKNOWN_LAST_USE;
+        }
+        return TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - lastUsed);
+
+    }
+
+    /**
+     * Filters only non-system apps which haven't been used in the last 60 days. If an app's last
+     * usage is unknown, it is skipped.
+     */
+    public static final AppFilter FILTER_USAGE_STATS = new AppFilter() {
+        private long UNUSED_DAYS_DELETION_THRESHOLD = 60;
+
+        @Override
+        public void init() {
+        }
+
+        @Override
+        public boolean filterApp(AppEntry info) {
+            if (info == null) return false;
+            boolean isBundled = (info.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
+            return isExtraInfoValid(info.extraInfo) && !isBundled;
+        }
+
+        private boolean isExtraInfoValid(Object extraInfo) {
+            if (extraInfo == null || !(extraInfo instanceof Long)) {
+                return false;
+            }
+
+            long daysSinceLastUse = (long) extraInfo;
+            return daysSinceLastUse >= UNUSED_DAYS_DELETION_THRESHOLD ||
+                    daysSinceLastUse == NEVER_USED;
+        }
+    };
+}
diff --git a/src/com/android/settings/deletionhelper/DeletionHelperFragment.java b/src/com/android/settings/deletionhelper/DeletionHelperFragment.java
new file mode 100644
index 0000000..8871adb
--- /dev/null
+++ b/src/com/android/settings/deletionhelper/DeletionHelperFragment.java
@@ -0,0 +1,263 @@
+package com.android.settings.deletionhelper;
+
+import android.os.Bundle;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceGroup;
+import android.text.format.Formatter;
+import android.util.ArraySet;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CompoundButton;
+import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.R;
+import com.android.internal.logging.MetricsProto.MetricsEvent;
+import com.android.settings.applications.AppStateBaseBridge;
+import com.android.settings.deletionhelper.AppStateUsageStatsBridge;
+import com.android.settings.deletionhelper.AppDeletionPreference;
+import com.android.settingslib.applications.ApplicationsState;
+import com.android.settingslib.applications.ApplicationsState.AppEntry;
+import com.android.settingslib.applications.ApplicationsState.Callbacks;
+import com.android.settingslib.applications.ApplicationsState.Session;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashSet;
+
+/**
+ * Settings screen for the deletion helper, which manually removes data which is not recently used.
+ */
+public class DeletionHelperFragment extends SettingsPreferenceFragment implements
+        ApplicationsState.Callbacks, AppStateBaseBridge.Callback, Preference.OnPreferenceChangeListener {
+    private static final String TAG = "DeletionHelperFragment";
+
+    private static final String EXTRA_HAS_BRIDGE = "hasBridge";
+    private static final String EXTRA_HAS_SIZES = "hasSizes";
+    private static final String EXTRA_CHECKED_SET = "checkedSet";
+
+    private static final String KEY_APPS_GROUP = "apps_group";
+
+    private Button mCancel, mFree;
+    private PreferenceGroup mApps;
+
+    private ApplicationsState mState;
+    private Session mSession;
+    private HashSet<String> mUncheckedApplications;
+    private AppStateUsageStatsBridge mDataUsageBridge;
+    private ArrayList<AppEntry> mAppEntries;
+    private boolean mHasReceivedAppEntries, mHasReceivedBridgeCallback, mFinishedLoading;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        mState = ApplicationsState.getInstance(getActivity().getApplication());
+        mSession = mState.newSession(this);
+        mUncheckedApplications = new HashSet<>();
+        mDataUsageBridge = new AppStateUsageStatsBridge(getActivity(), mState, this);
+
+        addPreferencesFromResource(R.xml.deletion_helper_list);
+        mApps = (PreferenceGroup) findPreference(KEY_APPS_GROUP);
+
+        if (savedInstanceState != null) {
+            mHasReceivedAppEntries =
+                    savedInstanceState.getBoolean(EXTRA_HAS_SIZES, false);
+            mHasReceivedBridgeCallback =
+                    savedInstanceState.getBoolean(EXTRA_HAS_BRIDGE, false);
+            mUncheckedApplications =
+                    (HashSet<String>) savedInstanceState.getSerializable(EXTRA_CHECKED_SET);
+        }
+    }
+
+    private void initializeButtons(View v) {
+        mCancel = (Button) v.findViewById(R.id.back_button);
+        mCancel.setText(R.string.cancel);
+        mCancel.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                finishFragment();
+            }
+        });
+
+        mFree = (Button) v.findViewById(R.id.next_button);
+        mFree.setText(R.string.storage_menu_free);
+        mFree.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                ArraySet<String> apps = new ArraySet<>();
+                for (AppEntry entry : mAppEntries) {
+                    if (!mUncheckedApplications.contains(entry.label)) {
+                        synchronized (entry) {
+                            apps.add(entry.info.packageName);
+                        }
+                    }
+                }
+                // TODO: If needed, add an action on the callback.
+                PackageDeletionTask task = new PackageDeletionTask(
+                        getActivity().getPackageManager(), apps,
+                        new PackageDeletionTask.Callback() {
+                            @Override
+                            public void onSuccess() {
+                            }
+
+                            @Override
+                            public void onError() {
+                                Log.e(TAG, "An error occurred while uninstalling packages.");
+                            }
+                        });
+                finishFragment();
+                task.run();
+            }
+        });
+    }
+
+    @Override
+    public void onViewCreated(View v, Bundle savedInstanceState) {
+        super.onViewCreated(v, savedInstanceState);
+        initializeButtons(v);
+        setLoading(true, false);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        mSession.resume();
+        mDataUsageBridge.resume();
+    }
+
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putBoolean(EXTRA_HAS_SIZES, mHasReceivedAppEntries);
+        outState.putBoolean(EXTRA_HAS_BRIDGE, mHasReceivedBridgeCallback);
+        outState.putSerializable(EXTRA_CHECKED_SET, mUncheckedApplications);
+    }
+
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        mDataUsageBridge.pause();
+        mSession.pause();
+    }
+
+    private void rebuild() {
+        // Only rebuild if we have the packages and their usage stats.
+        if (!mHasReceivedBridgeCallback || !mHasReceivedAppEntries) {
+            return;
+        }
+
+        final ArrayList<AppEntry> apps =
+                mSession.rebuild(AppStateUsageStatsBridge.FILTER_USAGE_STATS,
+                        ApplicationsState.SIZE_COMPARATOR);
+        if (apps == null) return;
+        mAppEntries = apps;
+        cacheRemoveAllPrefs(mApps);
+        int entryCount = apps.size();
+        for (int i = 0; i < entryCount; i++) {
+            AppEntry entry = apps.get(i);
+            final String packageName = entry.label;
+            AppDeletionPreference preference = (AppDeletionPreference) getCachedPreference(entry.label);
+            if (preference == null) {
+                preference = new AppDeletionPreference(getActivity(), entry,
+                        mState);
+                preference.setKey(packageName);
+                preference.setChecked(!mUncheckedApplications.contains(packageName));
+                preference.setOnPreferenceChangeListener(this);
+                mApps.addPreference(preference);
+            }
+            preference.setOrder(i);
+        }
+        removeCachedPrefs(mApps);
+
+        // All applications should be filled in if we've received the sizes.
+        // setLoading being called multiple times causes flickering, so we only do it once.
+        if (mHasReceivedAppEntries && !mFinishedLoading) {
+            mFinishedLoading = true;
+            setLoading(false, true);
+            getButtonBar().setVisibility(View.VISIBLE);
+        }
+        updateFreeButtonText();
+    }
+
+    private void updateFreeButtonText() {
+        mFree.setText(String.format(getActivity().getString(R.string.deletion_helper_free_button),
+                Formatter.formatFileSize(getActivity(), getTotalFreeableSpace())));
+    }
+
+    @Override
+    public void onRunningStateChanged(boolean running) {
+        // No-op.
+    }
+
+    @Override
+    public void onPackageListChanged() {
+        rebuild();
+    }
+
+    @Override
+    public void onRebuildComplete(ArrayList<AppEntry> apps) {
+    }
+
+    @Override
+    public void onPackageIconChanged() {
+    }
+
+    @Override
+    public void onPackageSizeChanged(String packageName) {
+        rebuild();
+    }
+
+    @Override
+    public void onAllSizesComputed() {
+        rebuild();
+    }
+
+    @Override
+    public void onLauncherInfoChanged() {
+    }
+
+    @Override
+    public void onLoadEntriesCompleted() {
+        mHasReceivedAppEntries = true;
+        rebuild();
+    }
+
+    @Override
+    public void onExtraInfoUpdated() {
+        mHasReceivedBridgeCallback = true;
+        rebuild();
+    }
+
+    @Override
+    protected int getMetricsCategory() {
+        return MetricsEvent.DEVICEINFO_STORAGE;
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        boolean checked = (boolean) newValue;
+        String packageName = ((AppDeletionPreference) preference).getPackageName();
+        if (checked) {
+            mUncheckedApplications.remove(packageName);
+        } else {
+            mUncheckedApplications.add(packageName);
+        }
+        updateFreeButtonText();
+        return true;
+    }
+
+    private long getTotalFreeableSpace() {
+        long freeableSpace = 0;
+        for (int i = 0; i < mAppEntries.size(); i++) {
+            final AppEntry entry = mAppEntries.get(i);
+            if (!mUncheckedApplications.contains(entry.label)) {
+                freeableSpace += mAppEntries.get(i).size;
+            }
+        }
+        return freeableSpace;
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/settings/deletionhelper/PackageDeletionTask.java b/src/com/android/settings/deletionhelper/PackageDeletionTask.java
new file mode 100644
index 0000000..69e6a6c
--- /dev/null
+++ b/src/com/android/settings/deletionhelper/PackageDeletionTask.java
@@ -0,0 +1,58 @@
+package com.android.settings.deletionhelper;
+
+import android.content.pm.IPackageDeleteObserver;
+import android.content.pm.PackageManager;
+import android.os.UserHandle;
+
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Deletes a specified set of apps as a specified user and calls back once done.
+ */
+public class PackageDeletionTask {
+    private Set<String> mPackages;
+    private Callback mCallback;
+    private PackageManager mPm;
+    private UserHandle mUser;
+
+    public PackageDeletionTask(PackageManager pm, Set<String> packageNames, Callback callback) {
+        mPackages = packageNames;
+        mCallback = callback;
+        mPm = pm;
+        mUser = android.os.Process.myUserHandle();
+    }
+
+    public void run() {
+        PackageDeletionObserver observer = new PackageDeletionObserver(mPackages.size());
+        for (String packageName : mPackages) {
+            mPm.deletePackageAsUser(packageName, observer, 0, mUser.getIdentifier());
+        }
+    }
+
+    private class PackageDeletionObserver extends IPackageDeleteObserver.Stub {
+        private final AtomicInteger mPackagesRemaining = new AtomicInteger(0);
+
+        public PackageDeletionObserver(int packages) {
+            mPackagesRemaining.set(packages);
+        }
+
+        @Override
+        public void packageDeleted(String packageName, int returnCode) {
+            if (returnCode != PackageManager.DELETE_SUCCEEDED) {
+                mCallback.onError();
+                return;
+            }
+
+            int remaining = mPackagesRemaining.decrementAndGet();
+            if (remaining == 0) {
+                mCallback.onSuccess();
+            }
+        }
+    }
+
+    public static abstract class Callback {
+        public abstract void onSuccess();
+        public abstract void onError();
+    }
+}
diff --git a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
index 66026eb..c81ec53 100644
--- a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
+++ b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
@@ -58,6 +58,7 @@
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.Utils;
 import com.android.settings.applications.ManageApplications;
+import com.android.settings.deletionhelper.DeletionHelperFragment;
 import com.android.settings.deviceinfo.StorageSettings.MountTask;
 import com.android.settingslib.deviceinfo.StorageMeasurement;
 import com.android.settingslib.deviceinfo.StorageMeasurement.MeasurementDetails;
@@ -361,6 +362,7 @@
         final MenuItem unmount = menu.findItem(R.id.storage_unmount);
         final MenuItem format = menu.findItem(R.id.storage_format);
         final MenuItem migrate = menu.findItem(R.id.storage_migrate);
+        final MenuItem manage = menu.findItem(R.id.storage_free);
 
         // Actions live in menu for non-internal private volumes; they're shown
         // as preference items for public volumes.
@@ -369,11 +371,13 @@
             mount.setVisible(false);
             unmount.setVisible(false);
             format.setVisible(false);
+            manage.setVisible(true);
         } else {
             rename.setVisible(mVolume.getType() == VolumeInfo.TYPE_PRIVATE);
             mount.setVisible(mVolume.getState() == VolumeInfo.STATE_UNMOUNTED);
             unmount.setVisible(mVolume.isMountedReadable());
             format.setVisible(true);
+            manage.setVisible(false);
         }
 
         format.setTitle(R.string.storage_menu_format_public);
@@ -412,6 +416,10 @@
                 intent.putExtra(VolumeInfo.EXTRA_VOLUME_ID, mVolume.getId());
                 startActivity(intent);
                 return true;
+            case R.id.storage_free:
+                startFragment(this, DeletionHelperFragment.class.getCanonicalName(),
+                        R.string.deletion_helper_title, 0, args);
+                return true;
         }
         return super.onOptionsItemSelected(item);
     }
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollBase.java b/src/com/android/settings/fingerprint/FingerprintEnrollBase.java
index 150a01a..2aef37b 100644
--- a/src/com/android/settings/fingerprint/FingerprintEnrollBase.java
+++ b/src/com/android/settings/fingerprint/FingerprintEnrollBase.java
@@ -23,15 +23,13 @@
 import android.os.UserHandle;
 import android.text.TextUtils;
 import android.view.View;
-import android.view.WindowManager;
 import android.widget.Button;
 import android.widget.TextView;
 
 import com.android.settings.ChooseLockSettingsHelper;
 import com.android.settings.InstrumentedActivity;
 import com.android.settings.R;
-import com.android.setupwizardlib.SetupWizardLayout;
-import com.android.setupwizardlib.view.NavigationBar;
+import com.android.setupwizardlib.GlifLayout;
 
 /**
  * Base activity for all fingerprint enrollment steps.
@@ -71,38 +69,26 @@
     }
 
     protected void initViews() {
-        getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
-                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
-                WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
-
-        getWindow().getDecorView().setSystemUiVisibility(
-                View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
-
         getWindow().setStatusBarColor(Color.TRANSPARENT);
-        getNavigationBar().setVisibility(View.GONE);
         Button nextButton = getNextButton();
         if (nextButton != null) {
             nextButton.setOnClickListener(this);
         }
     }
 
-    protected NavigationBar getNavigationBar() {
-        return (NavigationBar) findViewById(R.id.suw_layout_navigation_bar);
-    }
-
-    protected SetupWizardLayout getSetupWizardLayout() {
-        return (SetupWizardLayout) findViewById(R.id.setup_wizard_layout);
+    protected GlifLayout getLayout() {
+        return (GlifLayout) findViewById(R.id.setup_wizard_layout);
     }
 
     protected void setHeaderText(int resId, boolean force) {
-        TextView layoutTitle = getSetupWizardLayout().getHeaderTextView();
+        TextView layoutTitle = getLayout().getHeaderTextView();
         CharSequence previousTitle = layoutTitle.getText();
         CharSequence title = getText(resId);
         if (previousTitle != title || force) {
             if (!TextUtils.isEmpty(previousTitle)) {
                 layoutTitle.setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_POLITE);
             }
-            getSetupWizardLayout().setHeaderText(title);
+            getLayout().setHeaderText(title);
             setTitle(title);
         }
     }
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java b/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java
index d1bd3f7..a65d6a4 100644
--- a/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java
+++ b/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java
@@ -36,9 +36,9 @@
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.settings.ChooseLockGeneric;
 import com.android.settings.ChooseLockSettingsHelper;
-import com.android.settingslib.HelpUtils;
 import com.android.settings.R;
-import com.android.setupwizardlib.SetupWizardRecyclerLayout;
+import com.android.settingslib.HelpUtils;
+import com.android.setupwizardlib.GlifRecyclerLayout;
 import com.android.setupwizardlib.items.IItem;
 import com.android.setupwizardlib.items.Item;
 import com.android.setupwizardlib.items.RecyclerItemAdapter;
@@ -61,8 +61,7 @@
         super.onCreate(savedInstanceState);
         setContentView(R.layout.fingerprint_enroll_introduction);
         setHeaderText(R.string.security_settings_fingerprint_enroll_introduction_title);
-        final SetupWizardRecyclerLayout layout =
-                (SetupWizardRecyclerLayout) findViewById(R.id.setup_wizard_layout);
+        final GlifRecyclerLayout layout = (GlifRecyclerLayout) getLayout();
         mUserManager = UserManager.get(this);
         final RecyclerItemAdapter adapter = (RecyclerItemAdapter) layout.getAdapter();
         adapter.setOnItemSelectedListener(this);
@@ -125,8 +124,7 @@
     }
 
     protected Intent getFindSensorIntent() {
-        Intent intent = new Intent(this, FingerprintEnrollFindSensor.class);
-        return intent;
+        return new Intent(this, FingerprintEnrollFindSensor.class);
     }
 
     @Override
diff --git a/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java b/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java
index b037c2b..8bd495e 100644
--- a/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java
+++ b/src/com/android/settings/fingerprint/SetupFingerprintEnrollEnrolling.java
@@ -31,11 +31,8 @@
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.settings.R;
 import com.android.settings.SetupWizardUtils;
-import com.android.setupwizardlib.util.SystemBarHelper;
-import com.android.setupwizardlib.view.NavigationBar;
 
-public class SetupFingerprintEnrollEnrolling extends FingerprintEnrollEnrolling
-        implements NavigationBar.NavigationBarListener {
+public class SetupFingerprintEnrollEnrolling extends FingerprintEnrollEnrolling {
 
     private static final String TAG_DIALOG = "dialog";
 
@@ -54,32 +51,21 @@
 
     @Override
     protected void initViews() {
-        SetupWizardUtils.setImmersiveMode(this);
+        super.initViews();
+        final Button skipButton = (Button) findViewById(R.id.skip_button);
+        skipButton.setVisibility(View.VISIBLE);
+        skipButton.setOnClickListener(this);
+    }
 
-        final View buttonBar = findViewById(R.id.button_bar);
-        if (buttonBar != null) {
-            buttonBar.setVisibility(View.GONE);
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.skip_button:
+                new SkipDialog().show(getFragmentManager(), TAG_DIALOG);
+                break;
+            default:
+                super.onClick(v);
         }
-
-        final NavigationBar navigationBar = getNavigationBar();
-        navigationBar.setNavigationBarListener(this);
-        navigationBar.getNextButton().setText(R.string.skip_label);
-        navigationBar.getBackButton().setVisibility(View.GONE);
-    }
-
-    @Override
-    protected Button getNextButton() {
-        return getNavigationBar().getNextButton();
-    }
-
-    @Override
-    public void onNavigateBack() {
-        onBackPressed();
-    }
-
-    @Override
-    public void onNavigateNext() {
-        new SkipDialog().show(getFragmentManager(), TAG_DIALOG);
     }
 
     @Override
@@ -102,7 +88,7 @@
 
         @Override
         public Dialog onCreateDialog(Bundle savedInstanceState) {
-            final AlertDialog dialog = new AlertDialog.Builder(getActivity())
+            return new AlertDialog.Builder(getActivity())
                     .setTitle(R.string.setup_fingerprint_enroll_enrolling_skip_title)
                     .setMessage(R.string.setup_fingerprint_enroll_enrolling_skip_message)
                     .setCancelable(false)
@@ -124,8 +110,6 @@
                                 }
                             })
                     .create();
-            SystemBarHelper.hideSystemBars(dialog);
-            return dialog;
         }
     }
 }
diff --git a/src/com/android/settings/fingerprint/SetupFingerprintEnrollFindSensor.java b/src/com/android/settings/fingerprint/SetupFingerprintEnrollFindSensor.java
index 9cf5369..bb78477 100644
--- a/src/com/android/settings/fingerprint/SetupFingerprintEnrollFindSensor.java
+++ b/src/com/android/settings/fingerprint/SetupFingerprintEnrollFindSensor.java
@@ -19,17 +19,13 @@
 import android.content.Intent;
 import android.content.res.Resources;
 import android.os.UserHandle;
-import android.view.View;
-import android.widget.Button;
 
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.settings.ChooseLockSettingsHelper;
 import com.android.settings.R;
 import com.android.settings.SetupWizardUtils;
-import com.android.setupwizardlib.view.NavigationBar;
 
-public class SetupFingerprintEnrollFindSensor extends FingerprintEnrollFindSensor
-        implements NavigationBar.NavigationBarListener {
+public class SetupFingerprintEnrollFindSensor extends FingerprintEnrollFindSensor {
 
     @Override
     protected int getContentView() {
@@ -54,34 +50,6 @@
     }
 
     @Override
-    protected void initViews() {
-        SetupWizardUtils.setImmersiveMode(this);
-
-        final View nextButton = findViewById(R.id.next_button);
-        if (nextButton != null) {
-            nextButton.setVisibility(View.GONE);
-        }
-
-        getNavigationBar().setNavigationBarListener(this);
-        getNavigationBar().getBackButton().setVisibility(View.GONE);
-    }
-
-    @Override
-    protected Button getNextButton() {
-        return getNavigationBar().getNextButton();
-    }
-
-    @Override
-    public void onNavigateBack() {
-        onBackPressed();
-    }
-
-    @Override
-    public void onNavigateNext() {
-        onNextButtonClick();
-    }
-
-    @Override
     protected int getMetricsCategory() {
         return MetricsEvent.FINGERPRINT_FIND_SENSOR_SETUP;
     }
diff --git a/src/com/android/settings/fingerprint/SetupFingerprintEnrollFinish.java b/src/com/android/settings/fingerprint/SetupFingerprintEnrollFinish.java
index b17ed09..f6602f3 100644
--- a/src/com/android/settings/fingerprint/SetupFingerprintEnrollFinish.java
+++ b/src/com/android/settings/fingerprint/SetupFingerprintEnrollFinish.java
@@ -20,17 +20,14 @@
 import android.content.res.Resources;
 import android.os.UserHandle;
 import android.view.View;
-import android.widget.Button;
 import android.widget.TextView;
 
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.settings.ChooseLockSettingsHelper;
 import com.android.settings.R;
 import com.android.settings.SetupWizardUtils;
-import com.android.setupwizardlib.view.NavigationBar;
 
-public class SetupFingerprintEnrollFinish extends FingerprintEnrollFinish
-        implements NavigationBar.NavigationBarListener {
+public class SetupFingerprintEnrollFinish extends FingerprintEnrollFinish {
 
     @Override
     protected Intent getEnrollingIntent() {
@@ -51,16 +48,7 @@
 
     @Override
     protected void initViews() {
-        SetupWizardUtils.setImmersiveMode(this);
-
-        final View nextButton = findViewById(R.id.next_button);
-        if (nextButton != null) {
-            nextButton.setVisibility(View.GONE);
-        }
-
-        final NavigationBar navigationBar = getNavigationBar();
-        navigationBar.setNavigationBarListener(this);
-        navigationBar.getBackButton().setVisibility(View.GONE);
+        super.initViews();
 
         final TextView message = (TextView) findViewById(R.id.message);
         message.setText(R.string.setup_fingerprint_enroll_finish_message);
@@ -70,21 +58,6 @@
     }
 
     @Override
-    protected Button getNextButton() {
-        return getNavigationBar().getNextButton();
-    }
-
-    @Override
-    public void onNavigateBack() {
-        onBackPressed();
-    }
-
-    @Override
-    public void onNavigateNext() {
-        onNextButtonClick();
-    }
-
-    @Override
     protected int getMetricsCategory() {
         return MetricsEvent.FINGERPRINT_ENROLL_FINISH_SETUP;
     }
diff --git a/src/com/android/settings/fingerprint/SetupFingerprintEnrollIntroduction.java b/src/com/android/settings/fingerprint/SetupFingerprintEnrollIntroduction.java
index f816682..51b84a9 100644
--- a/src/com/android/settings/fingerprint/SetupFingerprintEnrollIntroduction.java
+++ b/src/com/android/settings/fingerprint/SetupFingerprintEnrollIntroduction.java
@@ -19,20 +19,17 @@
 import android.content.Intent;
 import android.content.res.Resources;
 import android.os.UserHandle;
-import android.widget.Button;
 
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.R;
 import com.android.settings.SetupChooseLockGeneric;
 import com.android.settings.SetupWizardUtils;
-import com.android.setupwizardlib.SetupWizardRecyclerLayout;
+import com.android.setupwizardlib.GlifRecyclerLayout;
 import com.android.setupwizardlib.items.Item;
 import com.android.setupwizardlib.items.RecyclerItemAdapter;
-import com.android.setupwizardlib.view.NavigationBar;
 
-public class SetupFingerprintEnrollIntroduction extends FingerprintEnrollIntroduction
-        implements NavigationBar.NavigationBarListener {
+public class SetupFingerprintEnrollIntroduction extends FingerprintEnrollIntroduction {
 
     @Override
     protected Intent getChooseLockIntent() {
@@ -56,8 +53,7 @@
 
     @Override
     protected void initViews() {
-        final SetupWizardRecyclerLayout layout =
-                (SetupWizardRecyclerLayout) findViewById(R.id.setup_wizard_layout);
+        GlifRecyclerLayout layout = (GlifRecyclerLayout) getLayout();
         final RecyclerItemAdapter adapter = (RecyclerItemAdapter) layout.getAdapter();
         final Item nextItem = (Item) adapter.findItemById(R.id.next_button);
         nextItem.setTitle(
@@ -67,13 +63,8 @@
         cancelItem.setTitle(
                 getText(R.string.security_settings_fingerprint_enroll_introduction_cancel_setup));
 
-        SetupWizardUtils.setImmersiveMode(this);
-        getNavigationBar().setNavigationBarListener(this);
-        Button nextButton = getNavigationBar().getNextButton();
-        nextButton.setText(null);
-        nextButton.setEnabled(false);
         layout.setDividerInset(getResources().getDimensionPixelSize(
-                R.dimen.suw_items_icon_divider_inset));
+                R.dimen.suw_items_glif_icon_divider_inset));
     }
 
     @Override
@@ -98,16 +89,6 @@
     }
 
     @Override
-    public void onNavigateBack() {
-        onBackPressed();
-    }
-
-    @Override
-    public void onNavigateNext() {
-        // next is handled via the onNextButtonClick method in FingerprintEnrollIntroduction
-    }
-
-    @Override
     protected int getMetricsCategory() {
         return MetricsEvent.FINGERPRINT_ENROLL_INTRO_SETUP;
     }
diff --git a/src/com/android/settings/fingerprint/SetupSkipDialog.java b/src/com/android/settings/fingerprint/SetupSkipDialog.java
index 11e6936..c6e04d7 100644
--- a/src/com/android/settings/fingerprint/SetupSkipDialog.java
+++ b/src/com/android/settings/fingerprint/SetupSkipDialog.java
@@ -22,17 +22,10 @@
 import android.app.DialogFragment;
 import android.app.FragmentManager;
 import android.content.DialogInterface;
-import android.os.Build.VERSION;
-import android.os.Build.VERSION_CODES;
 import android.os.Bundle;
-import android.os.Handler;
 import android.support.annotation.NonNull;
-import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
 
 import com.android.settings.R;
-import com.android.setupwizardlib.util.SystemBarHelper;
 
 public class SetupSkipDialog extends DialogFragment implements DialogInterface.OnClickListener {
 
@@ -52,10 +45,7 @@
 
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
-        final AlertDialog dialog = onCreateDialogBuilder().create();
-        // hide system status bar.
-        SystemBarHelper.hideSystemBars(dialog);
-        return dialog;
+        return onCreateDialogBuilder().create();
     }
 
     @NonNull
diff --git a/src/com/android/settings/overlay/FeatureFactory.java b/src/com/android/settings/overlay/FeatureFactory.java
new file mode 100644
index 0000000..1bffc2b
--- /dev/null
+++ b/src/com/android/settings/overlay/FeatureFactory.java
@@ -0,0 +1,69 @@
+/*
+ * 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.overlay;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.settings.R;
+
+/**
+ * Abstract class for creating feature controllers. Allows OEM implementations to define their own
+ * factories with their own controllers containing whatever code is needed to implement
+ * the features. To provide a factory implementation, implementors should override
+ * {@link R.string#config_featureFactory} in their override.
+ */
+public abstract class FeatureFactory {
+    private static final String LOG_TAG = "FeatureFactory";
+    private static final boolean DEBUG = false;
+
+    private static FeatureFactory sFactory;
+
+    /**
+     * Returns a factory for creating feature controllers. Creates the factory if it does not
+     * already exist. Uses the value of {@link R.string#config_featureFactory} to instantiate
+     * a factory implementation.
+     */
+    public static FeatureFactory getFactory(Context context) {
+        if (sFactory != null) {
+            return sFactory;
+        }
+
+        if (DEBUG) Log.d(LOG_TAG, "getFactory");
+        final String clsName = context.getString(R.string.config_featureFactory);
+        if (TextUtils.isEmpty(clsName)) {
+            throw new UnsupportedOperationException("No feature factory configured");
+        }
+        try {
+            sFactory = (FeatureFactory) context.getClassLoader().loadClass(clsName).newInstance();
+        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
+            throw new FactoryNotFoundException(e);
+        }
+
+        if (DEBUG) Log.d(LOG_TAG, "started " + sFactory.getClass().getSimpleName());
+        return sFactory;
+    }
+
+    public abstract SupportFeatureProvider getSupportFeatureProvider(Context context);
+
+    public static final class FactoryNotFoundException extends RuntimeException {
+        public FactoryNotFoundException(Throwable throwable) {
+            super("Unable to create factory. Did you misconfigure Proguard?", throwable);
+        }
+    }
+}
diff --git a/src/com/android/settings/overlay/FeatureFactoryImpl.java b/src/com/android/settings/overlay/FeatureFactoryImpl.java
new file mode 100644
index 0000000..ce561f3
--- /dev/null
+++ b/src/com/android/settings/overlay/FeatureFactoryImpl.java
@@ -0,0 +1,31 @@
+/*
+ * 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.overlay;
+
+import android.content.Context;
+
+/**
+ * {@link FeatureFactory} implementation for AOSP Settings.
+ */
+public final class FeatureFactoryImpl extends FeatureFactory {
+
+    @Override
+    public SupportFeatureProvider getSupportFeatureProvider(Context context) {
+        return null;
+    }
+
+}
diff --git a/src/com/android/settings/overlay/SupportFeatureProvider.java b/src/com/android/settings/overlay/SupportFeatureProvider.java
new file mode 100644
index 0000000..299eaad
--- /dev/null
+++ b/src/com/android/settings/overlay/SupportFeatureProvider.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.overlay;
+
+import android.accounts.Account;
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.content.Context;
+import android.content.Intent;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Feature provider for support tab.
+ */
+public interface SupportFeatureProvider {
+
+    @IntDef({SupportType.EMAIL, SupportType.PHONE, SupportType.CHAT})
+    @Retention(RetentionPolicy.SOURCE)
+    @interface SupportType {
+        int EMAIL = 1;
+        int PHONE = 2;
+        int CHAT = 3;
+    }
+
+    /**
+     * Returns a intent that will open help forum.
+     */
+    Intent getForumIntent();
+
+    /**
+     * Whether or not a support type is enabled.
+     */
+    boolean isSupportTypeEnabled(Context context, @SupportType int type);
+
+    /**
+     * Returns an {@link Account} that's eligible for support options.
+     */
+    @NonNull
+    Account[] getSupportEligibleAccounts(Context context);
+
+    /**
+     * Returns an {@link Intent} that opens email support for specified account.
+     *
+     * @param context A UI Context
+     * @param account A account returned by {@link #getSupportEligibleAccounts}
+     * @param type The type of support account needs.
+     */
+    Intent getSupportIntent(Context context, Account account, @SupportType int type);
+
+}
diff --git a/src/com/android/settings/widget/SlidingTabLayout.java b/src/com/android/settings/widget/SlidingTabLayout.java
new file mode 100644
index 0000000..176bebc
--- /dev/null
+++ b/src/com/android/settings/widget/SlidingTabLayout.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.widget;
+
+import android.content.Context;
+import android.support.v4.view.PagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.android.settings.R;
+
+/**
+ * To be used with ViewPager to provide a tab indicator component which give constant feedback as
+ * to the user's scroll progress.
+ */
+public final class SlidingTabLayout extends FrameLayout implements View.OnClickListener {
+
+    private final LinearLayout mTitleView;
+    private final View mIndicatorView;
+    private final LayoutInflater mLayoutInflater;
+
+    private ViewPager mViewPager;
+    private int mSelectedPosition;
+    private float mSelectionOffset;
+
+    public SlidingTabLayout(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        mLayoutInflater = LayoutInflater.from(context);
+        mTitleView = new LinearLayout(context);
+        mTitleView.setGravity(Gravity.CENTER_HORIZONTAL);
+        mIndicatorView = mLayoutInflater.inflate(R.layout.sliding_tab_indicator_view, this, false);
+
+        addView(mTitleView, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
+        addView(mIndicatorView, mIndicatorView.getLayoutParams());
+    }
+
+    /**
+     * Sets the associated view pager. Note that the assumption here is that the pager content
+     * (number of tabs and tab titles) does not change after this call has been made.
+     */
+    public void setViewPager(ViewPager viewPager) {
+        mTitleView.removeAllViews();
+
+        mViewPager = viewPager;
+        if (viewPager != null) {
+            viewPager.addOnPageChangeListener(new InternalViewPagerListener());
+            populateTabStrip();
+        }
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+        final int titleCount = mTitleView.getChildCount();
+        if (titleCount > 0) {
+            final int width = MeasureSpec.makeMeasureSpec(
+                    mTitleView.getMeasuredWidth() / titleCount, MeasureSpec.EXACTLY);
+            final int height = MeasureSpec.makeMeasureSpec(
+                    mIndicatorView.getMeasuredHeight(), MeasureSpec.EXACTLY);
+            mIndicatorView.measure(width, height);
+        }
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        if (mTitleView.getChildCount() > 0) {
+            mTitleView.layout(0, 0, mTitleView.getMeasuredWidth(), mTitleView.getMeasuredHeight());
+            final int indicatorBottom = getMeasuredHeight();
+            final int indicatorHeight = mIndicatorView.getMeasuredHeight();
+            mIndicatorView.layout(0, indicatorBottom - indicatorHeight,
+                    mIndicatorView.getMeasuredWidth(), indicatorBottom);
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        final int titleCount = mTitleView.getChildCount();
+        for (int i = 0; i < titleCount; i++) {
+            if (v == mTitleView.getChildAt(i)) {
+                mViewPager.setCurrentItem(i);
+                return;
+            }
+        }
+    }
+
+    private void onViewPagerPageChanged(int position, float positionOffset) {
+        mSelectedPosition = position;
+        mSelectionOffset = positionOffset;
+        mIndicatorView.setTranslationX(getIndicatorLeft());
+    }
+
+    private void populateTabStrip() {
+        final PagerAdapter adapter = mViewPager.getAdapter();
+
+        for (int i = 0; i < adapter.getCount(); i++) {
+            final TextView tabTitleView = (TextView) mLayoutInflater.inflate(
+                    R.layout.sliding_tab_title_view, mTitleView, false);
+
+            tabTitleView.setText(adapter.getPageTitle(i));
+            tabTitleView.setOnClickListener(this);
+
+            mTitleView.addView(tabTitleView);
+            if (i == mViewPager.getCurrentItem()) {
+                tabTitleView.setSelected(true);
+            }
+        }
+    }
+
+    private int getIndicatorLeft() {
+        View selectedTitle = mTitleView.getChildAt(mSelectedPosition);
+        int left = selectedTitle.getLeft();
+        if (mSelectionOffset > 0f && mSelectedPosition < (getChildCount() - 1)) {
+            View nextTitle = mTitleView.getChildAt(mSelectedPosition + 1);
+            left = (int) (mSelectionOffset * nextTitle.getLeft()
+                    + (1.0f - mSelectionOffset) * left);
+        }
+        return left;
+    }
+
+    private final class InternalViewPagerListener implements ViewPager.OnPageChangeListener {
+        private int mScrollState;
+
+        @Override
+        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+            final int titleCount = mTitleView.getChildCount();
+            if ((titleCount == 0) || (position < 0) || (position >= titleCount)) {
+                return;
+            }
+            onViewPagerPageChanged(position, positionOffset);
+        }
+
+        @Override
+        public void onPageScrollStateChanged(int state) {
+            mScrollState = state;
+        }
+
+        @Override
+        public void onPageSelected(int position) {
+            if (mScrollState == ViewPager.SCROLL_STATE_IDLE) {
+                onViewPagerPageChanged(position, 0f);
+            }
+            final int titleCount = getChildCount();
+            for (int i = 0; i < titleCount; i++) {
+                getChildAt(i).setSelected(position == i);
+            }
+        }
+    }
+}
diff --git a/tests/unit/src/com/android/settings/deletionhelper/PackageDeletionTaskTest.java b/tests/unit/src/com/android/settings/deletionhelper/PackageDeletionTaskTest.java
new file mode 100644
index 0000000..10ba585
--- /dev/null
+++ b/tests/unit/src/com/android/settings/deletionhelper/PackageDeletionTaskTest.java
@@ -0,0 +1,120 @@
+/*
+ * 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.deletionhelper;
+
+import android.test.AndroidTestCase;
+import android.content.pm.IPackageDeleteObserver;
+import android.content.pm.PackageManager;
+import android.os.RemoteException;
+import android.test.mock.MockPackageManager;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.settings.deletionhelper.PackageDeletionTask;
+import com.android.settings.deletionhelper.PackageDeletionTask.Callback;
+
+import java.util.Set;
+import java.util.HashSet;
+
+public class PackageDeletionTaskTest extends AndroidTestCase {
+    private FakePackageManager mPackageManager;
+    private Set<String> mDeletedApps;
+
+    @Override
+    protected void setUp() throws Exception {
+        mPackageManager = new FakePackageManager();
+        mDeletedApps = new HashSet<String>();
+    }
+
+    @SmallTest
+    public void testDeleteNoApps() throws Exception {
+        runTask(new HashSet<String>(), false);
+    }
+
+    @SmallTest
+    public void testDeleteOneApp() throws Exception {
+        HashSet<String> appsToDelete = new HashSet<String>();
+        appsToDelete.add("app.test1");
+        runTask(appsToDelete, false);
+    }
+
+    @SmallTest
+    public void testDeleteManyApps() throws Exception {
+        HashSet<String> appsToDelete = new HashSet<String>();
+        appsToDelete.add("app.test1");
+        appsToDelete.add("app.test2");
+        runTask(appsToDelete, false);
+    }
+
+    @SmallTest
+    public void testDeleteFails() throws Exception {
+        HashSet<String> appsToDelete = new HashSet<String>();
+        appsToDelete.add("app.test1");
+        mPackageManager.deletionSucceeds = false;
+        runTask(appsToDelete, true);
+    }
+
+    private void runTask(HashSet<String> appsToDelete, boolean shouldFail) {
+        PackageDeletionTask task = new PackageDeletionTask(mPackageManager, appsToDelete,
+                new VerifierCallback(appsToDelete, shouldFail));
+        task.run();
+    }
+
+    class FakePackageManager extends MockPackageManager {
+        public boolean deletionSucceeds = true;
+
+        @Override
+        public void deletePackageAsUser(String packageName, IPackageDeleteObserver observer,
+                                        int flags, int userId) {
+            int resultCode;
+            if (deletionSucceeds) {
+                resultCode = PackageManager.DELETE_SUCCEEDED;
+                mDeletedApps.add(packageName);
+            } else {
+                resultCode = PackageManager.DELETE_FAILED_INTERNAL_ERROR;
+            }
+
+            try {
+                observer.packageDeleted(packageName, resultCode);
+            } catch (RemoteException e) {
+                fail(e.toString());
+            }
+        }
+    }
+
+    class VerifierCallback extends Callback {
+        private Set<String> mExpectedDeletedApps;
+        private boolean mShouldFail;
+
+        public VerifierCallback(HashSet<String> expectedDeletedApps, boolean shouldFail) {
+            mExpectedDeletedApps = expectedDeletedApps;
+            mShouldFail = shouldFail;
+        }
+
+        @Override
+        public void onSuccess() {
+            System.out.println("lol");
+            assertFalse(mShouldFail);
+            assertEquals(mExpectedDeletedApps, mDeletedApps);
+        }
+
+        @Override
+        public void onError() {
+            assertTrue(mShouldFail);
+        }
+    }
+
+}