Merge "Import translations. DO NOT MERGE" into oc-dev am: d67a6d7176  -s ours
am: 3f52ee79d7  -s ours

Change-Id: I02fddb1b1380320d4be87eed730a245d58fe3ba0
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index da88f76..7edb46c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1560,7 +1560,7 @@
         </activity>
 
         <activity android:name=".notification.RedactionInterstitial"
-            android:theme="@style/SetupWizardTheme.Light" />
+            android:theme="@style/GlifTheme.Light" />
 
         <activity android:name=".notification.RedactionSettingsStandalone"
                   android:exported="true">
@@ -1571,11 +1571,11 @@
         </activity>
 
         <activity android:name="ConfirmLockPattern"
-            android:theme="@style/SetupWizardTheme.Light"/>
+            android:theme="@style/GlifTheme.Light"/>
 
         <activity android:name="ConfirmLockPassword"
             android:windowSoftInputMode="stateHidden|adjustResize"
-            android:theme="@style/SetupWizardTheme.Light"/>
+            android:theme="@style/GlifTheme.Light"/>
 
         <activity
             android:name=".Settings$FingerprintSuggestionActivity"
@@ -1607,7 +1607,7 @@
         <activity android:name=".fingerprint.SetupFingerprintEnrollIntroduction"
             android:exported="true"
             android:permission="android.permission.MANAGE_FINGERPRINT"
-            android:theme="@style/SetupWizardTheme.Light">
+            android:theme="@style/GlifTheme.Light">
             <intent-filter>
                 <action android:name="android.settings.FINGERPRINT_SETUP" />
                 <category android:name="android.intent.category.DEFAULT" />
@@ -1617,17 +1617,17 @@
         <!-- Note this must not be exported since it returns the password in the intent -->
         <activity android:name="ConfirmLockPattern$InternalActivity"
             android:exported="false"
-            android:theme="@style/SetupWizardTheme.Light"/>
+            android:theme="@style/GlifTheme.Light"/>
 
         <!-- Note this must not be exported since it returns the password in the intent -->
         <activity android:name="ConfirmLockPassword$InternalActivity"
             android:exported="false"
             android:windowSoftInputMode="adjustResize"
-            android:theme="@style/SetupWizardTheme.Light"/>
+            android:theme="@style/GlifTheme.Light"/>
 
         <activity android:name="SetupChooseLockGeneric"
             android:taskAffinity="com.android.wizard"
-            android:theme="@style/SetupWizardTheme.Light"
+            android:theme="@style/GlifTheme.Light"
             android:label="@string/lock_settings_picker_title">
             <intent-filter android:priority="1">
                 <action android:name="com.android.settings.SETUP_LOCK_SCREEN" />
@@ -1690,30 +1690,30 @@
         <activity android:name="SetupChooseLockPattern"
             android:exported="false"
             android:taskAffinity="com.android.wizard"
-            android:theme="@style/SetupWizardTheme.Light" />
+            android:theme="@style/GlifTheme.Light" />
 
         <activity android:name="ChooseLockPattern"
             android:exported="false"
-            android:theme="@style/SetupWizardTheme.Light" />
+            android:theme="@style/GlifTheme.Light" />
 
         <activity android:name="SetupChooseLockPassword"
             android:exported="false"
             android:taskAffinity="com.android.wizard"
-            android:theme="@style/SetupWizardTheme.Light"
+            android:theme="@style/GlifTheme.Light"
             android:windowSoftInputMode="stateVisible|adjustResize" />
 
         <activity android:name="ChooseLockPassword"
             android:exported="false"
-            android:theme="@style/SetupWizardTheme.Light"
+            android:theme="@style/GlifTheme.Light"
             android:windowSoftInputMode="stateVisible|adjustResize"/>
 
         <activity android:name=".SetupEncryptionInterstitial"
             android:label="@string/encryption_interstitial_header"
             android:taskAffinity="com.android.wizard"
-            android:theme="@style/SetupWizardTheme.Light"/>
+            android:theme="@style/GlifTheme.Light"/>
 
         <activity android:name=".EncryptionInterstitial"
-            android:theme="@style/SetupWizardTheme.Light" />
+            android:theme="@style/GlifTheme.Light" />
 
         <activity android:name=".Settings$StatusActivity"
                 android:label="@string/device_status_activity_title"
diff --git a/res/drawable/ic_theaters_vd_theme_24.xml b/res/drawable/ic_theaters_vd_theme_24.xml
new file mode 100644
index 0000000..d0bad19
--- /dev/null
+++ b/res/drawable/ic_theaters_vd_theme_24.xml
@@ -0,0 +1,25 @@
+<!--
+    Copyright (C) 2017 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/colorControlNormal">
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M18,3v2h-2L16,3L8,3v2L6,5L6,3L4,3v18h2v-2h2v2h8v-2h2v2h2L20,3h-2zM8,17L6,17v-2h2v2zM8,13L6,13v-2h2v2zM8,9L6,9L6,7h2v2zM18,17h-2v-2h2v2zM18,13h-2v-2h2v2zM18,9h-2L16,7h2v2z"/>
+</vector>
\ No newline at end of file
diff --git a/res/drawable/selectable_card.xml b/res/drawable/selectable_card.xml
new file mode 100644
index 0000000..9c19877
--- /dev/null
+++ b/res/drawable/selectable_card.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.
+-->
+
+<ripple
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:color="?android:attr/colorControlHighlight">
+    <item android:drawable="?android:attr/colorBackground"/>
+</ripple>
diff --git a/res/layout/choose_lock_password.xml b/res/layout/choose_lock_password.xml
index 260db7f..0888b5e 100644
--- a/res/layout/choose_lock_password.xml
+++ b/res/layout/choose_lock_password.xml
@@ -20,6 +20,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:icon="@drawable/ic_lock"
+    settings:suwFooter="@layout/choose_lock_password_footer"
     settings:suwHeaderText="@string/lockpassword_choose_your_password_header">
 
     <LinearLayout
@@ -65,33 +66,6 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"/>
 
-            <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" />
-
-                <Space
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    android:layout_weight="1" />
-
-                <!-- 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>
         </LinearLayout>
     </LinearLayout>
 
diff --git a/res/layout/choose_lock_password_footer.xml b/res/layout/choose_lock_password_footer.xml
new file mode 100644
index 0000000..57be320
--- /dev/null
+++ b/res/layout/choose_lock_password_footer.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2017 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.
+-->
+
+<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/SuwGlifButtonBar"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <!-- left : cancel -->
+    <Button android:id="@+id/cancel_button"
+        style="@style/SuwGlifButton.Secondary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/lockpassword_cancel_label" />
+
+    <Space
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_weight="1" />
+
+    <!-- right : continue -->
+    <Button android:id="@+id/next_button"
+        style="@style/SuwGlifButton.Primary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/lockpassword_continue_label" />
+
+</LinearLayout>
diff --git a/res/layout/choose_lock_pattern_common.xml b/res/layout/choose_lock_pattern_common.xml
index 050479b..a54987d 100644
--- a/res/layout/choose_lock_pattern_common.xml
+++ b/res/layout/choose_lock_pattern_common.xml
@@ -22,6 +22,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:icon="@drawable/ic_lock"
+    settings:suwFooter="@layout/choose_lock_pattern_common_footer"
     settings:suwHeaderText="@string/lockpassword_choose_your_pattern_header">
 
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
@@ -56,35 +57,6 @@
                 android:layout_height="0dip"
                 android:layout_weight="4" />
 
-            <!-- 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:clipChildren="false"
-                android:clipToPadding="false"
-                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" />
-
-                <Space
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    android:layout_weight="1" />
-
-                <!-- 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"
diff --git a/res/layout/choose_lock_pattern_common_footer.xml b/res/layout/choose_lock_pattern_common_footer.xml
new file mode 100644
index 0000000..d80702e
--- /dev/null
+++ b/res/layout/choose_lock_pattern_common_footer.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2017 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.
+-->
+
+<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/SuwGlifButtonBar"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <!-- left : cancel, or re-try -->
+    <Button android:id="@+id/footerLeftButton"
+        style="@style/SuwGlifButton.Secondary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/lockpattern_tutorial_cancel_label" />
+
+    <Space
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_weight="1" />
+
+    <!-- right : confirm or ok -->
+    <Button android:id="@+id/footerRightButton"
+        style="@style/SuwGlifButton.Primary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/lockpattern_tutorial_continue_label" />
+
+</LinearLayout>
diff --git a/res/layout/confirm_lock_password_internal.xml b/res/layout/confirm_lock_password_internal.xml
index 4f22cfb..02d28b2 100644
--- a/res/layout/confirm_lock_password_internal.xml
+++ b/res/layout/confirm_lock_password_internal.xml
@@ -48,13 +48,6 @@
             android:layout_marginStart="?attr/suwMarginSides"
             android:layout_marginEnd="?attr/suwMarginSides" />
 
-        <Button
-            style="@style/SetupWizardButton.Negative"
-            android:id="@+id/cancelButton"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/cancel" />
-
         <Space
             android:layout_width="match_parent"
             android:layout_height="0dp"
@@ -94,5 +87,12 @@
             android:contentDescription="@string/confirm_fingerprint_icon_content_description"
             android:visibility="gone"/>
 
+        <Button
+            style="@style/SetupWizardButton.Negative"
+            android:id="@+id/cancelButton"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/cancel" />
+
     </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
 </com.android.setupwizardlib.GlifLayout>
\ No newline at end of file
diff --git a/res/layout/confirm_lock_pattern_internal_base.xml b/res/layout/confirm_lock_pattern_internal_base.xml
index 359b51b..e20d04d 100644
--- a/res/layout/confirm_lock_pattern_internal_base.xml
+++ b/res/layout/confirm_lock_pattern_internal_base.xml
@@ -58,15 +58,6 @@
                     android:layout_marginStart="?attr/suwMarginSides"
                     android:layout_marginEnd="?attr/suwMarginSides" />
 
-                <Button
-                    android:id="@+id/cancelButton"
-                    style="@style/SetupWizardButton.Negative"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/suwMarginSides"
-                    android:layout_marginEnd="?attr/suwMarginSides"
-                    android:text="@string/cancel" />
-
             </LinearLayout>
 
         </ScrollView>
@@ -108,5 +99,15 @@
                 android:visibility="gone"/>
         </LinearLayout>
 
+        <Button
+            android:id="@+id/cancelButton"
+            style="@style/SuwGlifButton.Secondary"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="?attr/suwMarginSides"
+            android:layout_marginEnd="?attr/suwMarginSides"
+            android:text="@string/cancel" />
+
     </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
+
 </com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/encryption_interstitial.xml b/res/layout/encryption_interstitial.xml
new file mode 100644
index 0000000..f827e37
--- /dev/null
+++ b/res/layout/encryption_interstitial.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2017 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<com.android.setupwizardlib.GlifLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:icon="@drawable/ic_lock"
+    app:suwFooter="@layout/encryption_interstitial_footer">
+
+    <LinearLayout
+        style="@style/SuwContentFrame"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:clipChildren="false"
+        android:clipToPadding="false"
+        android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/encryption_message"
+            style="@style/SuwDescription.Glif"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+
+    </LinearLayout>
+
+</com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/encryption_interstitial_footer.xml b/res/layout/encryption_interstitial_footer.xml
new file mode 100644
index 0000000..2f876f3
--- /dev/null
+++ b/res/layout/encryption_interstitial_footer.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2017 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.
+-->
+
+<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/SuwGlifButtonBar"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <Button
+        android:id="@+id/encrypt_dont_require_password"
+        style="@style/SuwGlifButton.Secondary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/encryption_interstitial_no" />
+
+    <Space
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1" />
+
+    <Button
+        android:id="@+id/encrypt_require_password"
+        style="@style/SuwGlifButton.Primary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/encryption_interstitial_yes" />
+
+</LinearLayout>
diff --git a/res/layout/encryption_interstitial_header.xml b/res/layout/encryption_interstitial_header.xml
deleted file mode 100644
index b4f6dbb..0000000
--- a/res/layout/encryption_interstitial_header.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2016 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<TextView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/encryption_interstitial_header"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_vertical"
-    android:minHeight="56dp"
-    android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingTop="@dimen/suw_description_glif_margin_top"
-    android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
-    android:textAppearance="?android:attr/textAppearanceListItem" />
diff --git a/res/layout/fingerprint_enroll_find_sensor_base.xml b/res/layout/fingerprint_enroll_find_sensor_base.xml
index 60c8bc7..fa344ab 100644
--- a/res/layout/fingerprint_enroll_find_sensor_base.xml
+++ b/res/layout/fingerprint_enroll_find_sensor_base.xml
@@ -18,9 +18,9 @@
 <com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_wizard_layout"
+    style="?attr/fingerprint_layout_theme"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    style="?attr/fingerprint_layout_theme">
+    android:layout_height="match_parent">
 
     <FrameLayout
         android:layout_width="match_parent"
@@ -56,7 +56,7 @@
                 android:layout_weight="1"/>
 
             <Button
-                style="@style/SetupWizardButton.Positive"
+                style="@style/SuwGlifButton.Primary"
                 android:id="@+id/next_button"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
diff --git a/res/layout/fingerprint_enroll_finish_base.xml b/res/layout/fingerprint_enroll_finish_base.xml
index db099c3..6d9cf70 100644
--- a/res/layout/fingerprint_enroll_finish_base.xml
+++ b/res/layout/fingerprint_enroll_finish_base.xml
@@ -17,10 +17,12 @@
 
 <com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/setup_wizard_layout"
+    style="?attr/fingerprint_layout_theme"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    style="?attr/fingerprint_layout_theme">
+    app:suwFooter="@layout/fingerprint_enroll_finish_base_footer">
 
     <LinearLayout
         style="@style/SuwContentFrame"
@@ -71,35 +73,6 @@
             android:layout_width="match_parent"
             android:layout_weight="1"/>
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="4dp"
-            android:clipChildren="false"
-            android:clipToPadding="false"
-            android:orientation="horizontal">
-
-            <Button
-                style="@style/SetupWizardButton.Negative"
-                android:id="@+id/add_another_button"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/fingerprint_enroll_button_add" />
-
-            <Space
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:layout_weight="1" />
-
-            <Button
-                style="@style/SetupWizardButton.Positive"
-                android:id="@+id/next_button"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/security_settings_fingerprint_enroll_done" />
-
-        </LinearLayout>
-
     </LinearLayout>
 
 </com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/fingerprint_enroll_finish_base_footer.xml b/res/layout/fingerprint_enroll_finish_base_footer.xml
new file mode 100644
index 0000000..b3b9c74
--- /dev/null
+++ b/res/layout/fingerprint_enroll_finish_base_footer.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2017 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.
+-->
+
+<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/SuwGlifButtonBar"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <Button
+        style="@style/SuwGlifButton.Secondary"
+        android:id="@+id/add_another_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/fingerprint_enroll_button_add" />
+
+    <Space
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_weight="1" />
+
+    <Button
+        style="@style/SuwGlifButton.Primary"
+        android:id="@+id/next_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/security_settings_fingerprint_enroll_done" />
+
+</LinearLayout>
diff --git a/res/layout/fingerprint_enroll_introduction.xml b/res/layout/fingerprint_enroll_introduction.xml
index 6d20756..4f73395 100644
--- a/res/layout/fingerprint_enroll_introduction.xml
+++ b/res/layout/fingerprint_enroll_introduction.xml
@@ -17,10 +17,12 @@
 
 <com.android.setupwizardlib.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     style="?attr/fingerprint_layout_theme"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    app:suwFooter="@layout/fingerprint_enroll_introduction_footer">
 
     <LinearLayout
         style="@style/SuwContentFrame"
@@ -43,34 +45,6 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content" />
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:clipChildren="false"
-            android:clipToPadding="false"
-            android:orientation="horizontal">
-
-            <Button
-                android:id="@+id/fingerprint_cancel_button"
-                style="@style/SetupWizardButton.Negative"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/security_settings_fingerprint_enroll_introduction_cancel" />
-
-            <Space
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:layout_weight="1" />
-
-            <Button
-                android:id="@+id/fingerprint_next_button"
-                style="@style/SetupWizardButton.Positive"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/suw_next_button_label" />
-
-        </LinearLayout>
-
     </LinearLayout>
 
 </com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/fingerprint_enroll_introduction_footer.xml b/res/layout/fingerprint_enroll_introduction_footer.xml
new file mode 100644
index 0000000..17420fe
--- /dev/null
+++ b/res/layout/fingerprint_enroll_introduction_footer.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2017 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
+-->
+
+<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/SuwGlifButtonBar"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <Button
+        android:id="@+id/fingerprint_cancel_button"
+        style="@style/SuwGlifButton.Secondary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/security_settings_fingerprint_enroll_introduction_cancel" />
+
+    <Space
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_weight="1" />
+
+    <Button
+        android:id="@+id/fingerprint_next_button"
+        style="@style/SuwGlifButton.Primary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/suw_next_button_label" />
+
+</LinearLayout>
diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml
index e11e997..a0ecf49 100644
--- a/res/layout/radio_info.xml
+++ b/res/layout/radio_info.xml
@@ -302,5 +302,21 @@
                       android:textSize="12sp" />
         </LinearLayout>
 
+        <!-- Carrier Provisioning -->
+        <LinearLayout style="@style/entry_layout">
+            <Button android:id="@+id/carrier_provisioning"
+                    android:layout_marginTop="8dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/carrier_provisioning"
+                    android:textSize="14sp"/>
+            <Button android:id="@+id/trigger_carrier_provisioning"
+                    android:layout_marginTop="8dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/trigger_carrier_provisioning"
+                    android:textSize="14sp"/>
+        </LinearLayout>
+
     </LinearLayout>
 </ScrollView>
diff --git a/res/layout/redaction_interstitial.xml b/res/layout/redaction_interstitial.xml
index e48f20f..ecc122f 100644
--- a/res/layout/redaction_interstitial.xml
+++ b/res/layout/redaction_interstitial.xml
@@ -22,6 +22,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:icon="@drawable/ic_lock"
+    settings:suwFooter="@layout/redaction_interstitial_footer"
     settings:suwHeaderText="@string/lock_screen_notifications_interstitial_title">
 
     <LinearLayout
@@ -69,14 +70,6 @@
 
         </RadioGroup>
 
-        <Button
-            android:id="@+id/redaction_done_button"
-            style="@style/SetupWizardButton.Positive"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="end"
-            android:text="@string/app_notifications_dialog_done" />
-
     </LinearLayout>
 
 </com.android.setupwizardlib.GlifLayout>
diff --git a/res/layout/redaction_interstitial_footer.xml b/res/layout/redaction_interstitial_footer.xml
new file mode 100644
index 0000000..1d8758b
--- /dev/null
+++ b/res/layout/redaction_interstitial_footer.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2017 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
+-->
+
+<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/SuwGlifButtonBar"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <Button
+        android:id="@+id/redaction_done_button"
+        style="@style/SuwGlifButton.Primary"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="end"
+        android:text="@string/app_notifications_dialog_done" />
+
+</FrameLayout>
diff --git a/res/layout/setup_encryption_interstitial_header.xml b/res/layout/setup_encryption_interstitial_header.xml
deleted file mode 100644
index 9601fa8..0000000
--- a/res/layout/setup_encryption_interstitial_header.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2016 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_vertical"
-    android:minHeight="56dp"
-    android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingTop="@dimen/suw_description_glif_margin_top"
-    android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
-    android:textAppearance="?android:attr/textAppearanceListItem" />
diff --git a/res/layout/suggestion_tile_card.xml b/res/layout/suggestion_tile_card.xml
new file mode 100644
index 0000000..6f94914
--- /dev/null
+++ b/res/layout/suggestion_tile_card.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_margin="8dp"
+    android:background="@drawable/selectable_card"
+    android:clickable="true"
+    android:elevation="2dp"
+    android:focusable="true"
+    android:minHeight="@dimen/dashboard_tile_minimum_height" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2dbd222..9444285 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3197,7 +3197,7 @@
     <!-- [CHAR LIMIT=130] Location mode screen, description for battery saving mode -->
     <string name="location_mode_battery_saving_description">Use Wi\u2011Fi, Bluetooth, or mobile networks to determine location</string>
     <!-- [CHAR LIMIT=130] Location mode screen, description for sensors only mode -->
-    <string name="location_mode_sensors_only_description">Use GPS to determine location</string>
+    <string name="location_mode_sensors_only_description">Use GPS and device sensors to determine location</string>
     <!-- [CHAR LIMIT=30] Wireless background scanning settings screen, screen title -->
     <string name="location_scanning_screen_title">Scanning</string>
     <!-- [CHAR LIMIT=130] Preference title for Wi-Fi always scanning -->
@@ -6037,6 +6037,10 @@
     <string name="help_url_manage_storage" translatable="false"></string>
     <!-- Help URL, Android is upgrading [DO NOT TRANSLATE] -->
     <string name="help_url_upgrading" translatable="false"></string>
+    <!-- Help URL, Font size [DO NOT TRANSLATE] -->
+    <string name="help_url_font_size" translatable="false"></string>
+    <!-- Help URL, Display size [DO NOT TRANSLATE] -->
+    <string name="help_url_display_size" translatable="false"></string>
 
     <!-- User account title [CHAR LIMIT=30] -->
     <string name="user_account_title">Account for content</string>
@@ -7049,39 +7053,30 @@
     <!-- Message shown on encryption interstitial to ask the user whether or not they want to use a PIN to encrypt the device. [CHAR LIMIT=NONE] -->
     <string name="encryption_interstitial_message_pin">
    You can further protect this device by requiring your PIN before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.
-   \n\nThis helps protect data on lost or stolen devices.
+   \n\nThis helps protect data on lost or stolen devices. Require PIN to start your device?
    </string>
     <!-- Message shown on encryption interstitial to ask the user whether or not they want to use a pattern to encrypt the device. [CHAR LIMIT=NONE] -->
     <string name="encryption_interstitial_message_pattern">
    You can further protect this device by requiring your pattern before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.
-   \n\nThis helps protect data on lost or stolen devices.
+   \n\nThis helps protect data on lost or stolen devices. Require pattern to start your device?
    </string>
     <!-- Message shown on encryption interstitial to ask the user whether or not they want to use a password to encrypt the device. [CHAR LIMIT=NONE] -->
     <string name="encryption_interstitial_message_password">
    You can further protect this device by requiring your password before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.
-   \n\nThis helps protect data on lost or stolen devices.
+   \n\nThis helps protect data on lost or stolen devices. Require password to start your device?
    </string>
 
     <!-- Message shown on encryption interstitial to ask the user whether or not they want to use a PIN to encrypt the device while setting up fingerprint unlock. [CHAR LIMIT=NONE] -->
-    <string name="encryption_interstitial_message_pin_for_fingerprint">In addition to using your fingerprint to unlock your device, you can further protect this device by requiring your PIN before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices.</string>
+    <string name="encryption_interstitial_message_pin_for_fingerprint">In addition to using your fingerprint to unlock your device, you can further protect this device by requiring your PIN before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices. Require PIN to start your device?</string>
     <!-- Message shown on encryption interstitial to ask the user whether or not they want to use a pattern to encrypt the device while setting up fingerprint unlock. [CHAR LIMIT=NONE] -->
-    <string name="encryption_interstitial_message_pattern_for_fingerprint">In addition to using your fingerprint to unlock your device, you can further protect this device by requiring your pattern before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices.</string>
+    <string name="encryption_interstitial_message_pattern_for_fingerprint">In addition to using your fingerprint to unlock your device, you can further protect this device by requiring your pattern before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices. Require pattern to start your device?</string>
     <!-- Message shown on encryption interstitial to ask the user whether or not they want to use a password to encrypt the device while setting up fingerprint unlock. [CHAR LIMIT=NONE] -->
-    <string name="encryption_interstitial_message_password_for_fingerprint">In addition to using your fingerprint to unlock your device, you can further protect this device by requiring your password before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices.</string>
+    <string name="encryption_interstitial_message_password_for_fingerprint">In addition to using your fingerprint to unlock your device, you can further protect this device by requiring your password before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices. Require password to start your device></string>
 
-    <!-- Radio button text that require a PIN to start device [CHAR LIMIT=NONE] -->
-    <string name="encrypt_require_pin">Require PIN to start device</string>
-    <!-- Radio button text that require a pattern to start device [CHAR LIMIT=NONE] -->
-    <string name="encrypt_require_pattern">Require pattern to start device</string>
-    <!-- Radio button text that require a password to start device [CHAR LIMIT=NONE] -->
-    <string name="encrypt_require_password">Require password to start device</string>
-
-    <!-- Radio button text that doesn't require a PIN to decrypt [CHAR LIMIT=NONE] -->
-    <string name="encrypt_dont_require_pin">No thanks</string>
-    <!-- Radio button text that doesn't require a pattern to decrypt [CHAR LIMIT=NONE] -->
-    <string name="encrypt_dont_require_pattern">No thanks</string>
-    <!-- Radio button text that doesn't require a password to decrypt [CHAR LIMIT=NONE] -->
-    <string name="encrypt_dont_require_password">No thanks</string>
+    <!-- Button label to say yes to the question of whether to require PIN/password/pattern to start your device. [CHAR LIMIT=20] -->
+    <string name="encryption_interstitial_yes">Yes</string>
+    <!-- Button label to say no to the question of whether to require PIN/password/pattern to start your device. [CHAR LIMIT=20] -->
+    <string name="encryption_interstitial_no">No</string>
 
    <!-- Title for encryption dialog that disables TalkBack. [CHAR_LIMIT=25] -->
    <string name="encrypt_talkback_dialog_require_pin">Require PIN?</string>
@@ -8427,14 +8422,16 @@
     <string name="automatic_storage_manager_freed_bytes"><xliff:g id="size" example="3.25MB">%1$s</xliff:g> total made available\n\nLast ran on <xliff:g id="date" example="Jan 12">%2$s</xliff:g></string>
 
     <!-- Title text for enabling web actions. [CHAR_LIMIT=60] -->
-    <string name="web_action_enable_title">Open links in apps</string>
+    <string name="web_action_enable_title">Instant apps</string>
 
     <!-- Summary text for enabling web actions. [CHAR_LIMIT=250] -->
-    <string name="web_action_enable_summary">Open links in supported apps, even if the
-      apps aren’t installed on your device</string>
+    <string name="web_action_enable_summary">Open links in apps, even if they’re not installed</string>
 
     <!-- Section title for the Web Action preference [CHAR LIMIT=60] -->
-    <string name="web_action_section_title">Apps not installed</string>
+    <string name="web_action_section_title">Instant apps</string>
+
+    <!-- Preference label for an tappable preference that will open the account chooser for instant apps. [CHAR LIMIT=60] -->
+    <string name="instant_apps_account">Instant apps account</string>
 
     <!-- Section title for the Domain URL app preference list [CHAR LIMIT=60]-->
     <string name="domain_url_section_title">Installed apps</string>
@@ -8661,4 +8658,10 @@
     <!-- Title for the installed app info storage page. The total storage space taken up by this app. [CHAR LIMIT=40]-->
     <string name="app_info_storage_title">Space used</string>
 
+    <!-- Carrier Provisioning Info [CHAR LIMIT=NONE] -->
+    <string name="carrier_provisioning">Carrier Provisioning Info</string>
+    <!-- Trigger Carrier Provisioning [CHAR LIMIT=NONE] -->
+    <string name="trigger_carrier_provisioning">Trigger Carrier Provisioning</string>
+
+
 </resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 7ca109b..5198f76 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -22,7 +22,7 @@
     <attr name="side_margin" format="reference|dimension" />
     <attr name="wifi_signal_color" format="reference" />
 
-    <style name="SetupWizardTheme" parent="SuwThemeGlif">
+    <style name="GlifTheme" parent="SuwThemeGlif">
         <!-- For all Alert Dialogs -->
         <item name="android:alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
         <item name="android:colorPrimary">@color/suw_color_accent_dark</item>
@@ -43,7 +43,7 @@
         <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
     </style>
 
-    <style name="SetupWizardTheme.Light" parent="SuwThemeGlif.Light">
+    <style name="GlifTheme.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>
@@ -63,14 +63,55 @@
         <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
     </style>
 
-    <style name="SetupWizardTheme.Transparent" parent="SetupWizardTheme">
+    <style name="GlifV2Theme" parent="SuwThemeGlifV2">
+        <!-- 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:windowBackground">?android:attr/colorBackground</item>
+        <item name="*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
+        <item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
+        <item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
+        <item name="ic_wps">@drawable/ic_wps_dark</item>
+        <item name="setup_divider_color">@color/setup_divider_color_dark</item>
+        <item name="side_margin">0dip</item>
+        <item name="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>
+        <item name="wifi_signal">@drawable/wifi_signal</item>
+        <item name="wifi_friction">@drawable/wifi_friction</item>
+        <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
+        <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
+
+        <!-- LockPatternView colors -->
+        <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
+    </style>
+
+    <style name="GlifV2Theme.Light" parent="SuwThemeGlifV2.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:windowBackground">?android:attr/colorBackground</item>
+        <item name="*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
+        <item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
+        <item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
+        <item name="ic_wps">@drawable/ic_wps_light</item>
+        <item name="setup_divider_color">@color/setup_divider_color_light</item>
+        <item name="side_margin">0dip</item>
+        <item name="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>
+        <item name="wifi_signal">@drawable/wifi_signal</item>
+        <item name="wifi_friction">@drawable/wifi_friction</item>
+        <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
+        <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
+
+        <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
+    </style>
+
+    <style name="SetupWizardTheme.Transparent" parent="GlifTheme">
         <item name="android:windowBackground">@android:color/transparent</item>
         <item name="android:windowNoTitle">true</item>
         <item name="android:windowIsFloating">true</item>
         <item name="android:windowAnimationStyle">@null</item>
     </style>
 
-    <style name="SetupWizardTheme.Light.Transparent" parent="SetupWizardTheme.Light">
+    <style name="SetupWizardTheme.Light.Transparent" parent="GlifTheme.Light">
         <item name="android:windowBackground">@android:color/transparent</item>
         <item name="android:windowNoTitle">true</item>
         <item name="android:windowIsFloating">true</item>
diff --git a/res/xml/security_settings_encryption_interstitial.xml b/res/xml/security_settings_encryption_interstitial.xml
deleted file mode 100644
index 576cbf0..0000000
--- a/res/xml/security_settings_encryption_interstitial.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2016 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-    android:title="@string/lock_settings_picker_title"
-    android:key="lock_settings_picker">
-
-    <com.android.settings.MultiLinePreference
-        android:icon="@drawable/ic_lock_list_icon"
-        android:key="encrypt_require_password"
-        android:persistent="false"/>
-
-    <Preference
-        android:icon="@drawable/ic_skip"
-        android:key="encrypt_dont_require_password"
-        android:persistent="false"/>
-
-</PreferenceScreen>
diff --git a/res/xml/storage_dashboard_fragment.xml b/res/xml/storage_dashboard_fragment.xml
index 354a700..b31d0eb 100644
--- a/res/xml/storage_dashboard_fragment.xml
+++ b/res/xml/storage_dashboard_fragment.xml
@@ -47,15 +47,20 @@
         android:icon="@drawable/ic_videogame_vd_theme_24"
         android:order="4" />
     <com.android.settings.deviceinfo.StorageItemPreference
+        android:key="pref_movies"
+        android:title="@string/storage_movies_tv"
+        android:icon="@drawable/ic_theaters_vd_theme_24"
+        android:order="5" />
+    <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_other_apps"
         android:title="@string/storage_other_apps"
         android:icon="@drawable/ic_apps_vd_theme_24"
-        android:order="5" />
+        android:order="6" />
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_files"
         android:title="@string/storage_files"
         android:icon="@drawable/ic_folder_vd_theme_24"
-        android:order="6" />
+        android:order="7" />
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_system"
         android:title="@string/storage_detail_system"
diff --git a/res/xml/storage_profile_fragment.xml b/res/xml/storage_profile_fragment.xml
index 98cb1dc..0485279 100644
--- a/res/xml/storage_profile_fragment.xml
+++ b/res/xml/storage_profile_fragment.xml
@@ -34,6 +34,9 @@
         android:icon="@drawable/ic_videogame_vd_theme_24"
         android:order="4" />
     <com.android.settings.deviceinfo.StorageItemPreference
+        android:key="pref_movies"
+        android:title="@string/storage_movies_tv" />
+    <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_other_apps"
         android:title="@string/storage_other_apps"
         android:icon="@drawable/ic_apps_vd_theme_24"
diff --git a/res/xml/suggestion_ordering.xml b/res/xml/suggestion_ordering.xml
index 1eeafba..0e2ce3b 100644
--- a/res/xml/suggestion_ordering.xml
+++ b/res/xml/suggestion_ordering.xml
@@ -15,6 +15,8 @@
 -->
 
 <optional-steps>
+    <step category="com.android.settings.suggested.category.DEFERRED_SETUP"
+        exclusive="true" />
     <step category="com.android.settings.suggested.category.LOCK_SCREEN" />
     <step category="com.android.settings.suggested.category.EMAIL" />
     <step category="com.android.settings.suggested.category.PARTNER_ACCOUNT"
diff --git a/res/xml/tts_sliders.xml b/res/xml/tts_sliders.xml
deleted file mode 100644
index 3c767b0..0000000
--- a/res/xml/tts_sliders.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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/tts_settings_title">
-
-        <!-- The max value for seek bars here should be kept in sync
-             with the max value specified in TextToSpeechSettings class. -->
-        <com.android.settings.SeekBarPreference
-            android:key="tts_default_rate"
-            android:title="@string/tts_default_rate_title"
-            android:summary="@string/tts_default_rate_summary"
-            android:defaultValue="50"
-            android:max="600"/>
-
-        <com.android.settings.SeekBarPreference
-            android:key="tts_default_pitch"
-            android:title="@string/tts_default_pitch_title"
-            android:summary="@string/tts_default_pitch_summary"
-            android:defaultValue="100"
-            android:max="400"/>
-
-        <Preference android:key="reset_speech_rate"
-            android:persistent="false"
-            android:title="@string/tts_reset_speech_rate_title"
-            android:summary="@string/tts_reset_speech_rate_summary" />
-
-        <Preference android:key="reset_speech_pitch"
-            android:persistent="false"
-            android:title="@string/tts_reset_speech_pitch_title"
-            android:summary="@string/tts_reset_speech_pitch_summary" />
-
-</PreferenceScreen>
diff --git a/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java b/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java
index 489dbbe..d36947f 100644
--- a/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java
+++ b/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java
@@ -52,7 +52,7 @@
             setTheme(R.style.Theme_ConfirmDeviceCredentialsDark);
             mConfirmCredentialTheme = ConfirmCredentialTheme.DARK;
         } else {
-            setTheme(R.style.SetupWizardTheme_Light);
+            setTheme(R.style.GlifTheme_Light);
             mConfirmCredentialTheme = ConfirmCredentialTheme.INTERNAL;
         }
         super.onCreate(savedState);
diff --git a/src/com/android/settings/EncryptionInterstitial.java b/src/com/android/settings/EncryptionInterstitial.java
index 4f24381..42ca516 100644
--- a/src/com/android/settings/EncryptionInterstitial.java
+++ b/src/com/android/settings/EncryptionInterstitial.java
@@ -23,21 +23,18 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
-import android.content.res.Resources;
 import android.os.Bundle;
-import android.support.v7.preference.Preference;
-import android.support.v7.widget.RecyclerView;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.accessibility.AccessibilityManager;
+import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.settings.utils.SettingsDividerItemDecoration;
-import com.android.setupwizardlib.GlifPreferenceLayout;
+import com.android.setupwizardlib.GlifLayout;
 
 import java.util.List;
 
@@ -78,15 +75,12 @@
     }
 
     public static class EncryptionInterstitialFragment extends SettingsPreferenceFragment
-            implements DialogInterface.OnClickListener {
+            implements View.OnClickListener, DialogInterface.OnClickListener {
 
         private static final int ACCESSIBILITY_WARNING_DIALOG = 1;
-        private static final String KEY_ENCRYPT_REQUIRE_PASSWORD = "encrypt_require_password";
-        private static final String KEY_ENCRYPT_DONT_REQUIRE_PASSWORD =
-                "encrypt_dont_require_password";
 
-        private Preference mRequirePasswordToDecrypt;
-        private Preference mDontRequirePasswordToDecrypt;
+        private View mRequirePasswordToDecrypt;
+        private View mDontRequirePasswordToDecrypt;
         private boolean mPasswordRequired;
         private Intent mUnlockMethodIntent;
         private int mRequestedPasswordQuality;
@@ -97,81 +91,52 @@
         }
 
         @Override
-        public void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
+        public View onCreateView(
+                LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+            return inflater.inflate(R.layout.encryption_interstitial, container, false);
+        }
 
-            addPreferencesFromResource(R.xml.security_settings_encryption_interstitial);
+        @Override
+        public void onViewCreated(View view, Bundle savedInstanceState) {
+            super.onViewCreated(view, savedInstanceState);
 
-            // Used for testing purposes
-            findPreference(KEY_ENCRYPT_DONT_REQUIRE_PASSWORD)
-                    .setViewId(R.id.encrypt_dont_require_password);
-
-            mRequirePasswordToDecrypt = findPreference(KEY_ENCRYPT_REQUIRE_PASSWORD);
-            mDontRequirePasswordToDecrypt = findPreference(KEY_ENCRYPT_DONT_REQUIRE_PASSWORD);
+            mRequirePasswordToDecrypt = view.findViewById(R.id.encrypt_require_password);
+            mDontRequirePasswordToDecrypt = view.findViewById(R.id.encrypt_dont_require_password);
             boolean forFingerprint = getActivity().getIntent().getBooleanExtra(
                     ChooseLockSettingsHelper.EXTRA_KEY_FOR_FINGERPRINT, false);
             Intent intent = getActivity().getIntent();
             mRequestedPasswordQuality = intent.getIntExtra(EXTRA_PASSWORD_QUALITY, 0);
             mUnlockMethodIntent = intent.getParcelableExtra(EXTRA_UNLOCK_METHOD_INTENT);
             final int msgId;
-            final int enableId;
-            final int disableId;
             switch (mRequestedPasswordQuality) {
                 case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
                     msgId = forFingerprint ?
                             R.string.encryption_interstitial_message_pattern_for_fingerprint :
                             R.string.encryption_interstitial_message_pattern;
-                    enableId = R.string.encrypt_require_pattern;
-                    disableId = R.string.encrypt_dont_require_pattern;
                     break;
                 case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
                 case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX:
                     msgId = forFingerprint ?
                             R.string.encryption_interstitial_message_pin_for_fingerprint :
                             R.string.encryption_interstitial_message_pin;
-                    enableId = R.string.encrypt_require_pin;
-                    disableId = R.string.encrypt_dont_require_pin;
                     break;
                 default:
                     msgId = forFingerprint ?
                             R.string.encryption_interstitial_message_password_for_fingerprint :
                             R.string.encryption_interstitial_message_password;
-                    enableId = R.string.encrypt_require_password;
-                    disableId = R.string.encrypt_dont_require_password;
                     break;
             }
-            TextView message = (TextView) LayoutInflater.from(getActivity()).inflate(
-                    R.layout.encryption_interstitial_header, null, false);
+            TextView message = (TextView) getActivity().findViewById(R.id.encryption_message);
             message.setText(msgId);
-            setHeaderView(message);
 
-            mRequirePasswordToDecrypt.setTitle(enableId);
-
-            mDontRequirePasswordToDecrypt.setTitle(disableId);
+            mRequirePasswordToDecrypt.setOnClickListener(this);
+            mDontRequirePasswordToDecrypt.setOnClickListener(this);
 
             setRequirePasswordState(getActivity().getIntent().getBooleanExtra(
                     EXTRA_REQUIRE_PASSWORD, true));
-        }
 
-        @Override
-        public void onViewCreated(View view, Bundle savedInstanceState) {
-            super.onViewCreated(view, savedInstanceState);
-            GlifPreferenceLayout layout = (GlifPreferenceLayout) view;
-            layout.setDividerItemDecoration(new SettingsDividerItemDecoration(getContext()));
-
-            layout.setIcon(getContext().getDrawable(R.drawable.ic_lock));
+            GlifLayout layout = (GlifLayout) view;
             layout.setHeaderText(getActivity().getTitle());
-
-            // Use the dividers in SetupWizardRecyclerLayout. Suppress the dividers in
-            // PreferenceFragment.
-            setDivider(null);
-        }
-
-        @Override
-        public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,
-                Bundle savedInstanceState) {
-            GlifPreferenceLayout layout = (GlifPreferenceLayout) parent;
-            return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
         }
 
         protected void startLockIntent() {
@@ -194,12 +159,8 @@
         }
 
         @Override
-        public boolean onPreferenceTreeClick(Preference preference) {
-            final String key = preference.getKey();
-            if (key == null) {
-                return super.onPreferenceTreeClick(preference);
-            }
-            if (key.equals(KEY_ENCRYPT_REQUIRE_PASSWORD)) {
+        public void onClick(View view) {
+            if (view == mRequirePasswordToDecrypt) {
                 final boolean accEn = AccessibilityManager.getInstance(getActivity()).isEnabled();
                 if (accEn && !mPasswordRequired) {
                     setRequirePasswordState(false); // clear the UI state
@@ -212,7 +173,6 @@
                 setRequirePasswordState(false);
                 startLockIntent();
             }
-            return true;
         }
 
         @Override
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index ddf0dec..dde3461 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -20,6 +20,7 @@
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.app.QueuedWork;
+import android.content.ComponentName;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
@@ -195,6 +196,8 @@
     private Button updateSmscButton;
     private Button refreshSmscButton;
     private Button oemInfoButton;
+    private Button carrierProvisioningButton;
+    private Button triggercarrierProvisioningButton;
     private Switch imsVolteProvisionedSwitch;
     private Switch imsVtProvisionedSwitch;
     private Switch imsWfcProvisionedSwitch;
@@ -414,6 +417,11 @@
         refreshSmscButton.setOnClickListener(mRefreshSmscButtonHandler);
         dnsCheckToggleButton = (Button) findViewById(R.id.dns_check_toggle);
         dnsCheckToggleButton.setOnClickListener(mDnsCheckButtonHandler);
+        carrierProvisioningButton = (Button) findViewById(R.id.carrier_provisioning);
+        carrierProvisioningButton.setOnClickListener(mCarrierProvisioningButtonHandler);
+        triggercarrierProvisioningButton = (Button) findViewById(R.id.trigger_carrier_provisioning);
+        triggercarrierProvisioningButton.setOnClickListener(
+                mTriggerCarrierProvisioningButtonHandler);
 
         oemInfoButton = (Button) findViewById(R.id.oem_info);
         oemInfoButton.setOnClickListener(mOemInfoButtonHandler);
@@ -1295,6 +1303,30 @@
         }
     };
 
+    OnClickListener mCarrierProvisioningButtonHandler = new OnClickListener() {
+        public void onClick(View v) {
+            final Intent intent = new Intent();
+            final ComponentName serviceComponent = new ComponentName("com.android.omadm.service",
+                    "DMIntentReceiver");
+            intent.setComponent(serviceComponent);
+            intent.setAction("com.android.settings.CARRIER_PROVISIONING");
+            getApplicationContext().sendBroadcast(
+                    intent, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE);
+        }
+    };
+
+    OnClickListener mTriggerCarrierProvisioningButtonHandler = new OnClickListener() {
+        public void onClick(View v) {
+            final Intent intent = new Intent();
+            final ComponentName serviceComponent = new ComponentName("com.android.omadm.service",
+                    "DMIntentReceiver");
+            intent.setComponent(serviceComponent);
+            intent.setAction("com.android.settings.TRIGGER_CARRIER_PROVISIONING");
+            getApplicationContext().sendBroadcast(
+                    intent, android.Manifest.permission.MODIFY_PHONE_STATE);
+        }
+    };
+
     AdapterView.OnItemSelectedListener mPreferredNetworkHandler =
             new AdapterView.OnItemSelectedListener() {
 
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 589421f..1db185e 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -121,6 +121,7 @@
     public static class ManageDomainUrlsActivity extends SettingsActivity { /* empty */ }
     public static class AutomaticStorageManagerSettingsActivity extends SettingsActivity { /* empty */ }
     public static class GamesStorageActivity extends SettingsActivity { /* empty */ }
+    public static class MoviesStorageActivity extends SettingsActivity { /* empty */ }
 
     public static class TopLevelSettings extends SettingsActivity { /* empty */ }
     public static class ApnSettingsActivity extends SettingsActivity { /* empty */ }
diff --git a/src/com/android/settings/SetupEncryptionInterstitial.java b/src/com/android/settings/SetupEncryptionInterstitial.java
index 59e4d07..4f30cc0 100644
--- a/src/com/android/settings/SetupEncryptionInterstitial.java
+++ b/src/com/android/settings/SetupEncryptionInterstitial.java
@@ -20,15 +20,8 @@
 import android.content.Intent;
 import android.content.res.Resources;
 import android.os.Bundle;
-import android.support.v7.widget.RecyclerView;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
 import android.widget.LinearLayout;
 
-import com.android.settings.utils.SettingsDividerItemDecoration;
-import com.android.setupwizardlib.GlifPreferenceLayout;
-
 /**
  * Setup Wizard's version of EncryptionInterstitial screen. It inherits the logic and basic
  * structure from EncryptionInterstitial class, and should remain similar to that behaviorally. This
@@ -75,29 +68,5 @@
     }
 
     public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment {
-
-        @Override
-        public void onViewCreated(View view, Bundle savedInstanceState) {
-            super.onViewCreated(view, savedInstanceState);
-
-            final GlifPreferenceLayout layout = (GlifPreferenceLayout) view;
-            layout.setDividerItemDecoration(new SettingsDividerItemDecoration(getContext()));
-            layout.setDividerInset(getContext().getResources().getDimensionPixelSize(
-                    R.dimen.suw_items_glif_icon_divider_inset));
-            layout.setIcon(getContext().getDrawable(R.drawable.ic_lock));
-
-            layout.setHeaderText(R.string.encryption_interstitial_header);
-
-            // Use the dividers in SetupWizardRecyclerLayout. Suppress the dividers in
-            // PreferenceFragment.
-            setDivider(null);
-        }
-
-        @Override
-        public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,
-                                                 Bundle savedInstanceState) {
-            GlifPreferenceLayout layout = (GlifPreferenceLayout) parent;
-            return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
-        }
     }
 }
diff --git a/src/com/android/settings/SetupWizardUtils.java b/src/com/android/settings/SetupWizardUtils.java
index a0a3719..7edffed 100644
--- a/src/com/android/settings/SetupWizardUtils.java
+++ b/src/com/android/settings/SetupWizardUtils.java
@@ -23,11 +23,20 @@
 public class SetupWizardUtils {
 
     public static int getTheme(Intent intent) {
-        if (WizardManagerHelper.isLightTheme(intent, true)) {
-            return R.style.SetupWizardTheme_Light;
-        } else {
-            return R.style.SetupWizardTheme;
+        String theme = intent.getStringExtra(WizardManagerHelper.EXTRA_THEME);
+        if (theme != null) {
+            switch (theme) {
+                case WizardManagerHelper.THEME_GLIF_V2_LIGHT:
+                    return R.style.GlifV2Theme_Light;
+                case WizardManagerHelper.THEME_GLIF_V2:
+                    return R.style.GlifV2Theme;
+                case WizardManagerHelper.THEME_GLIF_LIGHT:
+                    return R.style.GlifTheme_Light;
+                case WizardManagerHelper.THEME_GLIF:
+                    return R.style.GlifTheme;
+            }
         }
+        return R.style.GlifTheme_Light;
     }
 
     public static int getTransparentTheme(Intent intent) {
diff --git a/src/com/android/settings/accessibility/ToggleFontSizePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleFontSizePreferenceFragment.java
index 293d2bf..c200d17 100644
--- a/src/com/android/settings/accessibility/ToggleFontSizePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleFontSizePreferenceFragment.java
@@ -73,6 +73,11 @@
     }
 
     @Override
+    public int getHelpResource() {
+        return R.string.help_url_font_size;
+    }
+
+    @Override
     public int getMetricsCategory() {
         return MetricsEvent.ACCESSIBILITY_FONT_SIZE;
     }
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
index 229e294..594786e 100644
--- a/src/com/android/settings/applications/ManageApplications.java
+++ b/src/com/android/settings/applications/ManageApplications.java
@@ -61,6 +61,7 @@
 import com.android.settings.Settings.GamesStorageActivity;
 import com.android.settings.Settings.HighPowerApplicationsActivity;
 import com.android.settings.Settings.ManageExternalSourcesActivity;
+import com.android.settings.Settings.MoviesStorageActivity;
 import com.android.settings.Settings.NotificationAppListActivity;
 import com.android.settings.Settings.OverlaySettingsActivity;
 import com.android.settings.Settings.StorageUseActivity;
@@ -255,6 +256,7 @@
     public static final int LIST_TYPE_WRITE_SETTINGS = 7;
     public static final int LIST_TYPE_MANAGE_SOURCES = 8;
     public static final int LIST_TYPE_GAMES = 9;
+    public static final int LIST_TYPE_MOVIES = 10;
 
 
     // List types that should show instant apps.
@@ -315,6 +317,9 @@
         } else if (className.equals(GamesStorageActivity.class.getName())) {
             mListType = LIST_TYPE_GAMES;
             mSortOrder = R.id.sort_order_size;
+        } else if (className.equals(MoviesStorageActivity.class.getName())) {
+            mListType = LIST_TYPE_MOVIES;
+            mSortOrder = R.id.sort_order_size;
         } else {
             mListType = LIST_TYPE_MAIN;
         }
@@ -423,6 +428,8 @@
         }
         if (mListType == LIST_TYPE_GAMES) {
             mApplications.setOverrideFilter(ApplicationsState.FILTER_GAMES);
+        } else if (mListType == LIST_TYPE_MOVIES) {
+            mApplications.setOverrideFilter(ApplicationsState.FILTER_MOVIES);
         }
     }
 
@@ -449,6 +456,7 @@
             case LIST_TYPE_NOTIFICATION:
             case LIST_TYPE_STORAGE:
             case LIST_TYPE_GAMES:
+            case LIST_TYPE_MOVIES:
                 return mSortOrder == R.id.sort_order_alpha;
             default:
                 return false;
@@ -469,6 +477,8 @@
                 return MetricsEvent.APPLICATIONS_STORAGE_APPS;
             case LIST_TYPE_GAMES:
                 return MetricsEvent.APPLICATIONS_STORAGE_GAMES;
+            case LIST_TYPE_MOVIES:
+                return MetricsEvent.APPLICATIONS_STORAGE_MOVIES;
             case LIST_TYPE_USAGE_ACCESS:
                 return MetricsEvent.USAGE_ACCESS;
             case LIST_TYPE_HIGH_POWER:
@@ -576,6 +586,9 @@
             case LIST_TYPE_GAMES:
                 startAppInfoFragment(AppStorageSettings.class, R.string.game_storage_settings);
                 break;
+            case LIST_TYPE_MOVIES:
+                startAppInfoFragment(AppStorageSettings.class, R.string.storage_movies_tv);
+                break;
             // TODO: Figure out if there is a way where we can spin up the profile's settings
             // process ahead of time, to avoid a long load of data when user clicks on a managed app.
             // Maybe when they load the list of apps that contains managed profile apps.
diff --git a/src/com/android/settings/applications/ManageDomainUrls.java b/src/com/android/settings/applications/ManageDomainUrls.java
index b09a089..bdc9932 100644
--- a/src/com/android/settings/applications/ManageDomainUrls.java
+++ b/src/com/android/settings/applications/ManageDomainUrls.java
@@ -15,7 +15,9 @@
 package com.android.settings.applications;
 
 import android.app.Application;
+import android.content.ComponentName;
 import android.content.Context;
+import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.os.Bundle;
 import android.os.UserHandle;
@@ -55,6 +57,7 @@
     private ApplicationsState.Session mSession;
     private PreferenceGroup mDomainAppList;
     private SwitchPreference mWebAction;
+    private Preference mInstantAppAccountPreference;
 
     @Override
     public void onCreate(Bundle icicle) {
@@ -126,6 +129,26 @@
                 mWebAction.setOnPreferenceChangeListener(this);
                 webActionCategory.addPreference(mWebAction);
 
+                // Determine whether we should show the instant apps account chooser setting
+                ComponentName instantAppSettingsComponent = getActivity().getPackageManager()
+                        .getInstantAppResolverSettingsComponent();
+                Intent instantAppSettingsIntent = null;
+                if (instantAppSettingsComponent != null) {
+                    instantAppSettingsIntent =
+                            new Intent().setComponent(instantAppSettingsComponent);
+                }
+                if (instantAppSettingsIntent != null) {
+                    final Intent launchIntent = instantAppSettingsIntent;
+                    // TODO: Make this button actually launch the account chooser.
+                    mInstantAppAccountPreference = new Preference(getPrefContext());
+                    mInstantAppAccountPreference.setTitle(R.string.instant_apps_account);
+                    mInstantAppAccountPreference.setOnPreferenceClickListener(pref -> {
+                        startActivity(launchIntent);
+                        return true;
+                    });
+                    webActionCategory.addPreference(mInstantAppAccountPreference);
+                }
+
                 // list to manage link handling per app
                 mDomainAppList = new PreferenceCategory(getPrefContext());
                 mDomainAppList.setTitle(R.string.domain_url_section_title);
@@ -138,9 +161,11 @@
     @Override
     public boolean onPreferenceChange(Preference preference, Object newValue) {
         if (preference == mWebAction) {
-            final int enabled = (boolean) newValue ? 1 : 0;
+            boolean checked = (boolean) newValue;
             Settings.Secure.putInt(
-                    getContentResolver(), Settings.Secure.WEB_ACTION_ENABLED, enabled);
+                    getContentResolver(),
+                    Settings.Secure.WEB_ACTION_ENABLED, checked ? 1 : 0);
+            mWebAction.setChecked(checked);
             return true;
         }
         return false;
diff --git a/src/com/android/settings/applications/PackageManagerWrapper.java b/src/com/android/settings/applications/PackageManagerWrapper.java
index 8dae417..0cfbdc5 100644
--- a/src/com/android/settings/applications/PackageManagerWrapper.java
+++ b/src/com/android/settings/applications/PackageManagerWrapper.java
@@ -24,6 +24,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.os.UserHandle;
+import android.os.storage.VolumeInfo;
 
 import java.util.List;
 
@@ -101,6 +102,11 @@
             ComponentName[] componentNames, ComponentName component);
 
     /**
+     * Calls {@code PackageManager.getPrimaryStorageCurrentVolume}
+     */
+    VolumeInfo getPrimaryStorageCurrentVolume();
+
+    /**
      * Calls {@code PackageManager.deletePackageAsUser}
      */
     void deletePackageAsUser(String packageName, IPackageDeleteObserver observer, int flags,
diff --git a/src/com/android/settings/applications/PackageManagerWrapperImpl.java b/src/com/android/settings/applications/PackageManagerWrapperImpl.java
index a0d824f..3a78e3c 100644
--- a/src/com/android/settings/applications/PackageManagerWrapperImpl.java
+++ b/src/com/android/settings/applications/PackageManagerWrapperImpl.java
@@ -24,6 +24,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.os.UserHandle;
+import android.os.storage.VolumeInfo;
 
 import java.util.List;
 
@@ -93,6 +94,11 @@
     }
 
     @Override
+    public VolumeInfo getPrimaryStorageCurrentVolume() {
+        return mPm.getPrimaryStorageCurrentVolume();
+    }
+
+    @Override
     public void deletePackageAsUser(String packageName, IPackageDeleteObserver observer, int flags,
             int userId) {
         mPm.deletePackageAsUser(packageName, observer, flags, userId);
diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java
index e3e95be..d9f96cf 100644
--- a/src/com/android/settings/dashboard/DashboardAdapter.java
+++ b/src/com/android/settings/dashboard/DashboardAdapter.java
@@ -39,7 +39,6 @@
 import com.android.settings.core.instrumentation.MetricsFeatureProvider;
 import com.android.settings.dashboard.conditional.Condition;
 import com.android.settings.dashboard.conditional.ConditionAdapterUtils;
-import com.android.settings.dashboard.suggestions.SuggestionDismissController;
 import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settingslib.drawer.DashboardCategory;
@@ -49,7 +48,7 @@
 import java.util.List;
 
 public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.DashboardItemHolder>
-        implements SummaryLoader.SummaryConsumer, SuggestionDismissController.Callback {
+        implements SummaryLoader.SummaryConsumer {
     public static final String TAG = "DashboardAdapter";
     private static final String STATE_SUGGESTION_LIST = "suggestion_list";
     private static final String STATE_CATEGORY_LIST = "category_list";
@@ -237,6 +236,7 @@
                         mDashboardData.getItemEntityByPosition(position));
                 break;
             case R.layout.suggestion_tile:
+            case R.layout.suggestion_tile_card:
                 final Tile suggestion = (Tile) mDashboardData.getItemEntityByPosition(position);
                 final String suggestionId = mSuggestionFeatureProvider.getSuggestionIdentifier(
                         mContext, suggestion);
@@ -247,7 +247,16 @@
                     mSuggestionsShownLogged.add(suggestionId);
                 }
                 onBindTile(holder, suggestion);
-                holder.itemView.setOnClickListener(v -> {
+                View clickHandler = holder.itemView;
+                // If a view with @android:id/primary is defined, use that as the click handler
+                // instead.
+                final View primaryAction = holder.itemView.findViewById(android.R.id.primary);
+                if (primaryAction != null) {
+                    clickHandler = primaryAction;
+                    // set the item view to disabled to remove any touch effects
+                    holder.itemView.setEnabled(false);
+                }
+                clickHandler.setOnClickListener(v -> {
                     mMetricsFeatureProvider.action(mContext,
                             MetricsEvent.ACTION_SETTINGS_SUGGESTION, suggestionId);
                     ((SettingsActivity) mContext).startSuggestion(suggestion.intent);
@@ -332,26 +341,6 @@
         notifyDashboardDataChanged(prevData);
     }
 
-    @Override
-    public Tile getSuggestionForPosition(int position) {
-        return (Tile) mDashboardData.getItemEntityByPosition(position);
-    }
-
-    @Override
-    public void onSuggestionDismissed(Tile suggestion) {
-        final List<Tile> suggestions = mDashboardData.getSuggestions();
-        if (suggestions == null) {
-            return;
-        }
-        suggestions.remove(suggestion);
-
-        final DashboardData prevData = mDashboardData;
-        mDashboardData = new DashboardData.Builder(prevData)
-                .setSuggestions(suggestions)
-                .build();
-        notifyDashboardDataChanged(prevData);
-    }
-
     @VisibleForTesting
     void onBindSuggestionHeader(final DashboardItemHolder holder, DashboardData
             .SuggestionHeaderData data) {
@@ -405,13 +394,19 @@
     }
 
     private void onBindTile(DashboardItemHolder holder, Tile tile) {
-        holder.icon.setImageDrawable(mCache.getIcon(tile.icon));
-        holder.title.setText(tile.title);
-        if (!TextUtils.isEmpty(tile.summary)) {
-            holder.summary.setText(tile.summary);
-            holder.summary.setVisibility(View.VISIBLE);
+        if (tile.remoteViews != null) {
+            final ViewGroup itemView = (ViewGroup) holder.itemView;
+            itemView.removeAllViews();
+            itemView.addView(tile.remoteViews.apply(itemView.getContext(), itemView));
         } else {
-            holder.summary.setVisibility(View.GONE);
+            holder.icon.setImageDrawable(mCache.getIcon(tile.icon));
+            holder.title.setText(tile.title);
+            if (!TextUtils.isEmpty(tile.summary)) {
+                holder.summary.setText(tile.summary);
+                holder.summary.setVisibility(View.VISIBLE);
+            } else {
+                holder.summary.setVisibility(View.GONE);
+            }
         }
     }
 
diff --git a/src/com/android/settings/dashboard/DashboardData.java b/src/com/android/settings/dashboard/DashboardData.java
index 4e8c7a0..0a5ff35 100644
--- a/src/com/android/settings/dashboard/DashboardData.java
+++ b/src/com/android/settings/dashboard/DashboardData.java
@@ -218,7 +218,13 @@
      */
     private void countSuggestion(Tile tile, boolean add) {
         if (add) {
-            mItems.add(new Item(tile, R.layout.suggestion_tile, Objects.hash(tile.title), false));
+            mItems.add(new Item(
+                    tile,
+                    tile.remoteViews != null
+                            ? R.layout.suggestion_tile_card
+                            : R.layout.suggestion_tile,
+                    Objects.hash(tile.title),
+                    false));
         }
         mId++;
     }
diff --git a/src/com/android/settings/dashboard/DashboardSummary.java b/src/com/android/settings/dashboard/DashboardSummary.java
index 67eae1e..f3a78aa 100644
--- a/src/com/android/settings/dashboard/DashboardSummary.java
+++ b/src/com/android/settings/dashboard/DashboardSummary.java
@@ -34,7 +34,9 @@
 import com.android.settings.dashboard.conditional.Condition;
 import com.android.settings.dashboard.conditional.ConditionAdapterUtils;
 import com.android.settings.dashboard.conditional.ConditionManager;
+import com.android.settings.dashboard.conditional.ConditionManager.ConditionListener;
 import com.android.settings.dashboard.conditional.FocusRecyclerView;
+import com.android.settings.dashboard.conditional.FocusRecyclerView.FocusListener;
 import com.android.settings.dashboard.suggestions.SuggestionDismissController;
 import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
 import com.android.settings.dashboard.suggestions.SuggestionsChecks;
@@ -43,14 +45,15 @@
 import com.android.settingslib.drawer.CategoryKey;
 import com.android.settingslib.drawer.DashboardCategory;
 import com.android.settingslib.drawer.SettingsDrawerActivity;
+import com.android.settingslib.drawer.SettingsDrawerActivity.CategoryListener;
 import com.android.settingslib.drawer.Tile;
 
 import java.util.ArrayList;
 import java.util.List;
 
 public class DashboardSummary extends InstrumentedFragment
-        implements SettingsDrawerActivity.CategoryListener, ConditionManager.ConditionListener,
-        FocusRecyclerView.FocusListener {
+        implements CategoryListener, ConditionListener,
+        FocusListener, SuggestionDismissController.Callback {
     public static final boolean DEBUG = false;
     private static final boolean DEBUG_TIMING = false;
     private static final int MAX_WAIT_MILLIS = 700;
@@ -195,7 +198,7 @@
         mAdapter = new DashboardAdapter(getContext(), bundle, mConditionManager.getConditions());
         mDashboard.setAdapter(mAdapter);
         mSuggestionDismissHandler = new SuggestionDismissController(
-                getContext(), mDashboard, mSuggestionParser, mAdapter);
+                getContext(), mDashboard, mSuggestionParser, this);
         mDashboard.setItemAnimator(new DashboardItemAnimator());
         mSummaryLoader.setSummaryConsumer(mAdapter);
         ConditionAdapterUtils.addDismiss(mDashboard);
@@ -236,6 +239,18 @@
         }
     }
 
+    @Override
+    public Tile getSuggestionForPosition(int position) {
+        return (Tile) mAdapter.getItem(mAdapter.getItemId(position));
+    }
+
+    @Override
+    public void onSuggestionDismissed(Tile suggestion) {
+        // Refresh the UI to pick up suggestions that can now be shown because, say, a higher
+        // priority suggestion has been dismissed, or an exclusive suggestion category is emptied.
+        rebuildUI();
+    }
+
     private class SuggestionLoader extends AsyncTask<Void, Void, List<Tile>> {
         @Override
         protected List<Tile> doInBackground(Void... params) {
diff --git a/src/com/android/settings/dashboard/suggestions/SuggestionDismissController.java b/src/com/android/settings/dashboard/suggestions/SuggestionDismissController.java
index 708aadb..820963f 100644
--- a/src/com/android/settings/dashboard/suggestions/SuggestionDismissController.java
+++ b/src/com/android/settings/dashboard/suggestions/SuggestionDismissController.java
@@ -65,7 +65,9 @@
 
     @Override
     public int getSwipeDirs(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
-        if (viewHolder.getItemViewType() == R.layout.suggestion_tile) {
+        final int layoutId = viewHolder.getItemViewType();
+        if (layoutId == R.layout.suggestion_tile
+                || layoutId == R.layout.suggestion_tile_card) {
             // Only return swipe direction for suggestion tiles. All other types are not swipeable.
             return super.getSwipeDirs(recyclerView, viewHolder);
         }
diff --git a/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImpl.java b/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImpl.java
index 779a8aa..f3f8af9 100644
--- a/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImpl.java
+++ b/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImpl.java
@@ -83,7 +83,8 @@
 
     @Override
     public String getSuggestionIdentifier(Context context, Tile suggestion) {
-        if (suggestion.intent == null || suggestion.intent.getComponent() == null) {
+        if (suggestion.intent == null || suggestion.intent.getComponent() == null
+                || context == null) {
             return "unknown_suggestion";
         }
         String packageName = suggestion.intent.getComponent().getPackageName();
diff --git a/src/com/android/settings/deviceinfo/PrivateVolumeOptionMenuController.java b/src/com/android/settings/deviceinfo/PrivateVolumeOptionMenuController.java
new file mode 100644
index 0000000..4724c3d
--- /dev/null
+++ b/src/com/android/settings/deviceinfo/PrivateVolumeOptionMenuController.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2017 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.deviceinfo;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.storage.VolumeInfo;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import com.android.settings.R;
+import com.android.settings.applications.PackageManagerWrapper;
+import com.android.settings.core.lifecycle.Lifecycle;
+import com.android.settings.core.lifecycle.LifecycleObserver;
+import com.android.settings.core.lifecycle.events.OnCreateOptionsMenu;
+import com.android.settings.core.lifecycle.events.OnOptionsItemSelected;
+import com.android.settings.core.lifecycle.events.OnPrepareOptionsMenu;
+
+import java.util.Objects;
+
+/**
+ * Handles the option menu on the Storage settings.
+ */
+public class PrivateVolumeOptionMenuController implements LifecycleObserver, OnCreateOptionsMenu,
+        OnPrepareOptionsMenu, OnOptionsItemSelected {
+    private static final int OPTIONS_MENU_MIGRATE_DATA = 100;
+
+    private Context mContext;
+    private VolumeInfo mVolumeInfo;
+    private PackageManagerWrapper mPm;
+
+    public PrivateVolumeOptionMenuController(
+            Context context, VolumeInfo volumeInfo, PackageManagerWrapper packageManager) {
+        mContext = context;
+        mVolumeInfo = volumeInfo;
+        mPm = packageManager;
+    }
+
+    @Override
+    public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
+        menu.add(Menu.NONE, OPTIONS_MENU_MIGRATE_DATA, 0, R.string.storage_menu_migrate);
+    }
+
+    @Override
+    public void onPrepareOptionsMenu(Menu menu) {
+        if (mVolumeInfo == null) {
+            return;
+        }
+
+        // Only offer to migrate when not current storage
+        final VolumeInfo privateVol = mPm.getPrimaryStorageCurrentVolume();
+        final MenuItem migrate = menu.findItem(OPTIONS_MENU_MIGRATE_DATA);
+        if (migrate != null) {
+            migrate.setVisible((privateVol != null)
+                    && (privateVol.getType() == VolumeInfo.TYPE_PRIVATE)
+                    && !Objects.equals(mVolumeInfo, privateVol));
+        }
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem menuItem) {
+        if (menuItem.getItemId() == OPTIONS_MENU_MIGRATE_DATA) {
+            final Intent intent = new Intent(mContext, StorageWizardMigrateConfirm.class);
+            intent.putExtra(VolumeInfo.EXTRA_VOLUME_ID, mVolumeInfo.getId());
+            mContext.startActivity(intent);
+            return true;
+        }
+        return false;
+    }
+}
diff --git a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
index 18393ac..75c0e75 100644
--- a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
+++ b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
@@ -18,6 +18,7 @@
 
 import android.app.LoaderManager;
 import android.content.Context;
+import android.content.Intent;
 import android.content.Loader;
 import android.os.Bundle;
 import android.os.UserHandle;
@@ -25,11 +26,17 @@
 import android.os.storage.StorageManager;
 import android.os.storage.VolumeInfo;
 import android.provider.SearchIndexableResource;
+import android.support.annotation.VisibleForTesting;
+import android.util.Log;
 import android.util.SparseArray;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
 
 import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.Utils;
+import com.android.settings.applications.PackageManagerWrapper;
 import com.android.settings.applications.PackageManagerWrapperImpl;
 import com.android.settings.applications.UserManagerWrapper;
 import com.android.settings.applications.UserManagerWrapperImpl;
@@ -48,16 +55,19 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 
 public class StorageDashboardFragment extends DashboardFragment
     implements LoaderManager.LoaderCallbacks<SparseArray<StorageAsyncLoader.AppsStorageResult>> {
     private static final String TAG = "StorageDashboardFrag";
     private static final int STORAGE_JOB_ID = 0;
+    private static final int OPTIONS_MENU_MIGRATE_DATA = 100;
 
     private VolumeInfo mVolume;
 
     private StorageSummaryDonutPreferenceController mSummaryController;
     private StorageItemPreferenceController mPreferenceController;
+    private PrivateVolumeOptionMenuController mOptionMenuController;
     private List<PreferenceController> mSecondaryUsers;
 
     @Override
@@ -101,6 +111,9 @@
             return;
         }
 
+        mOptionMenuController = new PrivateVolumeOptionMenuController(
+                context, mVolume, new PackageManagerWrapperImpl(context.getPackageManager()));
+
         final long sharedDataSize = mVolume.getPath().getTotalSpace();
         long totalSize = sm.getPrimaryStorageSize();
         long systemSize = totalSize - sharedDataSize;
@@ -161,10 +174,16 @@
                 new AutomaticStorageManagementSwitchPreferenceController(
                         context, mMetricsFeatureProvider, getFragmentManager());
         getLifecycle().addObserver(asmController);
+        getLifecycle().addObserver(mOptionMenuController);
         controllers.add(asmController);
         return controllers;
     }
 
+    @VisibleForTesting
+    protected void setVolume(VolumeInfo info) {
+        mVolume = info;
+    }
+
     /**
      * Updates the secondary user controller sizes.
      */
diff --git a/src/com/android/settings/deviceinfo/StorageProfileFragment.java b/src/com/android/settings/deviceinfo/StorageProfileFragment.java
index c5d1045..7e2d941 100644
--- a/src/com/android/settings/deviceinfo/StorageProfileFragment.java
+++ b/src/com/android/settings/deviceinfo/StorageProfileFragment.java
@@ -140,6 +140,7 @@
         // TODO(b/35927909): Attribute app sizes better than zeroing out for profiles.
         result.gamesSize = 0;
         result.musicAppsSize = 0;
+        result.videoAppsSize = 0;
         result.otherAppsSize = 0;
         return result;
     }
diff --git a/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java b/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java
index ae5e5f1..e83c5d2 100644
--- a/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java
+++ b/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java
@@ -18,6 +18,7 @@
 
 import static android.content.pm.ApplicationInfo.CATEGORY_AUDIO;
 import static android.content.pm.ApplicationInfo.CATEGORY_GAME;
+import static android.content.pm.ApplicationInfo.CATEGORY_VIDEO;
 
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
@@ -99,6 +100,9 @@
                 case CATEGORY_AUDIO:
                     result.musicAppsSize += attributedAppSizeInBytes;
                     break;
+                case CATEGORY_VIDEO:
+                    result.videoAppsSize += attributedAppSizeInBytes;
+                    break;
                 default:
                     // The deprecated game flag does not set the category.
                     if ((app.flags & ApplicationInfo.FLAG_IS_GAME) != 0) {
@@ -123,6 +127,7 @@
     public static class AppsStorageResult {
         public long gamesSize;
         public long musicAppsSize;
+        public long videoAppsSize;
         public long otherAppsSize;
         public long systemSize;
         public StorageStatsSource.ExternalStorageStats externalStats;
diff --git a/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java b/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java
index 5b27592..36694f0 100644
--- a/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java
@@ -65,6 +65,8 @@
     @VisibleForTesting
     static final String GAME_KEY = "pref_games";
     @VisibleForTesting
+    static final String MOVIES_KEY = "pref_movies";
+    @VisibleForTesting
     static final String OTHER_APPS_KEY = "pref_other_apps";
     @VisibleForTesting
     static final String SYSTEM_KEY = "pref_system";
@@ -82,6 +84,7 @@
     private StorageItemPreference mPhotoPreference;
     private StorageItemPreference mAudioPreference;
     private StorageItemPreference mGamePreference;
+    private StorageItemPreference mMoviesPreference;
     private StorageItemPreference mAppPreference;
     private StorageItemPreference mFilePreference;
     private StorageItemPreference mSystemPreference;
@@ -123,6 +126,9 @@
             case GAME_KEY:
                 intent = getGamesIntent();
                 break;
+            case MOVIES_KEY:
+                intent = getMoviesIntent();
+                break;
             case OTHER_APPS_KEY:
                 // Because we are likely constructed with a null volume, this is theoretically
                 // possible.
@@ -204,6 +210,7 @@
         mPhotoPreference = (StorageItemPreference) screen.findPreference(PHOTO_KEY);
         mAudioPreference = (StorageItemPreference) screen.findPreference(AUDIO_KEY);
         mGamePreference = (StorageItemPreference) screen.findPreference(GAME_KEY);
+        mMoviesPreference = (StorageItemPreference) screen.findPreference(MOVIES_KEY);
         mAppPreference = (StorageItemPreference) screen.findPreference(OTHER_APPS_KEY);
         mSystemPreference = (StorageItemPreference) screen.findPreference(SYSTEM_KEY);
         mFilePreference = (StorageItemPreference) screen.findPreference(FILES_KEY);
@@ -217,6 +224,7 @@
         mAudioPreference.setStorageSize(
                 data.musicAppsSize + data.externalStats.audioBytes, mTotalSize);
         mGamePreference.setStorageSize(data.gamesSize, mTotalSize);
+        mMoviesPreference.setStorageSize(data.videoAppsSize, mTotalSize);
         mAppPreference.setStorageSize(data.otherAppsSize, mTotalSize);
         if (mSystemPreference != null) {
             mSystemPreference.setStorageSize(mSystemSize + data.systemSize, mTotalSize);
@@ -243,6 +251,7 @@
         list.add(PHOTO_KEY);
         list.add(AUDIO_KEY);
         list.add(GAME_KEY);
+        list.add(MOVIES_KEY);
         list.add(OTHER_APPS_KEY);
         list.add(SYSTEM_KEY);
         list.add(FILES_KEY);
@@ -281,12 +290,21 @@
     }
 
     private Intent getGamesIntent() {
-            Bundle args = new Bundle(1);
-            args.putString(ManageApplications.EXTRA_CLASSNAME,
-                    Settings.GamesStorageActivity.class.getName());
-            return Utils.onBuildStartFragmentIntent(mContext,
-                    ManageApplications.class.getName(), args, null, R.string.game_storage_settings,
-                    null, false, mMetricsFeatureProvider.getMetricsCategory(mFragment));
+        Bundle args = new Bundle(1);
+        args.putString(ManageApplications.EXTRA_CLASSNAME,
+                Settings.GamesStorageActivity.class.getName());
+        return Utils.onBuildStartFragmentIntent(mContext,
+                ManageApplications.class.getName(), args, null, R.string.game_storage_settings,
+                null, false, mMetricsFeatureProvider.getMetricsCategory(mFragment));
+    }
+
+    private Intent getMoviesIntent() {
+        Bundle args = new Bundle(1);
+        args.putString(ManageApplications.EXTRA_CLASSNAME,
+                Settings.MoviesStorageActivity.class.getName());
+        return Utils.onBuildStartFragmentIntent(mContext,
+                ManageApplications.class.getName(), args, null, R.string.storage_movies_tv,
+                null, false, mMetricsFeatureProvider.getMetricsCategory(mFragment));
     }
 
     private Intent getFilesIntent() {
diff --git a/src/com/android/settings/display/ScreenZoomSettings.java b/src/com/android/settings/display/ScreenZoomSettings.java
index 7538cd3..ec3999b 100644
--- a/src/com/android/settings/display/ScreenZoomSettings.java
+++ b/src/com/android/settings/display/ScreenZoomSettings.java
@@ -94,6 +94,11 @@
     }
 
     @Override
+    public int getHelpResource() {
+        return R.string.help_url_display_size;
+    }
+
+    @Override
     public int getMetricsCategory() {
         return MetricsEvent.DISPLAY_SCREEN_ZOOM;
     }
diff --git a/src/com/android/settings/search2/IntentSearchViewHolder.java b/src/com/android/settings/search2/IntentSearchViewHolder.java
index f0cbc51..0596397 100644
--- a/src/com/android/settings/search2/IntentSearchViewHolder.java
+++ b/src/com/android/settings/search2/IntentSearchViewHolder.java
@@ -51,6 +51,7 @@
             mMetricsFeatureProvider.action(v.getContext(),
                     MetricsEvent.ACTION_CLICK_SETTINGS_SEARCH_RESULT,
                     resultName, rank);
+            mSearchFeatureProvider.searchResultClicked(fragment.mQuery, result);
             fragment.startActivity(intent);
         });
     }
diff --git a/src/com/android/settings/search2/SearchFeatureProvider.java b/src/com/android/settings/search2/SearchFeatureProvider.java
index d3dc24b..e77a332 100644
--- a/src/com/android/settings/search2/SearchFeatureProvider.java
+++ b/src/com/android/settings/search2/SearchFeatureProvider.java
@@ -22,6 +22,8 @@
 import android.view.View;
 import com.android.settings.dashboard.SiteMapManager;
 
+import java.util.List;
+
 /**
  * FeatureProvider for Settings Search
  */
@@ -89,5 +91,29 @@
     default void hideFeedbackButton() {
     }
 
+    /**
+     * Ranks search results based on the input query.
+     *
+     * @param query input user query
+     * @param searchResults list of search results to be ranked
+     */
+    default void rankSearchResults(String query, List<SearchResult> searchResults) {
+    }
+
+    /**
+     * Notify that a search result is clicked.
+     *
+     * @param query input user query
+     * @param searchResult clicked result
+     */
+    default void searchResultClicked(String query, SearchResult searchResult) {
+    }
+
+    /**
+     * @return true to enable search ranking.
+     */
+    default boolean isSmartSearchRankingEnabled(Context context) {
+        return false;
+    }
 
 }
diff --git a/src/com/android/settings/search2/SearchFragment.java b/src/com/android/settings/search2/SearchFragment.java
index 8e1e1b4..a8d219c 100644
--- a/src/com/android/settings/search2/SearchFragment.java
+++ b/src/com/android/settings/search2/SearchFragment.java
@@ -117,7 +117,7 @@
         super.onCreate(savedInstanceState);
         setHasOptionsMenu(true);
         final LoaderManager loaderManager = getLoaderManager();
-        mSearchAdapter = new SearchResultsAdapter(this);
+        mSearchAdapter = new SearchResultsAdapter(this, mSearchFeatureProvider);
         mSavedQueryController = new SavedQueryController(
                 getContext(), loaderManager, mSearchAdapter);
         mSearchFeatureProvider.initFeedbackButton();
@@ -251,7 +251,7 @@
         if (mUnfinishedLoadersCount.decrementAndGet() != 0) {
             return;
         }
-        final int resultCount = mSearchAdapter.displaySearchResults();
+        final int resultCount = mSearchAdapter.displaySearchResults(mQuery);
         mNoResultsView.setVisibility(resultCount == 0 ? View.VISIBLE : View.GONE);
         mSearchFeatureProvider.showFeedbackButton(this, getView());
     }
diff --git a/src/com/android/settings/search2/SearchResultsAdapter.java b/src/com/android/settings/search2/SearchResultsAdapter.java
index 6ff68b1..d0ea5bf 100644
--- a/src/com/android/settings/search2/SearchResultsAdapter.java
+++ b/src/com/android/settings/search2/SearchResultsAdapter.java
@@ -40,11 +40,14 @@
     private final List<SearchResult> mSearchResults;
     private final SearchFragment mFragment;
     private Map<String, List<? extends SearchResult>> mResultsMap;
+    private final SearchFeatureProvider mSearchFeatureProvider;
 
-    public SearchResultsAdapter(SearchFragment fragment) {
+    public SearchResultsAdapter(SearchFragment fragment,
+            SearchFeatureProvider searchFeatureProvider) {
         mFragment = fragment;
         mSearchResults = new ArrayList<>();
         mResultsMap = new ArrayMap<>();
+        mSearchFeatureProvider = searchFeatureProvider;
 
         setHasStableIds(true);
     }
@@ -119,9 +122,10 @@
      * Merge the results from each of the loaders into one list for the adapter.
      * Prioritizes results from the local database over installed apps.
      *
+     * @param query user query corresponding to these results
      * @return Number of matched results
      */
-    public int displaySearchResults() {
+    public int displaySearchResults(String query) {
         final List<? extends SearchResult> databaseResults = mResultsMap
                 .get(DatabaseResultLoader.class.getName());
         final List<? extends SearchResult> installedAppResults = mResultsMap
@@ -151,6 +155,12 @@
             results.add(installedAppResults.get(appIndex++));
         }
 
+        if (mSearchFeatureProvider
+                .isSmartSearchRankingEnabled(mFragment.getContext().getApplicationContext())) {
+            // TODO: run this in parallel to loading the results if takes too long
+            mSearchFeatureProvider.rankSearchResults(query, results);
+        }
+
         mSearchResults.addAll(results);
         notifyDataSetChanged();
 
diff --git a/src/com/android/settings/search2/SearchViewHolder.java b/src/com/android/settings/search2/SearchViewHolder.java
index 123a602..1439833 100644
--- a/src/com/android/settings/search2/SearchViewHolder.java
+++ b/src/com/android/settings/search2/SearchViewHolder.java
@@ -40,11 +40,14 @@
     public final ImageView iconView;
 
     protected final MetricsFeatureProvider mMetricsFeatureProvider;
+    protected final SearchFeatureProvider mSearchFeatureProvider;
 
     public SearchViewHolder(View view) {
         super(view);
-        mMetricsFeatureProvider = FeatureFactory.getFactory(view.getContext())
-                .getMetricsFeatureProvider();
+        final FeatureFactory featureFactory = FeatureFactory
+                .getFactory(view.getContext().getApplicationContext());
+        mMetricsFeatureProvider = featureFactory.getMetricsFeatureProvider();
+        mSearchFeatureProvider = featureFactory.getSearchFeatureProvider();
         titleView = view.findViewById(android.R.id.title);
         summaryView = view.findViewById(android.R.id.summary);
         iconView = view.findViewById(android.R.id.icon);
diff --git a/tests/app/src/com/android/settings/EncryptionInterstitialTest.java b/tests/app/src/com/android/settings/EncryptionInterstitialTest.java
index 6487818..f30d511 100644
--- a/tests/app/src/com/android/settings/EncryptionInterstitialTest.java
+++ b/tests/app/src/com/android/settings/EncryptionInterstitialTest.java
@@ -16,38 +16,89 @@
 
 package com.android.settings;
 
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.action.ViewActions.click;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import android.app.Activity;
 import android.app.Instrumentation;
+import android.app.Instrumentation.ActivityMonitor;
+import android.app.Instrumentation.ActivityResult;
 import android.content.Context;
 import android.content.Intent;
 import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
+import android.support.test.filters.MediumTest;
 import android.support.test.runner.AndroidJUnit4;
 
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
-
 @RunWith(AndroidJUnit4.class)
-@SmallTest
+@MediumTest
 public class EncryptionInterstitialTest {
 
     private Instrumentation mInstrumentation;
     private Context mContext;
+    private TestActivityMonitor mActivityMonitor;
 
     @Before
     public void setUp() {
         mInstrumentation = InstrumentationRegistry.getInstrumentation();
         mContext = mInstrumentation.getTargetContext();
+        mActivityMonitor = new TestActivityMonitor();
+        mInstrumentation.addMonitor(mActivityMonitor);
+    }
+
+    @After
+    public void tearDown() {
+        mInstrumentation.removeMonitor(mActivityMonitor);
     }
 
     @Test
-    public void clickHeader_shouldNotCrash() {
+    public void clickYes_shouldRequirePassword() {
         mInstrumentation.startActivitySync(
-                new Intent().setClassName(mContext, EncryptionInterstitial.class.getName()));
-        onView(withId(R.id.encryption_interstitial_header));
-        // Nothing should happen
+                new Intent(mContext, EncryptionInterstitial.class)
+                        .putExtra("extra_unlock_method_intent", new Intent("test.unlock.intent")));
+        onView(withId(R.id.encrypt_require_password)).perform(click());
+
+        mActivityMonitor.waitForActivityWithTimeout(1000);
+        assertEquals(1, mActivityMonitor.getHits());
+
+        assertTrue(mActivityMonitor.mMatchedIntent.getBooleanExtra(
+                EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, false));
+    }
+
+    @Test
+    public void clickNo_shouldNotRequirePassword() {
+        mInstrumentation.startActivitySync(
+                new Intent(mContext, EncryptionInterstitial.class)
+                        .putExtra("extra_unlock_method_intent", new Intent("test.unlock.intent")));
+        onView(withId(R.id.encrypt_dont_require_password)).perform(click());
+
+        mActivityMonitor.waitForActivityWithTimeout(1000);
+        assertEquals(1, mActivityMonitor.getHits());
+
+        assertFalse(mActivityMonitor.mMatchedIntent.getBooleanExtra(
+                EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true));
+    }
+
+    private static class TestActivityMonitor extends ActivityMonitor {
+
+        Intent mMatchedIntent = null;
+
+        @Override
+        public ActivityResult onMatchIntent(Intent intent) {
+            if ("test.unlock.intent".equals(intent.getAction())) {
+                mMatchedIntent = intent;
+                return new ActivityResult(Activity.RESULT_OK, null);
+            }
+            return null;
+        }
     }
 }
diff --git a/tests/robotests/res/drawable/selectable_card.xml b/tests/robotests/res/drawable/selectable_card.xml
new file mode 100644
index 0000000..8d1274a
--- /dev/null
+++ b/tests/robotests/res/drawable/selectable_card.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2017 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.
+-->
+
+<ripple
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:color="?android:attr/colorControlHighlight">
+    <!-- Overlay this since Robolectric has trouble inflating ?android:attr/colorBackground -->
+    <item android:drawable="@android:color/transparent"/>
+</ripple>
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
index d7daa03..365ba55 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
@@ -15,14 +15,32 @@
  */
 package com.android.settings.dashboard;
 
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.robolectric.RuntimeEnvironment.application;
+
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
+import android.view.ContextThemeWrapper;
 import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
 import android.widget.FrameLayout;
+import android.widget.RemoteViews;
+import android.widget.TextView;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.settings.R;
+import com.android.settings.SettingsActivity;
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 import com.android.settings.dashboard.conditional.Condition;
@@ -39,18 +57,13 @@
 import org.mockito.Captor;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
-import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH,
         sdk = TestConfig.SDK_VERSION,
@@ -62,7 +75,7 @@
 public class DashboardAdapterTest {
 
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
-    private Context mContext;
+    private SettingsActivity mContext;
     @Mock
     private View mView;
     @Mock
@@ -109,7 +122,7 @@
 
     @Test
     public void testSuggestionsLogs_NotExpanded() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1", "pkg2", "pkg3"}));
+        setUpSuggestions(makeSuggestions("pkg1", "pkg2", "pkg3"));
         verify(mFactory.metricsFeatureProvider, times(2)).action(
                 any(Context.class), mActionCategoryCaptor.capture(),
                 mActionPackageCaptor.capture());
@@ -124,7 +137,7 @@
 
     @Test
     public void testSuggestionsLogs_NotExpandedAndPaused() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1", "pkg2", "pkg3"}));
+        setUpSuggestions(makeSuggestions("pkg1", "pkg2", "pkg3"));
         mDashboardAdapter.onPause();
         verify(mFactory.metricsFeatureProvider, times(4)).action(
                 any(Context.class), mActionCategoryCaptor.capture(),
@@ -141,7 +154,7 @@
 
     @Test
     public void testSuggestionsLogs_Expanded() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1", "pkg2", "pkg3"}));
+        setUpSuggestions(makeSuggestions("pkg1", "pkg2", "pkg3"));
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
         mSuggestionHolder.itemView.callOnClick();
@@ -160,7 +173,7 @@
 
     @Test
     public void testSuggestionsLogs_ExpandedAndPaused() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1", "pkg2", "pkg3"}));
+        setUpSuggestions(makeSuggestions("pkg1", "pkg2", "pkg3"));
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
         mSuggestionHolder.itemView.callOnClick();
@@ -183,7 +196,7 @@
 
     @Test
     public void testSuggestionsLogs_ExpandedAfterPause() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1", "pkg2", "pkg3"}));
+        setUpSuggestions(makeSuggestions("pkg1", "pkg2", "pkg3"));
         mDashboardAdapter.onPause();
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
@@ -208,7 +221,7 @@
 
     @Test
     public void testSuggestionsLogs_ExpandedAfterPauseAndPausedAgain() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1", "pkg2", "pkg3"}));
+        setUpSuggestions(makeSuggestions("pkg1", "pkg2", "pkg3"));
         mDashboardAdapter.onPause();
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
@@ -237,7 +250,7 @@
 
     @Test
     public void testSuggestionsLogs_ExpandedWithLessThanDefaultShown() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1"}));
+        setUpSuggestions(makeSuggestions("pkg1"));
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
         mSuggestionHolder.itemView.callOnClick();
@@ -254,7 +267,7 @@
 
     @Test
     public void testSuggestionsLogs_ExpandedWithLessThanDefaultShownAndPaused() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1"}));
+        setUpSuggestions(makeSuggestions("pkg1"));
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
         mSuggestionHolder.itemView.callOnClick();
@@ -273,7 +286,7 @@
 
     @Test
     public void testSuggestionsLogs_ExpandedWithLessThanDefaultShownAfterPause() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1"}));
+        setUpSuggestions(makeSuggestions("pkg1"));
         mDashboardAdapter.onPause();
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
@@ -293,7 +306,7 @@
 
     @Test
     public void testSuggestionsLogs_ExpandedWithLessThanDefaultShownAfterPauseAndPausedAgain() {
-        setUpSuggestions(makeSuggestions(new String[]{"pkg1"}));
+        setUpSuggestions(makeSuggestions("pkg1"));
         mDashboardAdapter.onPause();
         mDashboardAdapter.onBindSuggestionHeader(
                 mSuggestionHolder, mSuggestionHeaderData);
@@ -313,7 +326,78 @@
         assertThat(mActionCategoryCaptor.getAllValues().toArray()).isEqualTo(expectedActions);
     }
 
-    private List<Tile> makeSuggestions(String[] pkgNames) {
+    @Test
+    public void testBindViewHolder_inflateRemoteView() {
+        List<Tile> packages = makeSuggestions("pkg1");
+        RemoteViews remoteViews = mock(RemoteViews.class);
+        TextView textView = new TextView(application);
+        doReturn(textView).when(remoteViews).apply(any(Context.class), any(ViewGroup.class));
+        packages.get(0).remoteViews = remoteViews;
+        mDashboardAdapter.setCategoriesAndSuggestions(Collections.emptyList(), packages);
+        mSuggestionHolder = mDashboardAdapter.onCreateViewHolder(
+                new FrameLayout(application),
+                R.layout.suggestion_tile_card);
+
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
+        assertThat(textView.getParent()).isSameAs(mSuggestionHolder.itemView);
+        mSuggestionHolder.itemView.performClick();
+
+        verify(mContext).startSuggestion(any(Intent.class));
+    }
+
+    @Test
+    public void testBindViewHolder_primaryViewHandlesClick() {
+        Context context = new ContextThemeWrapper(application, R.style.Theme_Settings);
+
+        List<Tile> packages = makeSuggestions("pkg1");
+        RemoteViews remoteViews = mock(RemoteViews.class);
+        FrameLayout layout = new FrameLayout(context);
+        Button primary = new Button(context);
+        primary.setId(android.R.id.primary);
+        layout.addView(primary);
+        doReturn(layout).when(remoteViews).apply(any(Context.class), any(ViewGroup.class));
+        packages.get(0).remoteViews = remoteViews;
+        mDashboardAdapter.setCategoriesAndSuggestions(Collections.emptyList(), packages);
+        mSuggestionHolder = mDashboardAdapter.onCreateViewHolder(
+                new FrameLayout(context),
+                R.layout.suggestion_tile_card);
+
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
+
+        mSuggestionHolder.itemView.performClick();
+        assertThat(ShadowApplication.getInstance().getNextStartedActivity()).isNull();
+        verify(mContext, never()).startSuggestion(any(Intent.class));
+
+        primary.performClick();
+
+        verify(mContext).startSuggestion(any(Intent.class));
+    }
+
+    @Test
+    public void testBindViewHolder_viewsClearedOnRebind() {
+        Context context = new ContextThemeWrapper(application, R.style.Theme_Settings);
+
+        List<Tile> packages = makeSuggestions("pkg1");
+        RemoteViews remoteViews = mock(RemoteViews.class);
+        FrameLayout layout = new FrameLayout(context);
+        Button primary = new Button(context);
+        primary.setId(android.R.id.primary);
+        layout.addView(primary);
+        doReturn(layout).when(remoteViews).apply(any(Context.class), any(ViewGroup.class));
+        packages.get(0).remoteViews = remoteViews;
+        mDashboardAdapter.setCategoriesAndSuggestions(Collections.emptyList(), packages);
+        mSuggestionHolder = mDashboardAdapter.onCreateViewHolder(
+                new FrameLayout(context),
+                R.layout.suggestion_tile_card);
+
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
+        mDashboardAdapter.onBindViewHolder(mSuggestionHolder, 1);
+
+        ViewGroup itemView = (ViewGroup) mSuggestionHolder.itemView;
+        assertThat(itemView.getChildCount()).isEqualTo(1);
+    }
+
+    private List<Tile> makeSuggestions(String... pkgNames) {
         final List<Tile> suggestions = new ArrayList<>();
         for (String pkgName : pkgNames) {
             Tile suggestion = new Tile();
@@ -327,7 +411,7 @@
     private void setUpSuggestions(List<Tile> suggestions) {
         mDashboardAdapter.setCategoriesAndSuggestions(new ArrayList<>(), suggestions);
         mSuggestionHolder = mDashboardAdapter.onCreateViewHolder(
-                new FrameLayout(RuntimeEnvironment.application),
+                new FrameLayout(application),
                 mDashboardAdapter.getItemViewType(0));
     }
 
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardSummaryTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardSummaryTest.java
index a8e294c..c2f7646 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardSummaryTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardSummaryTest.java
@@ -24,6 +24,7 @@
 import com.android.settings.dashboard.conditional.ConditionManager;
 import com.android.settings.dashboard.conditional.FocusRecyclerView;
 import com.android.settingslib.drawer.CategoryKey;
+import com.android.settingslib.drawer.Tile;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -109,4 +110,11 @@
         mSummary.onCategoriesChanged();
         verify(mSummary).rebuildUI();
     }
+
+    @Test
+    public void onSuggestionDismissed_categoryShouldBeRefreshed() {
+        doNothing().when(mSummary).rebuildUI();
+        mSummary.onSuggestionDismissed(mock(Tile.class));
+        verify(mSummary).rebuildUI();
+    }
 }
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionDismissControllerTest.java b/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionDismissControllerTest.java
index 4a41ede..e85621e 100644
--- a/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionDismissControllerTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionDismissControllerTest.java
@@ -86,6 +86,15 @@
     }
 
     @Test
+    public void getSwipeDirs_isSuggestionTileCard_shouldReturnDirection() {
+        final RecyclerView.ViewHolder vh = mock(RecyclerView.ViewHolder.class);
+        when(vh.getItemViewType()).thenReturn(R.layout.suggestion_tile_card);
+
+        assertThat(mController.getSwipeDirs(mRecyclerView, vh))
+                .isEqualTo(ItemTouchHelper.START | ItemTouchHelper.END);
+    }
+
+    @Test
     public void getSwipeDirs_isNotSuggestionTile_shouldReturn0() {
         final RecyclerView.ViewHolder vh = mock(RecyclerView.ViewHolder.class);
         when(vh.getItemViewType()).thenReturn(R.layout.condition_card);
diff --git a/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImplTest.java
index 3efe15a..6183acc 100644
--- a/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImplTest.java
@@ -108,6 +108,15 @@
     }
 
     @Test
+    public void getSuggestionIdentifier_nullContext_shouldNotCrash() {
+        final Tile suggestion = new Tile();
+        suggestion.intent = new Intent()
+            .setClassName(RuntimeEnvironment.application.getPackageName(), "123");
+        assertThat(mProvider.getSuggestionIdentifier(null, suggestion))
+            .isNotEmpty();
+    }
+
+    @Test
     public void dismissSuggestion_hasMoreDismissCount_shouldNotDisableComponent() {
         when(mSuggestionParser.dismissSuggestion(any(Tile.class), anyBoolean()))
                 .thenReturn(false);
@@ -120,7 +129,6 @@
         verify(mContext, never()).getPackageManager();
     }
 
-
     @Test
     public void dismissSuggestion_noContext_shouldDoNothing() {
         mProvider.dismissSuggestion(null, mSuggestionParser, mSuggestion);
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/PrivateVolumeOptionMenuControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/PrivateVolumeOptionMenuControllerTest.java
new file mode 100644
index 0000000..9ac9eb4
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/deviceinfo/PrivateVolumeOptionMenuControllerTest.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2017 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.deviceinfo;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.os.storage.VolumeInfo;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import com.android.settings.R;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.applications.PackageManagerWrapper;
+import com.android.settings.testutils.FakeFeatureFactory;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Answers;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class PrivateVolumeOptionMenuControllerTest {
+    @Mock
+    private MenuItem mMigrateMenuItem;
+    @Mock(answer = Answers.RETURNS_DEEP_STUBS)
+    private Menu mMenu;
+    @Mock
+    private MenuInflater mMenuInflater;
+    @Mock
+    private PackageManagerWrapper mPm;
+    @Mock
+    private VolumeInfo mVolumeInfo;
+    @Mock
+    private VolumeInfo mPrimaryInfo;
+
+    private PrivateVolumeOptionMenuController mController;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+
+        when(mVolumeInfo.getType()).thenReturn(VolumeInfo.TYPE_PRIVATE);
+        when(mPrimaryInfo.getType()).thenReturn(VolumeInfo.TYPE_PRIVATE);
+        when(mMenu.findItem(anyInt())).thenReturn(mMigrateMenuItem);
+        when(mMigrateMenuItem.getItemId()).thenReturn(100);
+
+        mController = new PrivateVolumeOptionMenuController(
+                RuntimeEnvironment.application, mPrimaryInfo, mPm);
+    }
+
+    @Test
+    public void testMigrateDataMenuItemIsAdded() {
+        mController.onCreateOptionsMenu(mMenu, mMenuInflater);
+
+        verify(mMenu).add(Menu.NONE, 100, Menu.NONE, R.string.storage_menu_migrate);
+    }
+
+    @Test
+    public void testMigrateDataIsNotVisibleNormally() {
+        when(mPm.getPrimaryStorageCurrentVolume()).thenReturn(mPrimaryInfo);
+
+        mController.onCreateOptionsMenu(mMenu, mMenuInflater);
+        mController.onPrepareOptionsMenu(mMenu);
+
+        verify(mMigrateMenuItem).setVisible(false);
+    }
+
+    @Test
+    public void testMigrateDataIsVisibleWhenExternalVolumeIsPrimary() {
+        when(mPm.getPrimaryStorageCurrentVolume()).thenReturn(mVolumeInfo);
+
+        mController.onCreateOptionsMenu(mMenu, mMenuInflater);
+        mController.onPrepareOptionsMenu(mMenu);
+
+        verify(mMigrateMenuItem).setVisible(true);
+    }
+
+    @Test
+    public void testMigrateDataGoesToMigrateWizard() {
+        when(mPm.getPrimaryStorageCurrentVolume()).thenReturn(mVolumeInfo);
+
+        mController.onCreateOptionsMenu(mMenu, mMenuInflater);
+        mController.onPrepareOptionsMenu(mMenu);
+
+        assertThat(mController.onOptionsItemSelected(mMigrateMenuItem)).isTrue();
+        assertThat(ShadowApplication.getInstance()
+                .getNextStartedActivity().getComponent().getClassName())
+                .isEqualTo(StorageWizardMigrateConfirm.class.getName());
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java b/tests/robotests/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java
index 9baeda3..b3253f9 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java
@@ -13,12 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License
  */
+
 package com.android.settings.deviceinfo;
 
-import android.os.Bundle;
-import android.os.storage.DiskInfo;
+import static com.google.common.truth.Truth.assertThat;
+
 import android.os.storage.StorageManager;
-import android.os.storage.VolumeInfo;
 import android.provider.SearchIndexableResource;
 
 import com.android.settings.SettingsRobolectricTestRunner;
@@ -36,15 +36,9 @@
 
 import java.util.List;
 
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.when;
-
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
 public class StorageDashboardFragmentTest {
-
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private StorageManager mStorageManager;
 
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/StorageProfileFragmentTest.java b/tests/robotests/src/com/android/settings/deviceinfo/StorageProfileFragmentTest.java
index 8da2a9c..8d48e63 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/StorageProfileFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/StorageProfileFragmentTest.java
@@ -44,6 +44,7 @@
         result.musicAppsSize = 100;
         result.otherAppsSize = 200;
         result.gamesSize = 300;
+        result.videoAppsSize = 400;
         result.externalStats = new StorageStatsSource.ExternalStorageStats(6, 1, 2, 3);
         SparseArray<StorageAsyncLoader.AppsStorageResult> resultsArray = new SparseArray<>();
         resultsArray.put(0, result);
@@ -57,6 +58,7 @@
 
         StorageAsyncLoader.AppsStorageResult extractedResult = resultCaptor.getValue();
         assertThat(extractedResult.musicAppsSize).isEqualTo(0);
+        assertThat(extractedResult.videoAppsSize).isEqualTo(0);
         assertThat(extractedResult.otherAppsSize).isEqualTo(0);
         assertThat(extractedResult.gamesSize).isEqualTo(0);
         assertThat(extractedResult.externalStats.audioBytes).isEqualTo(1);
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java
index 7d1f79b..47faf92 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java
@@ -190,6 +190,24 @@
     }
 
     @Test
+    public void testClickMovies() {
+        mPreference.setKey("pref_movies");
+        mController.handlePreferenceTreeClick(mPreference);
+
+        final ArgumentCaptor<Intent> argumentCaptor = ArgumentCaptor.forClass(Intent.class);
+        verify(mFragment.getActivity()).startActivityAsUser(argumentCaptor.capture(),
+                any(UserHandle.class));
+
+        Intent intent = argumentCaptor.getValue();
+        assertThat(intent.getAction()).isEqualTo(Intent.ACTION_MAIN);
+        assertThat(intent.getComponent().getClassName()).isEqualTo(SubSettings.class.getName());
+        assertThat(intent.getStringExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT)).isEqualTo(
+                ManageApplications.class.getName());
+        assertThat(intent.getIntExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT_TITLE_RESID, 0))
+                .isEqualTo(R.string.storage_movies_tv);
+    }
+
+    @Test
     public void testClickSystem() {
         mPreference.setKey("pref_system");
         assertThat(mController.handlePreferenceTreeClick(mPreference)).isTrue();
@@ -203,6 +221,7 @@
         StorageItemPreference audio = new StorageItemPreference(mContext);
         StorageItemPreference image = new StorageItemPreference(mContext);
         StorageItemPreference games = new StorageItemPreference(mContext);
+        StorageItemPreference movies = new StorageItemPreference(mContext);
         StorageItemPreference apps = new StorageItemPreference(mContext);
         StorageItemPreference system = new StorageItemPreference(mContext);
         StorageItemPreference files = new StorageItemPreference(mContext);
@@ -214,6 +233,8 @@
         when(screen.findPreference(
                 eq(StorageItemPreferenceController.GAME_KEY))).thenReturn(games);
         when(screen.findPreference(
+                eq(StorageItemPreferenceController.MOVIES_KEY))).thenReturn(movies);
+        when(screen.findPreference(
                 eq(StorageItemPreferenceController.OTHER_APPS_KEY))).thenReturn(apps);
         when(screen.findPreference(
                 eq(StorageItemPreferenceController.SYSTEM_KEY))).thenReturn(system);
@@ -224,6 +245,7 @@
         mController.setSystemSize(KILOBYTE * 6);
         StorageAsyncLoader.AppsStorageResult result = new StorageAsyncLoader.AppsStorageResult();
         result.gamesSize = KILOBYTE * 8;
+        result.videoAppsSize = KILOBYTE * 16;
         result.musicAppsSize = KILOBYTE * 4;
         result.otherAppsSize = KILOBYTE * 9;
         result.systemSize = KILOBYTE * 10;
@@ -240,6 +262,7 @@
         assertThat(audio.getSummary().toString()).isEqualTo("14.00KB"); // 4KB apps + 10KB files
         assertThat(image.getSummary().toString()).isEqualTo("35.00KB"); // 15KB video + 20KB images
         assertThat(games.getSummary().toString()).isEqualTo("8.00KB");
+        assertThat(movies.getSummary().toString()).isEqualTo("16.00KB");
         assertThat(apps.getSummary().toString()).isEqualTo("9.00KB");
         assertThat(system.getSummary().toString()).isEqualTo("16.00KB");
         assertThat(files.getSummary().toString()).isEqualTo("5.00KB");
diff --git a/tests/robotests/src/com/android/settings/search/SearchResultsAdapterTest.java b/tests/robotests/src/com/android/settings/search/SearchResultsAdapterTest.java
index 647d68c..f5a29ce 100644
--- a/tests/robotests/src/com/android/settings/search/SearchResultsAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/search/SearchResultsAdapterTest.java
@@ -34,6 +34,7 @@
 import com.android.settings.search2.IntentPayload;
 import com.android.settings.search2.IntentSearchViewHolder;
 import com.android.settings.search2.ResultPayload;
+import com.android.settings.search2.SearchFeatureProvider;
 import com.android.settings.search2.SearchFragment;
 import com.android.settings.search2.SearchResult;
 import com.android.settings.search2.SearchResult.Builder;
@@ -48,6 +49,14 @@
 import org.robolectric.Robolectric;
 import org.robolectric.annotation.Config;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyList;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -59,6 +68,10 @@
 
     @Mock
     private SearchFragment mFragment;
+    @Mock
+    private SearchFeatureProvider mSearchFeatureProvider;
+    @Mock
+    private Context mMockContext;
     private SearchResultsAdapter mAdapter;
     private Context mContext;
     private String mLoaderClassName;
@@ -67,8 +80,10 @@
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mContext = Robolectric.buildActivity(Activity.class).get();
-        mAdapter = new SearchResultsAdapter(mFragment);
+        mAdapter = new SearchResultsAdapter(mFragment, mSearchFeatureProvider);
         mLoaderClassName = DatabaseResultLoader.class.getName();
+        when(mFragment.getContext()).thenReturn(mMockContext);
+        when(mMockContext.getApplicationContext()).thenReturn(mContext);
     }
 
     @Test
@@ -81,7 +96,7 @@
     public void testSingleSourceMerge_ExactCopyReturned() {
         ArrayList<SearchResult> intentResults = getIntentSampleResults();
         mAdapter.addSearchResults(intentResults, mLoaderClassName);
-        mAdapter.displaySearchResults();
+        mAdapter.displaySearchResults("");
 
         List<SearchResult> updatedResults = mAdapter.getSearchResults();
         assertThat(updatedResults).containsAllIn(intentResults);
@@ -109,7 +124,7 @@
                 InstalledAppResultLoader.class.getName());
         mAdapter.addSearchResults(getDummyDbResults(),
                 DatabaseResultLoader.class.getName());
-        int count = mAdapter.displaySearchResults();
+        int count = mAdapter.displaySearchResults("");
 
         List<SearchResult> results = mAdapter.getSearchResults();
         assertThat(results.get(0).title).isEqualTo("alpha");
@@ -121,6 +136,22 @@
         assertThat(count).isEqualTo(6);
     }
 
+    @Test
+    public void testDisplayResults_ShouldNotRunSmartRankingIfDisabled() {
+        when(mSearchFeatureProvider.isSmartSearchRankingEnabled(any()))
+            .thenReturn(false);
+        mAdapter.displaySearchResults("");
+        verify(mSearchFeatureProvider, never()).rankSearchResults(anyString(), anyList());
+    }
+
+    @Test
+    public void testDisplayResults_ShouldRunSmartRankingIfEnabled() {
+        when(mSearchFeatureProvider.isSmartSearchRankingEnabled(any()))
+            .thenReturn(true);
+        mAdapter.displaySearchResults("");
+        verify(mSearchFeatureProvider, times(1)).rankSearchResults(anyString(), anyList());
+    }
+
     private List<SearchResult> getDummyDbResults() {
         List<SearchResult> results = new ArrayList<>();
         IntentPayload payload = new IntentPayload(new Intent());
diff --git a/tests/unit/AndroidTest.xml b/tests/unit/AndroidTest.xml
index 80a5a73..b74c1e3 100644
--- a/tests/unit/AndroidTest.xml
+++ b/tests/unit/AndroidTest.xml
@@ -20,7 +20,7 @@
 
     <option name="test-suite-tag" value="apct" />
     <option name="test-tag" value="SettingsUnitTests" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="com.android.settings.tests.unit" />
         <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
diff --git a/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java b/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java
index 617e9bb..e82482e 100644
--- a/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java
+++ b/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java
@@ -169,6 +169,17 @@
         assertThat(result.get(PRIMARY_USER_ID).otherAppsSize).isEqualTo(11L);
     }
 
+    @Test
+    public void testVideoAppsAreFiltered() throws Exception {
+        addPackage(PACKAGE_NAME_1, 0, 1, 10, ApplicationInfo.CATEGORY_VIDEO);
+
+        SparseArray<StorageAsyncLoader.AppsStorageResult> result = mLoader.loadInBackground();
+
+        assertThat(result.size()).isEqualTo(1);
+        assertThat(result.get(PRIMARY_USER_ID).videoAppsSize).isEqualTo(11L);
+        assertThat(result.get(PRIMARY_USER_ID).otherAppsSize).isEqualTo(0);
+    }
+
     private ApplicationInfo addPackage(
             String packageName, long cacheSize, long codeSize, long dataSize, int category) {
         StorageStatsSource.AppStorageStats storageStats =