Merge "Fix NullPointerException at VolumeSliceHelper" into sc-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 5abe890..2637acc 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -473,6 +473,7 @@
 
         <activity android:name="Settings$FaceSettingsActivity"
             android:label="@string/security_settings_face_preference_title"
+            android:theme="@style/Theme.SubSettings"
             android:exported="true"
             android:icon="@drawable/ic_face_header">
             <intent-filter>
diff --git a/res/drawable/ic_suggested_notifications.xml b/res/drawable/ic_suggested_notifications.xml
index 5bce000..a696f47 100644
--- a/res/drawable/ic_suggested_notifications.xml
+++ b/res/drawable/ic_suggested_notifications.xml
@@ -19,9 +19,9 @@
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
-        android:fillColor="@color/sud_color_accent_light"
+        android:fillColor="?android:attr/colorPrimary"
         android:pathData="M18,17v-6c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C7.64,5.36 6,7.92 6,11v6H4v2h10h0.38H20v-2H18zM16,17H8v-6c0,-2.48 1.51,-4.5 4,-4.5s4,2.02 4,4.5V17z"/>
     <path
-        android:fillColor="@color/sud_color_accent_light"
+        android:fillColor="?android:attr/colorPrimary"
         android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
 </vector>
diff --git a/res/layout-land/choose_lock_pattern.xml b/res/layout-land/choose_lock_pattern.xml
deleted file mode 100644
index 29c3350..0000000
--- a/res/layout-land/choose_lock_pattern.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2015 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License")
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<com.google.android.setupdesign.GlifLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:settings="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:icon="@drawable/ic_lock"
-    android:layout="@layout/sud_glif_blank_template"
-    settings:sucHeaderText="@string/lock_settings_picker_title">
-
-    <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
-        android:id="@+id/topLayout"
-        android:clipChildren="false"
-        android:clipToPadding="false"
-        android:orientation="horizontal"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <!-- left side: instructions and messages -->
-        <LinearLayout
-            android:layout_width="0dip"
-            android:layout_height="match_parent"
-            android:layout_weight="1.0"
-            android:layout_marginStart="?attr/sudMarginStart"
-            android:layout_marginBottom="@dimen/sud_content_frame_padding_bottom"
-            android:clipChildren="false"
-            android:clipToPadding="false"
-            android:orientation="vertical">
-
-            <ScrollView
-                android:id="@+id/scroll_layout_title_header"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="1">
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="vertical">
-
-                    <ImageView
-                        android:id="@+id/sud_layout_icon"
-                        style="@style/SudGlifIcon"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="?attr/sudGlifHeaderGravity"
-                        android:layout_marginStart="0dp"
-                        android:layout_marginEnd="0dp"
-                        android:src="@drawable/ic_lock"/>
-
-                    <TextView
-                        android:id="@+id/suc_layout_title"
-                        style="@style/SudGlifHeaderTitle"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="0dp"
-                        android:layout_marginEnd="0dp"/>
-
-                    <TextView
-                        android:id="@+id/sud_layout_description"
-                        style="@style/SudDescription.Glif"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:minLines="2" />
-
-                    <!-- header message -->
-                    <TextView
-                        android:id="@+id/headerText"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="10dp"
-                        android:gravity="?attr/sudGlifHeaderGravity"
-                        android:textSize="18sp"/>
-
-                    <TextView android:id="@+id/footerText"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_centerHorizontal="true"
-                        android:layout_marginTop="10dp"
-                        android:textSize="14sp"
-                        android:visibility="gone" />
-
-                    <Button
-                        android:id="@+id/screen_lock_options"
-                        style="@style/SudGlifButton.Tertiary"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="5dp"
-                        android:gravity="?attr/sudGlifHeaderGravity"
-                        android:text="@string/setup_lock_settings_options_button_label"
-                        android:visibility="gone" />
-
-                </LinearLayout>
-
-            </ScrollView>
-
-        </LinearLayout>
-
-        <!-- right side: lock pattern -->
-        <com.google.android.setupdesign.view.FillContentLayout
-            style="@style/LockPatternContainerStyle"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1.0"
-            android:paddingStart="0dp">
-
-            <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_gravity="center"
-                android:background="@color/lock_pattern_background" />
-
-        </com.google.android.setupdesign.view.FillContentLayout>
-
-    </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
-
-</com.google.android.setupdesign.GlifLayout>
diff --git a/res/layout-land/confirm_lock_password.xml b/res/layout-land/confirm_lock_password.xml
deleted file mode 100644
index 775f9ad..0000000
--- a/res/layout-land/confirm_lock_password.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<com.google.android.setupdesign.GlifLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/setup_wizard_layout"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:icon="@drawable/ic_enterprise">
-
-    <!--common_typos_disable-->
-    <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
-        android:id="@+id/topLayout"
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_weight="1">
-
-        <TextView
-            android:id="@+id/sud_layout_description"
-            style="@style/SudDescription.Glif"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="?attr/sudMarginStart"
-            android:layout_marginEnd="?attr/sudMarginEnd" />
-
-        <Button
-            android:id="@+id/forgotButton"
-            style="@style/SudGlifButton.Secondary"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="?attr/sudMarginStart"
-            android:layout_marginEnd="?attr/sudMarginEnd"
-            android:layout_gravity="center"
-            android:visibility="gone" />
-
-        <com.android.settings.widget.ScrollToParentEditText
-            android:id="@+id/password_entry"
-            android:layout_width="208dp"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:inputType="textPassword"
-            android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
-            android:gravity="center"
-            style="@style/TextAppearance.PasswordEntry"/>
-
-        <TextView
-            style="@style/TextAppearance.ErrorText"
-            android:accessibilityLiveRegion="polite"
-            android:id="@+id/errorText"
-            android:layout_gravity="center"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="8dp"/>
-
-        <Space
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-
-        <Button
-            android:id="@+id/cancelButton"
-            style="@style/SudGlifButton.Secondary"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="?attr/sudMarginStart"
-            android:layout_marginEnd="?attr/sudMarginEnd"
-            android:layout_marginBottom="80dp"
-            android:layout_gravity="center_horizontal"
-            android:text="@string/cancel" />
-
-    <!--common_typos_disable-->
-    </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
-</com.google.android.setupdesign.GlifLayout>
\ No newline at end of file
diff --git a/res/layout-land/confirm_lock_pattern.xml b/res/layout-land/confirm_lock_pattern.xml
deleted file mode 100644
index 1126052..0000000
--- a/res/layout-land/confirm_lock_pattern.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.google.android.setupdesign.GlifLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/setup_wizard_layout"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:icon="@drawable/ic_enterprise"
-    android:layout="@layout/sud_glif_blank_template">
-
-    <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
-        android:id="@+id/topLayout"
-        android:orientation="horizontal"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <ScrollView
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:fillViewport="true">
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:paddingBottom="24dp">
-
-                <ImageView
-                    android:id="@+id/sud_layout_icon"
-                    style="@style/SudGlifIcon"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="?attr/sudGlifHeaderGravity"
-                    android:src="@drawable/ic_enterprise" />
-
-                <TextView
-                    android:id="@+id/suc_layout_title"
-                    style="@style/SudGlifHeaderTitle"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content" />
-
-                <TextView
-                    android:id="@+id/sud_layout_subtitle"
-                    style="@style/SudDescription.Glif"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/sudMarginStart"
-                    android:layout_marginEnd="?attr/sudMarginEnd" />
-
-                <Button
-                    android:id="@+id/cancelButton"
-                    style="@style/SetupWizardButton.Negative"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/sudMarginStart"
-                    android:layout_marginEnd="?attr/sudMarginEnd"
-                    android:text="@string/cancel" />
-
-                <Button
-                    android:id="@+id/forgotButton"
-                    style="@style/SudGlifButton.Secondary"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/sudMarginStart"
-                    android:layout_marginEnd="?attr/sudMarginEnd"
-                    android:layout_gravity="center"
-                    android:visibility="gone" />
-
-                <Space
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    android:layout_weight="1" />
-
-                <TextView
-                    style="@style/TextAppearance.ErrorText"
-                    android:accessibilityLiveRegion="polite"
-                    android:id="@+id/errorText"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/sudMarginStart"
-                    android:layout_marginEnd="?attr/sudMarginEnd"
-                    android:layout_marginBottom="24dp"
-                    android:gravity="center_vertical"/>
-
-            </LinearLayout>
-
-        </ScrollView>
-
-        <com.google.android.setupdesign.view.FillContentLayout
-            style="@style/LockPatternContainerStyle"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:paddingStart="0dp">
-
-            <com.android.internal.widget.LockPatternView
-                android:id="@+id/lockPattern"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_gravity="center" />
-
-        </com.google.android.setupdesign.view.FillContentLayout>
-
-    </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
-</com.google.android.setupdesign.GlifLayout>
-
diff --git a/res/layout-land/confirm_lock_pattern_normal.xml b/res/layout-land/confirm_lock_pattern_normal.xml
deleted file mode 100644
index 2a9103f..0000000
--- a/res/layout-land/confirm_lock_pattern_normal.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?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.google.android.setupdesign.GlifLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/setup_wizard_layout"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:icon="@drawable/ic_lock"
-    android:layout="@layout/sud_glif_blank_template">
-
-    <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
-        android:id="@+id/topLayout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="horizontal">
-
-        <ScrollView
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:fillViewport="true">
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:paddingBottom="24dp">
-
-                <ImageView
-                    android:id="@+id/sud_layout_icon"
-                    style="@style/SudGlifIcon"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="?attr/sudGlifHeaderGravity"
-                    android:src="@drawable/ic_lock" />
-
-                <TextView
-                    android:id="@+id/suc_layout_title"
-                    style="@style/SudGlifHeaderTitle"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content" />
-
-                <TextView
-                    style="@style/SudDescription.Glif"
-                    android:id="@+id/sud_layout_subtitle"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/sudMarginStart"
-                    android:layout_marginEnd="?attr/sudMarginEnd" />
-
-                <Button
-                    android:id="@+id/cancelButton"
-                    style="@style/SetupWizardButton.Negative"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/sudMarginStart"
-                    android:layout_marginEnd="?attr/sudMarginEnd"
-                    android:text="@string/cancel" />
-
-                <Space
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    android:layout_weight="1" />
-
-                <TextView
-                    style="@style/TextAppearance.ErrorText"
-                    android:accessibilityLiveRegion="polite"
-                    android:id="@+id/errorText"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="?attr/sudMarginStart"
-                    android:layout_marginEnd="?attr/sudMarginEnd"
-                    android:layout_marginBottom="24dp"
-                    android:gravity="center_vertical"/>
-            </LinearLayout>
-
-        </ScrollView>
-
-        <com.google.android.setupdesign.view.FillContentLayout
-            style="@style/LockPatternContainerStyle"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:paddingStart="0dp">
-
-            <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_gravity="center"
-                android:background="@color/lock_pattern_background" />
-
-        </com.google.android.setupdesign.view.FillContentLayout>
-
-    </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
-</com.google.android.setupdesign.GlifLayout>
diff --git a/res/layout/choose_lock_pattern_common.xml b/res/layout/choose_lock_pattern_common.xml
index 46e857b..b238d93 100644
--- a/res/layout/choose_lock_pattern_common.xml
+++ b/res/layout/choose_lock_pattern_common.xml
@@ -18,97 +18,55 @@
 <!-- Used in phone portrait and tablet, as referenced in alias.xml. -->
 <com.google.android.setupdesign.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:icon="@drawable/ic_lock"
-    android:layout="@layout/sud_glif_blank_template">
+    android:icon="@drawable/ic_lock">
 
+    <!-- takes up all space above button bar at bottom -->
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
         android:id="@+id/topLayout"
+        style="@style/SudContentFrame"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
+        android:gravity="center"
         android:clipChildren="false"
         android:clipToPadding="false"
-        android:orientation="vertical">
+        android:orientation="vertical"
+        android:paddingLeft="0dp"
+        android:paddingRight="0dp">
 
-        <LinearLayout
-            style="@style/SudGlifHeaderContainer"
+        <TextView
+            android:id="@+id/headerText"
+            style="@style/SudDescription.Glif"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <ImageView
-                android:id="@+id/sud_layout_icon"
-                style="@style/SudGlifIcon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:src="@drawable/ic_lock" />
-
-            <TextView
-                android:id="@+id/suc_layout_title"
-                style="@style/SudGlifHeaderTitle"
-                android:accessibilityLiveRegion="polite"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-
-        </LinearLayout>
-
-        <!-- takes up all space above button bar at bottom -->
-        <LinearLayout
-            style="@style/SudContentFrame"
-            android:layout_width="match_parent"
-            android:layout_height="0dip"
-            android:layout_weight="1"
+            android:minLines="2"
             android:gravity="center"
-            android:clipChildren="false"
-            android:clipToPadding="false"
-            android:orientation="vertical"
-            android:paddingLeft="0dp"
-            android:paddingRight="0dp">
+            android:paddingStart="?attr/sudMarginStart"
+            android:paddingEnd="?attr/sudMarginEnd"/>
 
-            <TextView
-                android:id="@+id/sud_layout_description"
-                style="@style/SudDescription.Glif"
+        <com.google.android.setupdesign.view.FillContentLayout
+            style="@style/LockPatternContainerStyle"
+            android:layout_width="wrap_content"
+            android:layout_height="0dp"
+            android:layout_weight="1">
+
+            <com.android.internal.widget.LockPatternView
+                android:id="@+id/lockPattern"
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="?attr/sudMarginStart"
-                android:layout_marginEnd="?attr/sudMarginEnd"
-                android:minLines="2" />
+                android:layout_height="match_parent"
+                android:layout_gravity="center"/>
 
-            <TextView android:id="@+id/headerText"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:minLines="2"
-                android:gravity="center"
-                android:paddingStart="?attr/sudMarginStart"
-                android:paddingEnd="?attr/sudMarginEnd"
-                android:textSize="12sp" />
-
-            <com.google.android.setupdesign.view.FillContentLayout
-                style="@style/LockPatternContainerStyle"
-                android:layout_width="wrap_content"
-                android:layout_height="0dp"
-                android:layout_weight="1">
-
-                <com.android.internal.widget.LockPatternView
-                    android:id="@+id/lockPattern"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_gravity="center" />
-
-            </com.google.android.setupdesign.view.FillContentLayout>
-
-        </LinearLayout>
+        </com.google.android.setupdesign.view.FillContentLayout>
 
         <TextView android:id="@+id/footerText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_horizontal"
-            android:minHeight="50dip"
-            android:textSize="14sp"
-            android:visibility="gone"/>
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:layout_gravity="center_horizontal"
+                  android:minHeight="50dip"
+                  android:textSize="14sp"
+                  android:visibility="gone"/>
 
         <Button
             android:id="@+id/screen_lock_options"
@@ -116,8 +74,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/setup_lock_settings_options_button_label"
-            android:visibility="gone" />
-
+            android:visibility="gone"/>
     </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
 
 </com.google.android.setupdesign.GlifLayout>
diff --git a/res/layout/confirm_lock_password_base.xml b/res/layout/confirm_lock_password_base.xml
index a1525b7..7c2fc5b 100644
--- a/res/layout/confirm_lock_password_base.xml
+++ b/res/layout/confirm_lock_password_base.xml
@@ -18,8 +18,7 @@
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:icon="@drawable/ic_enterprise"
-    android:layout="@layout/sud_glif_blank_template">
+    android:icon="@drawable/ic_enterprise">
 
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
         android:id="@+id/topLayout"
@@ -32,28 +31,6 @@
             android:layout_height="wrap_content"
             android:orientation="vertical">
 
-            <ImageView
-                android:id="@+id/sud_layout_icon"
-                style="@style/SudGlifIcon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="?attr/sudGlifHeaderGravity"
-                android:src="@drawable/ic_enterprise" />
-
-            <TextView
-                android:id="@+id/headerText"
-                style="@style/SudGlifHeaderTitle"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-
-            <TextView
-                android:id="@+id/sud_layout_description"
-                style="@style/SudDescription.Glif"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="?attr/sudMarginStart"
-                android:layout_marginEnd="?attr/sudMarginEnd" />
-
             <Button
                 android:id="@+id/forgotButton"
                 style="@style/SudGlifButton.Secondary"
@@ -82,7 +59,7 @@
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_horizontal"
                 android:inputType="textPassword"
-                android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
+                android:imeOptions="actionNext|flagForceAscii"
                 android:gravity="center"
                 style="@style/TextAppearance.PasswordEntry"/>
 
diff --git a/res/layout/confirm_lock_password_normal.xml b/res/layout/confirm_lock_password_normal.xml
index 089ecdc..f2b8d1f 100644
--- a/res/layout/confirm_lock_password_normal.xml
+++ b/res/layout/confirm_lock_password_normal.xml
@@ -52,7 +52,7 @@
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_horizontal"
                 android:inputType="textPassword"
-                android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
+                android:imeOptions="actionNext|flagForceAscii"
                 android:gravity="center"
                 style="@style/TextAppearance.PasswordEntry"/>
 
diff --git a/res/layout/confirm_lock_pattern_base.xml b/res/layout/confirm_lock_pattern_base.xml
index bac2689..f79fc72 100644
--- a/res/layout/confirm_lock_pattern_base.xml
+++ b/res/layout/confirm_lock_pattern_base.xml
@@ -18,8 +18,7 @@
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:icon="@drawable/ic_enterprise"
-    android:layout="@layout/sud_glif_blank_template">
+    android:icon="@drawable/ic_enterprise">
 
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
         android:id="@+id/topLayout"
@@ -33,28 +32,6 @@
             android:orientation="vertical"
             android:paddingBottom="24dp">
 
-            <ImageView
-                android:id="@+id/sud_layout_icon"
-                style="@style/SudGlifIcon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="?attr/sudGlifHeaderGravity"
-                android:src="@drawable/ic_enterprise" />
-
-            <TextView
-                android:id="@+id/suc_layout_title"
-                style="@style/SudGlifHeaderTitle"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-
-            <TextView
-                android:id="@+id/sud_layout_subtitle"
-                style="@style/SudDescription.Glif"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="?attr/sudMarginStart"
-                android:layout_marginEnd="?attr/sudMarginEnd" />
-
             <Button
                 android:id="@+id/cancelButton"
                 style="@style/SudGlifButton.Secondary"
diff --git a/res/layout/confirm_lock_pattern_normal_base.xml b/res/layout/confirm_lock_pattern_normal_base.xml
index 29783dd..62a1160 100644
--- a/res/layout/confirm_lock_pattern_normal_base.xml
+++ b/res/layout/confirm_lock_pattern_normal_base.xml
@@ -18,8 +18,7 @@
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:icon="@drawable/ic_lock"
-    android:layout="@layout/sud_glif_blank_template">
+    android:icon="@drawable/ic_lock">
 
     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
         android:id="@+id/topLayout"
@@ -28,35 +27,6 @@
         android:orientation="vertical">
 
         <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <ImageView
-                android:id="@+id/sud_layout_icon"
-                style="@style/SudGlifIcon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="?attr/sudGlifHeaderGravity"
-                android:src="@drawable/ic_lock" />
-
-            <TextView
-                android:id="@+id/suc_layout_title"
-                style="@style/SudGlifHeaderTitle"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-
-            <TextView
-                style="@style/SudDescription.Glif"
-                android:id="@+id/sud_layout_subtitle"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="?attr/sudMarginStart"
-                android:layout_marginEnd="?attr/sudMarginEnd" />
-
-        </LinearLayout>
-
-        <LinearLayout
             style="@style/SudContentFrame"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
diff --git a/res/layout/face_enroll_button.xml b/res/layout/face_enroll_button.xml
index f40c42c..2e7ba8d 100644
--- a/res/layout/face_enroll_button.xml
+++ b/res/layout/face_enroll_button.xml
@@ -22,7 +22,7 @@
 
     <Button
         android:id="@+id/security_settings_face_settings_enroll_button"
-        android:layout_marginStart="@dimen/screen_margin_sides"
+        android:layout_marginStart="20dp"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="start"
diff --git a/res/layout/face_remove_button.xml b/res/layout/face_remove_button.xml
index a05fb85..2bbaca9 100644
--- a/res/layout/face_remove_button.xml
+++ b/res/layout/face_remove_button.xml
@@ -22,7 +22,7 @@
 
     <Button
         android:id="@+id/security_settings_face_settings_remove_button"
-        android:layout_marginStart="@dimen/screen_margin_sides"
+        android:layout_marginStart="20dp"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="start"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index bf56cc4..193f521 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13128,6 +13128,8 @@
     <string name="to_switch_networks_disconnect_ethernet">To switch networks, disconnect ethernet</string>
     <!-- Panel subtitle for Wi-Fi turned on. [CHAR LIMIT=60] -->
     <string name="wifi_is_turned_on_subtitle">Wi\u2011Fi is turned on</string>
+    <!-- Panel subtitle for select the network you want to use for data. [CHAR LIMIT=60] -->
+    <string name="select_network_to_connect_internet">Select the network you want to use for data</string>
     <!-- Title for merged carrier Wi-Fi offload toggle. [CHAR LIMIT=NONE] -->
     <string name="carrier_wifi_offload_title">W+ connections</string>
     <!-- Summary for merged carrier Wi-Fi offload toggle. [CHAR LIMIT=NONE] -->
@@ -13295,4 +13297,9 @@
     <string name="mic_toggle_title">Microphone access</string>
     <!-- Describes what is affected by the camera or mic toggle [CHAR LIMIT=NONE] -->
     <string name="sensor_toggle_description">For all apps and services</string>
+
+    <!-- Title for Game settings entry. [CHAR_LIMIT=NONE] -->
+    <string name="game_settings_title">Game settings</string>
+    <!-- Summary for Game settings entry. [CHAR_LIMIT=NONE] -->
+    <string name="game_settings_summary">Turn on Game Dashboard shortcut, etc</string>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index d9a55e6..cfa0e3b 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -391,7 +391,6 @@
 
     <style name="BiometricHeaderStyle" parent="@*android:style/TextAppearance.DeviceDefault.Subhead">
         <item name="android:paddingTop">16dp</item>
-        <item name="android:textColor">@color/primary_dark_material_light</item>
         <item name="android:lineSpacingMultiplier">1.2</item>
     </style>
 
diff --git a/res/xml/apps.xml b/res/xml/apps.xml
index 68b5c9a..a7d823b 100644
--- a/res/xml/apps.xml
+++ b/res/xml/apps.xml
@@ -62,6 +62,14 @@
         <intent android:action="android.settings.MANAGE_DEFAULT_APPS_SETTINGS"/>
     </Preference>
 
+    <Preference
+        android:key="game_settings"
+        android:title="@string/game_settings_title"
+        android:summary="@string/game_settings_summary"
+        android:order="-995"
+        settings:controller="com.android.settings.applications.GameSettingsPreferenceController">
+    </Preference>
+
     <PreferenceCategory
         android:key="dashboard_tile_placeholder"
         android:order="10"/>
diff --git a/res/xml/security_settings_face.xml b/res/xml/security_settings_face.xml
index e1ac9b3..147c4ca 100644
--- a/res/xml/security_settings_face.xml
+++ b/res/xml/security_settings_face.xml
@@ -19,12 +19,6 @@
     xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:title="@string/security_settings_face_preference_title">
 
-    <com.android.settings.widget.VideoPreference
-        android:key="security_settings_face_video"
-        android:title="@string/summary_placeholder"
-        settings:animation="@raw/face_settings"
-        settings:controller="com.android.settings.widget.VideoPreferenceController"/>
-
     <com.android.settingslib.widget.TopIntroPreference
         android:title="@string/security_settings_face_settings_top_intro"
         settings:searchable="false"/>
@@ -83,19 +77,16 @@
             android:key="security_settings_face_delete_faces_container"
             android:title="@string/security_settings_face_settings_remove_face_model"
             android:selectable="false"
-            android:layout="@layout/face_remove_button"
-            settings:allowDividerBelow="true"/>
+            android:layout="@layout/face_remove_button"/>
 
         <com.android.settingslib.widget.LayoutPreference
             android:key="security_settings_face_enroll_faces_container"
             android:title="@string/security_settings_face_settings_enroll"
             android:selectable="false"
-            android:layout="@layout/face_enroll_button"
-            settings:allowDividerBelow="true"/>
+            android:layout="@layout/face_enroll_button"/>
     </PreferenceCategory>
 
     <com.android.settingslib.widget.FooterPreference
         android:key="security_face_footer"
-        settings:allowDividerAbove="true"
         settings:controller="com.android.settings.biometrics.face.FaceSettingsFooterPreferenceController" />
 </PreferenceScreen>
diff --git a/src/com/android/settings/applications/GameSettingsFeatureProvider.java b/src/com/android/settings/applications/GameSettingsFeatureProvider.java
new file mode 100644
index 0000000..ac2d6bd
--- /dev/null
+++ b/src/com/android/settings/applications/GameSettingsFeatureProvider.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 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.applications;
+
+import android.content.Context;
+
+/**
+ * Provider for Game Settings related feature.
+ */
+public interface GameSettingsFeatureProvider {
+    /**
+     * Returns true if the feature is supported.
+     */
+    boolean isSupported(Context context);
+
+    /**
+     * Launch GameSettings
+     */
+    void launchGameSettings(Context context);
+}
diff --git a/src/com/android/settings/applications/GameSettingsFeatureProviderImpl.java b/src/com/android/settings/applications/GameSettingsFeatureProviderImpl.java
new file mode 100644
index 0000000..67212e7
--- /dev/null
+++ b/src/com/android/settings/applications/GameSettingsFeatureProviderImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2021 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.applications;
+
+import android.content.Context;
+
+/**
+ * Provider implementation for Game Settings related features.
+ */
+public class GameSettingsFeatureProviderImpl implements
+        GameSettingsFeatureProvider {
+    @Override
+    public boolean isSupported(Context context) {
+        return false;
+    }
+
+    @Override
+    public void launchGameSettings(Context context) {
+        return;
+    }
+}
diff --git a/src/com/android/settings/applications/GameSettingsPreferenceController.java b/src/com/android/settings/applications/GameSettingsPreferenceController.java
new file mode 100644
index 0000000..67c1bb1
--- /dev/null
+++ b/src/com/android/settings/applications/GameSettingsPreferenceController.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2021 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.applications;
+
+import android.content.Context;
+import android.text.TextUtils;
+
+import androidx.preference.Preference;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.settings.core.BasePreferenceController;
+import com.android.settings.overlay.FeatureFactory;
+
+/** Contains logic that deals with showing Game Settings in app settings. */
+public class GameSettingsPreferenceController extends BasePreferenceController {
+
+    @VisibleForTesting
+    final GameSettingsFeatureProvider mGameSettingsFeatureProvider;
+
+    public GameSettingsPreferenceController(Context context, String key) {
+        super(context, key);
+        mGameSettingsFeatureProvider =
+                FeatureFactory.getFactory(context).getGameSettingsFeatureProvider();
+    }
+
+    GameSettingsPreferenceController(Context context, String key,
+            GameSettingsFeatureProvider gameSettingsFeatureProvider) {
+        super(context, key);
+        mGameSettingsFeatureProvider = gameSettingsFeatureProvider;
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return mGameSettingsFeatureProvider.isSupported(mContext)
+                ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
+    }
+
+    @Override
+    public boolean handlePreferenceTreeClick(Preference preference) {
+        if (TextUtils.equals(getPreferenceKey(), preference.getKey())) {
+            mGameSettingsFeatureProvider.launchGameSettings(mContext);
+            return true;
+        }
+        return super.handlePreferenceTreeClick(preference);
+    }
+}
diff --git a/src/com/android/settings/biometrics/BiometricEnrollBase.java b/src/com/android/settings/biometrics/BiometricEnrollBase.java
index 67148d1..22420d0 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollBase.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollBase.java
@@ -20,7 +20,6 @@
 
 import android.annotation.Nullable;
 import android.content.Intent;
-import android.content.res.Resources;
 import android.graphics.Color;
 import android.os.Bundle;
 import android.os.UserHandle;
@@ -38,6 +37,7 @@
 import com.google.android.setupcompat.template.FooterButton;
 import com.google.android.setupcompat.util.WizardManagerHelper;
 import com.google.android.setupdesign.GlifLayout;
+import com.google.android.setupdesign.util.ThemeHelper;
 
 /**
  * Base activity for all biometric enrollment steps.
@@ -100,6 +100,8 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        setTheme(SetupWizardUtils.getTheme(this, getIntent()));
+        ThemeHelper.trySetDynamicColor(this);
         mChallenge = getIntent().getLongExtra(EXTRA_KEY_CHALLENGE, -1L);
         mSensorId = getIntent().getIntExtra(EXTRA_KEY_SENSOR_ID, -1);
         // Don't need to retrieve the HAT if it already exists. In some cases, the extras do not
@@ -123,13 +125,6 @@
     }
 
     @Override
-    protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
-        final int new_resid = SetupWizardUtils.getTheme(this, getIntent());
-        theme.applyStyle(R.style.SetupWizardPartnerResource, true);
-        super.onApplyThemeResource(theme, new_resid, first);
-    }
-
-    @Override
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
         outState.putBoolean(EXTRA_KEY_LAUNCHED_CONFIRM, mLaunchedConfirmLock);
diff --git a/src/com/android/settings/network/ProviderModelSlice.java b/src/com/android/settings/network/ProviderModelSlice.java
index 84581d7..6b6180b 100644
--- a/src/com/android/settings/network/ProviderModelSlice.java
+++ b/src/com/android/settings/network/ProviderModelSlice.java
@@ -34,6 +34,7 @@
 import androidx.core.graphics.drawable.IconCompat;
 import androidx.slice.Slice;
 import androidx.slice.builders.ListBuilder;
+import androidx.slice.builders.SliceAction;
 
 import com.android.settings.R;
 import com.android.settings.SubSettings;
@@ -59,6 +60,8 @@
 public class ProviderModelSlice extends WifiSlice {
 
     private static final String TAG = "ProviderModelSlice";
+    protected static final String ACTION_TITLE_CONNECT_TO_CARRIER = "Connect_To_Carrier";
+
     private final ProviderModelSliceHelper mHelper;
 
     public ProviderModelSlice(Context context) {
@@ -250,6 +253,31 @@
     }
 
     @Override
+    protected ListBuilder.RowBuilder getWifiSliceItemRow(WifiSliceItem wifiSliceItem) {
+        final CharSequence title = wifiSliceItem.getTitle();
+        final IconCompat levelIcon = getWifiSliceItemLevelIcon(wifiSliceItem);
+        final ListBuilder.RowBuilder rowBuilder = new ListBuilder.RowBuilder()
+                .setTitleItem(levelIcon, ListBuilder.ICON_IMAGE)
+                .setTitle(title)
+                .setSubtitle(wifiSliceItem.getSummary())
+                .setContentDescription(wifiSliceItem.getContentDescription());
+
+        final IconCompat endIcon;
+        if (wifiSliceItem.hasInternetAccess()) {
+            rowBuilder.setPrimaryAction(SliceAction.create(getBroadcastIntent(mContext),
+                    levelIcon, ListBuilder.ICON_IMAGE, ACTION_TITLE_CONNECT_TO_CARRIER));
+            endIcon = IconCompat.createWithResource(mContext, R.drawable.ic_settings_close);
+        } else {
+            rowBuilder.setPrimaryAction(getWifiEntryAction(wifiSliceItem, levelIcon, title));
+            endIcon = getEndIcon(wifiSliceItem);
+        }
+        if (endIcon != null) {
+            rowBuilder.addEndItem(endIcon, ListBuilder.ICON_IMAGE);
+        }
+        return rowBuilder;
+    }
+
+    @Override
     protected IconCompat getWifiSliceItemLevelIcon(WifiSliceItem wifiSliceItem) {
         if (wifiSliceItem.getConnectedState() == WifiEntry.CONNECTED_STATE_CONNECTED
                 && getInternetType() != InternetUpdater.INTERNET_WIFI) {
diff --git a/src/com/android/settings/notification/RedactionInterstitial.java b/src/com/android/settings/notification/RedactionInterstitial.java
index 27e2b72..c8d5ffd 100644
--- a/src/com/android/settings/notification/RedactionInterstitial.java
+++ b/src/com/android/settings/notification/RedactionInterstitial.java
@@ -26,7 +26,6 @@
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.Intent;
-import android.content.res.Resources;
 import android.os.Bundle;
 import android.os.UserManager;
 import android.provider.Settings;
@@ -50,6 +49,7 @@
 import com.google.android.setupcompat.template.FooterButton;
 import com.google.android.setupcompat.util.WizardManagerHelper;
 import com.google.android.setupdesign.GlifLayout;
+import com.google.android.setupdesign.util.ThemeHelper;
 
 public class RedactionInterstitial extends SettingsActivity {
 
@@ -61,18 +61,14 @@
     }
 
     @Override
-    protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
-        final int new_resid = SetupWizardUtils.getTheme(this, getIntent());
-        super.onApplyThemeResource(theme, new_resid, first);
-    }
-
-    @Override
     protected boolean isValidFragment(String fragmentName) {
         return RedactionInterstitialFragment.class.getName().equals(fragmentName);
     }
 
     @Override
     protected void onCreate(Bundle savedInstance) {
+        setTheme(SetupWizardUtils.getTheme(this, getIntent()));
+        ThemeHelper.trySetDynamicColor(this);
         super.onCreate(savedInstance);
         findViewById(R.id.content_parent).setFitsSystemWindows(false);
     }
diff --git a/src/com/android/settings/overlay/FeatureFactory.java b/src/com/android/settings/overlay/FeatureFactory.java
index e7b23b9..58f80fc 100644
--- a/src/com/android/settings/overlay/FeatureFactory.java
+++ b/src/com/android/settings/overlay/FeatureFactory.java
@@ -25,6 +25,7 @@
 import com.android.settings.R;
 import com.android.settings.accounts.AccountFeatureProvider;
 import com.android.settings.applications.ApplicationFeatureProvider;
+import com.android.settings.applications.GameSettingsFeatureProvider;
 import com.android.settings.applications.appinfo.ExtraAppInfoFeatureProvider;
 import com.android.settings.aware.AwareFeatureProvider;
 import com.android.settings.biometrics.face.FaceFeatureProvider;
@@ -168,6 +169,11 @@
      */
     public abstract SecuritySettingsFeatureProvider getSecuritySettingsFeatureProvider();
 
+    /**
+     * Retrieve implementation for Game Settings feature.
+     */
+    public abstract GameSettingsFeatureProvider getGameSettingsFeatureProvider();
+
     public static final class FactoryNotFoundException extends RuntimeException {
         public FactoryNotFoundException(Throwable throwable) {
             super("Unable to create factory. Did you misconfigure Proguard?", throwable);
diff --git a/src/com/android/settings/overlay/FeatureFactoryImpl.java b/src/com/android/settings/overlay/FeatureFactoryImpl.java
index 00f9a0e..13b7b60 100644
--- a/src/com/android/settings/overlay/FeatureFactoryImpl.java
+++ b/src/com/android/settings/overlay/FeatureFactoryImpl.java
@@ -29,6 +29,8 @@
 import com.android.settings.accounts.AccountFeatureProviderImpl;
 import com.android.settings.applications.ApplicationFeatureProvider;
 import com.android.settings.applications.ApplicationFeatureProviderImpl;
+import com.android.settings.applications.GameSettingsFeatureProvider;
+import com.android.settings.applications.GameSettingsFeatureProviderImpl;
 import com.android.settings.applications.appinfo.ExtraAppInfoFeatureProvider;
 import com.android.settings.applications.appinfo.ExtraAppInfoFeatureProviderImpl;
 import com.android.settings.aware.AwareFeatureProvider;
@@ -103,6 +105,7 @@
     private WifiTrackerLibProvider mWifiTrackerLibProvider;
     private ExtraAppInfoFeatureProvider mExtraAppInfoFeatureProvider;
     private SecuritySettingsFeatureProvider mSecuritySettingsFeatureProvider;
+    private GameSettingsFeatureProvider mGameSettingsFeatureProvider;
 
     @Override
     public SupportFeatureProvider getSupportFeatureProvider(Context context) {
@@ -324,4 +327,12 @@
         }
         return mSecuritySettingsFeatureProvider;
     }
+
+    @Override
+    public GameSettingsFeatureProvider getGameSettingsFeatureProvider() {
+        if (mGameSettingsFeatureProvider == null) {
+            mGameSettingsFeatureProvider = new GameSettingsFeatureProviderImpl();
+        }
+        return mGameSettingsFeatureProvider;
+    }
 }
diff --git a/src/com/android/settings/panel/InternetConnectivityPanel.java b/src/com/android/settings/panel/InternetConnectivityPanel.java
index 163afa1..50371ae 100644
--- a/src/com/android/settings/panel/InternetConnectivityPanel.java
+++ b/src/com/android/settings/panel/InternetConnectivityPanel.java
@@ -65,6 +65,8 @@
     private static final String TAG = "InternetConnectivityPanel";
     private static final int SUBTITLE_TEXT_NONE = -1;
     private static final int SUBTITLE_TEXT_WIFI_IS_TURNED_ON = R.string.wifi_is_turned_on_subtitle;
+    private static final int SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET =
+            R.string.select_network_to_connect_internet;
     private static final int SUBTITLE_TEXT_SEARCHING_FOR_NETWORKS =
             R.string.wifi_empty_list_wifi_on;
     private static final int SUBTITLE_TEXT_NON_CARRIER_NETWORK_UNAVAILABLE =
@@ -322,6 +324,9 @@
 
         final List<ScanResult> wifiList = mWifiManager.getScanResults();
         if (wifiList != null && wifiList.size() != 0) {
+            // When the Wi-Fi scan result is not empty
+            //   Sub-Title: Select the network you want to use for data
+            mSubtitle = SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET;
             return;
         }
 
diff --git a/src/com/android/settings/password/ChooseLockPassword.java b/src/com/android/settings/password/ChooseLockPassword.java
index 6382abf..06b17cd 100644
--- a/src/com/android/settings/password/ChooseLockPassword.java
+++ b/src/com/android/settings/password/ChooseLockPassword.java
@@ -42,7 +42,6 @@
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.Intent;
-import android.content.res.Resources.Theme;
 import android.graphics.Insets;
 import android.graphics.Typeface;
 import android.os.Bundle;
@@ -89,6 +88,7 @@
 import com.google.android.setupcompat.template.FooterBarMixin;
 import com.google.android.setupcompat.template.FooterButton;
 import com.google.android.setupdesign.GlifLayout;
+import com.google.android.setupdesign.util.ThemeHelper;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -107,12 +107,6 @@
         return modIntent;
     }
 
-    @Override
-    protected void onApplyThemeResource(Theme theme, int resid, boolean first) {
-        final int new_resid = SetupWizardUtils.getTheme(this, getIntent());
-        super.onApplyThemeResource(theme, new_resid, first);
-    }
-
     public static class IntentBuilder {
 
         private final Intent mIntent;
@@ -207,6 +201,8 @@
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        setTheme(SetupWizardUtils.getTheme(this, getIntent()));
+        ThemeHelper.trySetDynamicColor(this);
         super.onCreate(savedInstanceState);
         findViewById(R.id.content_parent).setFitsSystemWindows(false);
     }
diff --git a/src/com/android/settings/password/ChooseLockPattern.java b/src/com/android/settings/password/ChooseLockPattern.java
index 6e5368d..53898a6 100644
--- a/src/com/android/settings/password/ChooseLockPattern.java
+++ b/src/com/android/settings/password/ChooseLockPattern.java
@@ -33,10 +33,8 @@
 import android.util.TypedValue;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
-import android.view.Surface;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.ScrollView;
 import android.widget.TextView;
 
 import androidx.fragment.app.Fragment;
@@ -61,6 +59,8 @@
 import com.google.android.setupcompat.template.FooterBarMixin;
 import com.google.android.setupcompat.template.FooterButton;
 import com.google.android.setupdesign.GlifLayout;
+import com.google.android.setupdesign.template.IconMixin;
+import com.google.android.setupdesign.util.ThemeHelper;
 
 import java.util.Collections;
 import java.util.List;
@@ -94,12 +94,6 @@
         return modIntent;
     }
 
-    @Override
-    protected void onApplyThemeResource(Theme theme, int resid, boolean first) {
-        final int new_resid = SetupWizardUtils.getTheme(this, getIntent());
-        super.onApplyThemeResource(theme, new_resid, first);
-    }
-
     public static class IntentBuilder {
         private final Intent mIntent;
 
@@ -171,7 +165,8 @@
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
-        // requestWindowFeature(Window.FEATURE_NO_TITLE);
+        setTheme(SetupWizardUtils.getTheme(this, getIntent()));
+        ThemeHelper.trySetDynamicColor(this);
         super.onCreate(savedInstanceState);
         findViewById(R.id.content_parent).setFitsSystemWindows(false);
     }
@@ -205,9 +200,7 @@
 
         private LockscreenCredential mCurrentCredential;
         private boolean mRequestGatekeeperPassword;
-        protected TextView mTitleText;
         protected TextView mHeaderText;
-        protected TextView mMessageText;
         protected LockPatternView mLockPatternView;
         protected TextView mFooterText;
         protected FooterButton mSkipOrClearButton;
@@ -215,9 +208,6 @@
         @VisibleForTesting protected LockscreenCredential mChosenPattern;
         private ColorStateList mDefaultHeaderColorList;
 
-        // ScrollView that contains title and header, only exist in land mode
-        private ScrollView mTitleHeaderScrollView;
-
         /**
          * The patten used during the help screen to show how to draw a pattern.
          */
@@ -308,15 +298,6 @@
                     }
                     mFooterText.setText("");
                     mNextButton.setEnabled(false);
-
-                    if (mTitleHeaderScrollView != null) {
-                        mTitleHeaderScrollView.post(new Runnable() {
-                            @Override
-                            public void run() {
-                                mTitleHeaderScrollView.fullScroll(ScrollView.FOCUS_DOWN);
-                            }
-                        });
-                    }
                 }
          };
 
@@ -513,17 +494,12 @@
                 Bundle savedInstanceState) {
             final GlifLayout layout = (GlifLayout) inflater.inflate(
                     R.layout.choose_lock_pattern, container, false);
-            switch(getContext().getDisplay().getRotation()) {
-                case Surface.ROTATION_90:
-                case Surface.ROTATION_270:
-                    layout.setLandscapeHeaderAreaVisible(false /* visible */);
-                    break;
-            }
             updateActivityTitle();
+            layout.setHeaderText(getActivity().getTitle());
             if (getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)) {
                 View iconView = layout.findViewById(R.id.sud_layout_icon);
                 if (iconView != null) {
-                    iconView.setVisibility(View.GONE);
+                    layout.getMixin(IconMixin.class).setVisibility(View.GONE);
                 }
             } else {
                 if (mForFingerprint) {
@@ -561,10 +537,8 @@
         @Override
         public void onViewCreated(View view, Bundle savedInstanceState) {
             super.onViewCreated(view, savedInstanceState);
-            mTitleText = view.findViewById(R.id.suc_layout_title);
             mHeaderText = (TextView) view.findViewById(R.id.headerText);
             mDefaultHeaderColorList = mHeaderText.getTextColors();
-            mMessageText = view.findViewById(R.id.sud_layout_description);
             mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
             mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);
             mLockPatternView.setTactileFeedbackEnabled(
@@ -573,9 +547,6 @@
 
             mFooterText = (TextView) view.findViewById(R.id.footerText);
 
-            mTitleHeaderScrollView = (ScrollView) view.findViewById(R.id
-                    .scroll_layout_title_header);
-
             // make it so unhandled touch events within the unlock screen go to the
             // lock pattern view.
             final LinearLayoutWithDefaultTouchRecepient topLayout
@@ -756,12 +727,13 @@
             } else {
                 mHeaderText.setText(stage.headerMessage);
             }
+            final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
             final boolean forAnyBiometric = mForFingerprint || mForFace || mForBiometrics;
             int message = forAnyBiometric ? stage.messageForBiometrics : stage.message;
             if (message == ID_EMPTY_MESSAGE) {
-                mMessageText.setText("");
+                layout.setDescriptionText("");
             } else {
-                mMessageText.setText(message);
+                layout.setDescriptionText(message);
             }
             if (stage.footerMessage == ID_EMPTY_MESSAGE) {
                 mFooterText.setText("");
@@ -782,7 +754,7 @@
 
                 if (stage == Stage.NeedToConfirm && forAnyBiometric) {
                     mHeaderText.setText("");
-                    mTitleText.setText(R.string.lockpassword_draw_your_pattern_again_header);
+                    layout.setHeaderText(R.string.lockpassword_draw_your_pattern_again_header);
                 }
             }
 
diff --git a/src/com/android/settings/password/ConfirmLockPassword.java b/src/com/android/settings/password/ConfirmLockPassword.java
index 6092d9f..0278941 100644
--- a/src/com/android/settings/password/ConfirmLockPassword.java
+++ b/src/com/android/settings/password/ConfirmLockPassword.java
@@ -53,6 +53,8 @@
 import com.android.settingslib.animation.AppearAnimationUtils;
 import com.android.settingslib.animation.DisappearAnimationUtils;
 
+import com.google.android.setupdesign.GlifLayout;
+
 import java.util.ArrayList;
 
 public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
@@ -103,14 +105,13 @@
         private AsyncTask<?, ?, ?> mPendingLockCheck;
         private CredentialCheckResultTracker mCredentialCheckResultTracker;
         private boolean mDisappearing = false;
-        private TextView mHeaderTextView;
-        private TextView mDetailsTextView;
         private CountDownTimer mCountdownTimer;
         private boolean mIsAlpha;
         private InputMethodManager mImm;
         private AppearAnimationUtils mAppearAnimationUtils;
         private DisappearAnimationUtils mDisappearAnimationUtils;
         private boolean mIsManagedProfile;
+        private GlifLayout mGlifLayout;
 
         // required constructor for fragments
         public ConfirmLockPasswordFragment() {
@@ -130,18 +131,12 @@
                             : R.layout.confirm_lock_password,
                     container,
                     false);
-
+            mGlifLayout = view.findViewById(R.id.setup_wizard_layout);
             mPasswordEntry = (ImeAwareEditText) view.findViewById(R.id.password_entry);
             mPasswordEntry.setOnEditorActionListener(this);
             // EditText inside ScrollView doesn't automatically get focus.
             mPasswordEntry.requestFocus();
             mPasswordEntryInputDisabler = new TextViewInputDisabler(mPasswordEntry);
-
-            mHeaderTextView = (TextView) view.findViewById(R.id.headerText);
-            if (mHeaderTextView == null) {
-                mHeaderTextView = view.findViewById(R.id.suc_layout_title);
-            }
-            mDetailsTextView = (TextView) view.findViewById(R.id.sud_layout_description);
             mErrorTextView = (TextView) view.findViewById(R.id.errorText);
             mIsAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == storedQuality
                     || DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == storedQuality
@@ -168,8 +163,8 @@
                 if (TextUtils.isEmpty(detailsMessage)) {
                     detailsMessage = getString(getDefaultDetails());
                 }
-                mHeaderTextView.setText(headerMessage);
-                mDetailsTextView.setText(detailsMessage);
+                mGlifLayout.setHeaderText(headerMessage);
+                mGlifLayout.setDescriptionText(detailsMessage);
             }
             int currentType = mPasswordEntry.getInputType();
             if (mIsAlpha) {
@@ -194,7 +189,7 @@
                     110, 1f /* translationScale */,
                     0.5f /* delayScale */, AnimationUtils.loadInterpolator(
                             getContext(), android.R.interpolator.fast_out_linear_in));
-            setAccessibilityTitle(mHeaderTextView.getText());
+            setAccessibilityTitle(mGlifLayout.getHeaderText());
 
             mCredentialCheckResultTracker = (CredentialCheckResultTracker) getFragmentManager()
                     .findFragmentByTag(FRAGMENT_TAG_CHECK_LOCK_RESULT);
@@ -278,8 +273,8 @@
         @Override
         public void prepareEnterAnimation() {
             super.prepareEnterAnimation();
-            mHeaderTextView.setAlpha(0f);
-            mDetailsTextView.setAlpha(0f);
+            mGlifLayout.getHeaderTextView().setAlpha(0f);
+            mGlifLayout.getDescriptionTextView().setAlpha(0f);
             mCancelButton.setAlpha(0f);
             if (mForgotButton != null) {
                 mForgotButton.setAlpha(0f);
@@ -290,8 +285,8 @@
 
         private View[] getActiveViews() {
             ArrayList<View> result = new ArrayList<>();
-            result.add(mHeaderTextView);
-            result.add(mDetailsTextView);
+            result.add(mGlifLayout.getHeaderTextView());
+            result.add(mGlifLayout.getDescriptionTextView());
             if (mCancelButton.getVisibility() == View.VISIBLE) {
                 result.add(mCancelButton);
             }
diff --git a/src/com/android/settings/password/ConfirmLockPattern.java b/src/com/android/settings/password/ConfirmLockPattern.java
index 0e18436..a1a7ea7f 100644
--- a/src/com/android/settings/password/ConfirmLockPattern.java
+++ b/src/com/android/settings/password/ConfirmLockPattern.java
@@ -28,7 +28,6 @@
 import android.os.storage.StorageManager;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
-import android.view.Surface;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.animation.AnimationUtils;
@@ -120,12 +119,6 @@
                     container,
                     false);
             mGlifLayout = view.findViewById(R.id.setup_wizard_layout);
-            switch(getContext().getDisplay().getRotation()) {
-                case Surface.ROTATION_90:
-                case Surface.ROTATION_270:
-                    mGlifLayout.setLandscapeHeaderAreaVisible(false /* visible */);
-                    break;
-            }
             mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
             mErrorTextView = (TextView) view.findViewById(R.id.errorText);
 
diff --git a/src/com/android/settings/password/SetupChooseLockPattern.java b/src/com/android/settings/password/SetupChooseLockPattern.java
index b34863d..70cd6f2 100644
--- a/src/com/android/settings/password/SetupChooseLockPattern.java
+++ b/src/com/android/settings/password/SetupChooseLockPattern.java
@@ -30,6 +30,8 @@
 import com.android.settings.R;
 import com.android.settings.SetupRedactionInterstitial;
 
+import com.google.android.setupdesign.GlifLayout;
+
 /**
  * Setup Wizard's version of ChooseLockPattern screen. It inherits the logic and basic structure
  * from ChooseLockPattern class, and should remain similar to that behaviorally. This class should
@@ -142,10 +144,11 @@
 
             // Show generic pattern message when pattern lock screen launch in Setup wizard flow
             // before fingerprint and face setup.
+            final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
             if (stage.message == ID_EMPTY_MESSAGE) {
-                mMessageText.setText("");
+                layout.setDescriptionText("");
             } else {
-                mMessageText.setText(stage.message);
+                layout.setDescriptionText(stage.message);
             }
         }
 
diff --git a/src/com/android/settings/wifi/slice/WifiSlice.java b/src/com/android/settings/wifi/slice/WifiSlice.java
index 1374e76..75d2c66 100644
--- a/src/com/android/settings/wifi/slice/WifiSlice.java
+++ b/src/com/android/settings/wifi/slice/WifiSlice.java
@@ -183,7 +183,7 @@
         return Utils.createIconWithDrawable(drawable);
     }
 
-    private IconCompat getEndIcon(WifiSliceItem wifiSliceItem) {
+    protected IconCompat getEndIcon(WifiSliceItem wifiSliceItem) {
         if (wifiSliceItem.getConnectedState() != WifiEntry.CONNECTED_STATE_DISCONNECTED) {
             return IconCompat.createWithResource(mContext, R.drawable.ic_settings_24dp);
         }
@@ -194,7 +194,7 @@
         return null;
     }
 
-    private SliceAction getWifiEntryAction(WifiSliceItem wifiSliceItem, IconCompat icon,
+    protected SliceAction getWifiEntryAction(WifiSliceItem wifiSliceItem, IconCompat icon,
             CharSequence title) {
         final int requestCode = wifiSliceItem.getKey().hashCode();
 
diff --git a/src/com/android/settings/wifi/slice/WifiSliceItem.java b/src/com/android/settings/wifi/slice/WifiSliceItem.java
index 9fe54d3..5028a06 100644
--- a/src/com/android/settings/wifi/slice/WifiSliceItem.java
+++ b/src/com/android/settings/wifi/slice/WifiSliceItem.java
@@ -36,6 +36,7 @@
     private final int mLevel;
     private final boolean mShouldShowXLevelIcon;
     private final boolean mShouldEditBeforeConnect;
+    private final boolean mHasInternetAccess;
     private final String mSummary;
 
     // These values must be kept within [WifiEntry.WIFI_LEVEL_MIN, WifiEntry.WIFI_LEVEL_MAX]
@@ -56,6 +57,7 @@
         mLevel = wifiEntry.getLevel();
         mShouldShowXLevelIcon = wifiEntry.shouldShowXLevelIcon();
         mShouldEditBeforeConnect = wifiEntry.shouldEditBeforeConnect();
+        mHasInternetAccess = wifiEntry.hasInternetAccess();
         mSummary = wifiEntry.getSummary(false /* concise */);
     }
 
@@ -112,6 +114,13 @@
     }
 
     /**
+     * Returns true when the Wi-Fi network has Internet access.
+     */
+    public boolean hasInternetAccess() {
+        return mHasInternetAccess;
+    }
+
+    /**
      * In Wi-Fi picker, when users click a saved network, it will connect to the Wi-Fi network.
      * However, for some special cases, Wi-Fi picker should show Wi-Fi editor UI for users to edit
      * security or password before connecting. Or users will always get connection fail results.
diff --git a/tests/robotests/src/com/android/settings/applications/GameSettingsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/GameSettingsPreferenceControllerTest.java
new file mode 100644
index 0000000..fa4fce8
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/applications/GameSettingsPreferenceControllerTest.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2021 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.applications;
+
+import static com.android.settings.core.BasePreferenceController.AVAILABLE;
+import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+
+import com.android.settings.testutils.FakeFeatureFactory;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+@RunWith(RobolectricTestRunner.class)
+public class GameSettingsPreferenceControllerTest {
+
+    private GameSettingsPreferenceController mController;
+    private GameSettingsFeatureProvider mProvider;
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application);
+
+        mProvider = FakeFeatureFactory.setupForTest().getGameSettingsFeatureProvider();
+        mController = new GameSettingsPreferenceController(mContext, "test_key", mProvider);
+    }
+
+    @Test
+    public void getAvailabilityStatus_GameSettingsFeatureEnabled_shouldReturnAVAILABLE() {
+        when(mProvider.isSupported(mContext)).thenReturn(true);
+        assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
+    }
+
+    @Test
+    public void getAvailabilityStatus_GameSettingsFeatureDisabled_shouldReturnUNSUPPORTED_ON_DEVICE() {
+        when(mProvider.isSupported(mContext)).thenReturn(false);
+        assertThat(mController.getAvailabilityStatus()).isEqualTo(UNSUPPORTED_ON_DEVICE);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/display/ScreenTimeoutSettingsTest.java b/tests/robotests/src/com/android/settings/display/ScreenTimeoutSettingsTest.java
index 24bcde8..abb616a 100644
--- a/tests/robotests/src/com/android/settings/display/ScreenTimeoutSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/display/ScreenTimeoutSettingsTest.java
@@ -75,6 +75,9 @@
     AdaptiveSleepCameraStatePreferenceController mAdaptiveSleepCameraStatePreferenceController;
 
     @Mock
+    AdaptiveSleepBatterySaverPreferenceController mAdaptiveSleepBatterySaverPreferenceController;
+
+    @Mock
     Preference mDisableOptionsPreference;
 
     @Before
@@ -103,6 +106,8 @@
         mSettings.mAdaptiveSleepPermissionController = mPermissionPreferenceController;
         mSettings.mAdaptiveSleepCameraStatePreferenceController =
                 mAdaptiveSleepCameraStatePreferenceController;
+        mSettings.mAdaptiveSleepBatterySaverPreferenceController =
+                mAdaptiveSleepBatterySaverPreferenceController;
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
index b7e6ffd..4c4b922 100644
--- a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
+++ b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
@@ -23,6 +23,7 @@
 
 import com.android.settings.accounts.AccountFeatureProvider;
 import com.android.settings.applications.ApplicationFeatureProvider;
+import com.android.settings.applications.GameSettingsFeatureProvider;
 import com.android.settings.applications.appinfo.ExtraAppInfoFeatureProvider;
 import com.android.settings.aware.AwareFeatureProvider;
 import com.android.settings.biometrics.face.FaceFeatureProvider;
@@ -85,6 +86,7 @@
     public WifiTrackerLibProvider wifiTrackerLibProvider;
     public ExtraAppInfoFeatureProvider extraAppInfoFeatureProvider;
     public SecuritySettingsFeatureProvider securitySettingsFeatureProvider;
+    public GameSettingsFeatureProvider gameSettingsFeatureProvider;
 
     /**
      * Call this in {@code @Before} method of the test class to use fake factory.
@@ -133,6 +135,7 @@
         wifiTrackerLibProvider = mock(WifiTrackerLibProvider.class);
         extraAppInfoFeatureProvider = mock(ExtraAppInfoFeatureProvider.class);
         securitySettingsFeatureProvider = mock(SecuritySettingsFeatureProvider.class);
+        gameSettingsFeatureProvider = mock(GameSettingsFeatureProvider.class);
     }
 
     @Override
@@ -264,4 +267,9 @@
     public SecuritySettingsFeatureProvider getSecuritySettingsFeatureProvider() {
         return securitySettingsFeatureProvider;
     }
+
+    @Override
+    public GameSettingsFeatureProvider getGameSettingsFeatureProvider() {
+        return gameSettingsFeatureProvider;
+    }
 }
diff --git a/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java b/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java
index c516f0c..4b06acf 100644
--- a/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java
+++ b/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.network;
 
+import static com.android.settings.network.ProviderModelSlice.ACTION_TITLE_CONNECT_TO_CARRIER;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
@@ -96,10 +98,12 @@
     private WifiSliceItem mMockWifiSliceItem3;
     @Mock
     ListBuilder.RowBuilder mMockCarrierRowBuild;
+    @Mock
+    WifiPickerTracker mWifiPickerTracker;
+    @Mock
+    WifiSliceItem mWifiSliceItem;
 
     private FakeFeatureFactory mFeatureFactory;
-    @Mock
-    private WifiPickerTracker mWifiPickerTracker;
 
     @Before
     @UiThreadTest
@@ -388,4 +392,29 @@
 
         verify(mMockNetworkProviderWorker, never()).connectCarrierNetwork();
     }
+
+    @Test
+    public void getWifiSliceItemRow_wifiNoInternetAccess_actionConnectToWifiSsid() {
+        when(mWifiSliceItem.getKey()).thenReturn("wifi_key");
+        when(mWifiSliceItem.getTitle()).thenReturn("wifi_ssid");
+        when(mWifiSliceItem.hasInternetAccess()).thenReturn(false);
+
+        ListBuilder.RowBuilder rowBuilder =
+                mMockProviderModelSlice.getWifiSliceItemRow(mWifiSliceItem);
+
+        assertThat(rowBuilder.getPrimaryAction().getTitle())
+                .isEqualTo("wifi_ssid");
+    }
+
+    @Test
+    public void getWifiSliceItemRow_wifiHasInternetAccess_actionConnectToCarrier() {
+        when(mWifiSliceItem.getTitle()).thenReturn("wifi_ssid");
+        when(mWifiSliceItem.hasInternetAccess()).thenReturn(true);
+
+        ListBuilder.RowBuilder rowBuilder =
+                mMockProviderModelSlice.getWifiSliceItemRow(mWifiSliceItem);
+
+        assertThat(rowBuilder.getPrimaryAction().getTitle())
+                .isEqualTo(ACTION_TITLE_CONNECT_TO_CARRIER);
+    }
 }
diff --git a/tests/unit/src/com/android/settings/panel/InternetConnectivityPanelTest.java b/tests/unit/src/com/android/settings/panel/InternetConnectivityPanelTest.java
index 5ee2cc9..651eb04 100644
--- a/tests/unit/src/com/android/settings/panel/InternetConnectivityPanelTest.java
+++ b/tests/unit/src/com/android/settings/panel/InternetConnectivityPanelTest.java
@@ -63,6 +63,10 @@
             ApplicationProvider.getApplicationContext(), "airplane_mode");
     public static final String SUBTITLE_WIFI_IS_TURNED_ON = ResourcesUtils.getResourcesString(
             ApplicationProvider.getApplicationContext(), "wifi_is_turned_on_subtitle");
+    public static final String SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET =
+            ResourcesUtils.getResourcesString(
+                    ApplicationProvider.getApplicationContext(),
+                    "select_network_to_connect_internet");
     public static final String BUTTON_SETTINGS = ResourcesUtils.getResourcesString(
             ApplicationProvider.getApplicationContext(), "settings_button");
     public static final String SUBTITLE_NON_CARRIER_NETWORK_UNAVAILABLE =
@@ -175,7 +179,7 @@
     }
 
     @Test
-    public void getSubTitle_apmOffWifiOnTwoWifiItemsNoCarrierData_shouldBeNull() {
+    public void getSubTitle_apmOffWifiOnTwoWifiItemsNoCarrierData_selectNetworkToConnectInternet() {
         List wifiList = new ArrayList<ScanResult>();
         wifiList.add(new ScanResult());
         wifiList.add(new ScanResult());
@@ -183,7 +187,8 @@
 
         mPanel.updatePanelTitle();
 
-        assertThat(mPanel.getSubTitle()).isNull();
+        assertThat(mPanel.getSubTitle())
+                .isEqualTo(SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET);
     }
 
     @Test
diff --git a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
index b6f330b..1e74d92 100644
--- a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
+++ b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
@@ -21,6 +21,7 @@
 
 import com.android.settings.accounts.AccountFeatureProvider;
 import com.android.settings.applications.ApplicationFeatureProvider;
+import com.android.settings.applications.GameSettingsFeatureProvider;
 import com.android.settings.applications.appinfo.ExtraAppInfoFeatureProvider;
 import com.android.settings.aware.AwareFeatureProvider;
 import com.android.settings.biometrics.face.FaceFeatureProvider;
@@ -80,6 +81,7 @@
     public WifiTrackerLibProvider wifiTrackerLibProvider;
     public ExtraAppInfoFeatureProvider extraAppInfoFeatureProvider;
     public SecuritySettingsFeatureProvider securitySettingsFeatureProvider;
+    public GameSettingsFeatureProvider gameSettingsFeatureProvider;
 
     /**
      * Call this in {@code @Before} method of the test class to use fake factory.
@@ -119,6 +121,7 @@
         wifiTrackerLibProvider = mock(WifiTrackerLibProvider.class);
         extraAppInfoFeatureProvider = mock(ExtraAppInfoFeatureProvider.class);
         securitySettingsFeatureProvider = mock(SecuritySettingsFeatureProvider.class);
+        gameSettingsFeatureProvider = mock(GameSettingsFeatureProvider.class);
     }
 
     @Override
@@ -250,4 +253,9 @@
     public SecuritySettingsFeatureProvider getSecuritySettingsFeatureProvider() {
         return securitySettingsFeatureProvider;
     }
+
+    @Override
+    public GameSettingsFeatureProvider getGameSettingsFeatureProvider() {
+        return gameSettingsFeatureProvider;
+    }
 }