[automerger skipped] Merge "Import translations. DO NOT MERGE" into qt-r1-dev am: 09c08d1da0 -s ours
am: 73a98df64b -s ours
am skip reason: subject contains skip directive

Change-Id: Ia3e5d45060f2c56472321a7d219587ce42ac15e9
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ff3f650..325fc8d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2594,13 +2594,6 @@
                 android:value="com.android.settings.notification.AppNotificationSettings" />
         </activity>
 
-        <!-- Show channel group-level notification settings (group passed in as extras) -->
-        <activity android:name="Settings$ChannelGroupNotificationSettingsActivity"
-                  android:exported="true">
-            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                       android:value="com.android.settings.notification.ChannelGroupNotificationSettings" />
-        </activity>
-
         <!-- Show channel-level notification settings (channel passed in as extras) -->
         <activity android:name="Settings$ChannelNotificationSettingsActivity"
                   android:label="@string/notification_channel_title"
@@ -2714,7 +2707,7 @@
 
         <activity
             android:name=".wifi.NetworkRequestDialogActivity"
-            android:theme="@style/Transparent"
+            android:theme="@style/Theme.AlertDialog"
             android:excludeFromRecents="true"
             android:launchMode="singleTop"
             android:taskAffinity=".wifi.NetworkRequestDialogActivity"
diff --git a/res/layout/empty_view.xml b/res/layout/empty_view.xml
new file mode 100644
index 0000000..33218f7
--- /dev/null
+++ b/res/layout/empty_view.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2019 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:visibility="gone"/>
diff --git a/res/layout/wifi_dialog.xml b/res/layout/wifi_dialog.xml
index d5dbb17..0a25934 100644
--- a/res/layout/wifi_dialog.xml
+++ b/res/layout/wifi_dialog.xml
@@ -138,8 +138,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             style="@style/wifi_item_spinner"
-                            android:prompt="@string/wifi_eap_method"
-                            android:entries="@array/wifi_eap_method" />
+                            android:prompt="@string/wifi_eap_method" />
                 </LinearLayout>
 
                 <LinearLayout android:id="@+id/l_phase2"
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index a5cdab0..69b1b71 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -423,13 +423,13 @@
     <string name="security_settings_face_settings_require_attention" msgid="1638445716306615123">"Eyes open to unlock"</string>
     <string name="security_settings_face_settings_require_attention_details" msgid="5749808567341263288">"When using face authentication, your eyes must be open"</string>
     <string name="security_settings_face_settings_require_confirmation" msgid="2559602923985027572">"Always require confirmation"</string>
-    <string name="security_settings_face_settings_require_confirmation_details" msgid="2002651109571928756">"When authenticating in apps, always require confirmation"</string>
-    <string name="security_settings_face_settings_remove_face_data" msgid="3477772641643318370">"Remove face data"</string>
-    <string name="security_settings_face_settings_footer" msgid="8056977398747222768">"Your face can be used to unlock your device and access apps. "<annotation id="url">"Learn more"</annotation></string>
-    <!-- no translation found for security_settings_face_settings_remove_dialog_title (4829278778459836075) -->
-    <skip />
-    <!-- no translation found for security_settings_face_settings_remove_dialog_details (2609671025686003946) -->
-    <skip />
+    <string name="security_settings_face_settings_require_confirmation_details" msgid="6466094680756211420">"When using Face Unlock in apps, always require confirmation step"</string>
+    <string name="security_settings_face_settings_remove_face_data" msgid="304401377141467791">"Delete face data"</string>
+    <string name="security_settings_face_settings_enroll" msgid="495403103503629382">"Set up Face Unlock"</string>
+    <string name="security_settings_face_settings_footer" msgid="6072833685685070967">"Use Face Unlock to unlock your device, sign in to apps and confirm payments.\n\nKeep in mind:\nLooking at the phone can unlock it when you don’t intend to.\n\nYour phone can be unlocked by someone else if it’s held up to your face while your eyes are open.\n\nYour phone can be unlocked by someone who looks a lot like you, such as an identical sibling."</string>
+    <string name="security_settings_face_settings_remove_dialog_title" msgid="4829278778459836075">"Delete face data?"</string>
+    <string name="security_settings_face_settings_remove_dialog_details" msgid="1959642447512807205">"The images and biometric data used by Face Unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern or password to unlock your phone, sign in to apps and confirm payments."</string>
+    <string name="security_settings_face_settings_context_subtitle" msgid="4381276009777294566">"Use face unlock to unlock your phone"</string>
     <string name="security_settings_fingerprint_preference_title" msgid="2488725232406204350">"Fingerprint"</string>
     <string name="fingerprint_manage_category_title" msgid="8293801041700001681">"Manage fingerprints"</string>
     <string name="fingerprint_usage_category_title" msgid="8438526918999536619">"Use fingerprint for"</string>
@@ -4352,9 +4352,13 @@
     <string name="game_driver_app_preference_default" msgid="7686384740483216333">"Default"</string>
     <string name="game_driver_app_preference_game_driver" msgid="6426312331295324606">"Game Driver"</string>
     <string name="game_driver_app_preference_system" msgid="8272672982113332753">"System Graphics Driver"</string>
+    <!-- no translation found for game_driver_all_apps_preference_values:0 (7193648562434970105) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:1 (7189663725490629463) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:2 (7166160247759864796) -->
     <!-- no translation found for game_driver_app_preference_values:0 (4271044622117073985) -->
     <!-- no translation found for game_driver_app_preference_values:1 (6628516810440406199) -->
     <!-- no translation found for game_driver_app_preference_values:2 (1760397725970916076) -->
+    <!-- no translation found for game_driver_app_preference_values:3 (6260984152570269090) -->
     <string name="unsupported_setting_summary" product="default" msgid="11246953620654225">"Setting isn’t supported on this phone"</string>
     <string name="unsupported_setting_summary" product="tablet" msgid="6328431665635673717">"Setting isn’t supported on this tablet"</string>
     <string name="unsupported_setting_summary" product="device" msgid="2348970994972110886">"Setting isn’t supported on this device"</string>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index d046143..44a3c94 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -422,13 +422,13 @@
     <string name="security_settings_face_settings_require_attention" msgid="1638445716306615123">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‏‏‎‏‎‏‏‏‏‎‎‏‏‏‎‏‏‎‏‏‎‏‏‎‎‏‎‏‎‏‏‏‎‎‎‎‎‏‏‎‏‏‏‎‏‎‏‏‎‏‏‎‏‎‏‎‎‏‏‎Eyes open to unlock‎‏‎‎‏‎"</string>
     <string name="security_settings_face_settings_require_attention_details" msgid="5749808567341263288">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‏‏‏‏‏‏‎‎‏‎‏‏‎‏‏‎‏‏‎‎‎‏‏‎‏‏‎‏‏‎‎‏‏‏‏‎‏‏‎‏‏‏‏‏‏‎‏‎‏‎‎‏‏‎‏‏‏‎‎‎‎When using face authentication, your eyes must be open‎‏‎‎‏‎"</string>
     <string name="security_settings_face_settings_require_confirmation" msgid="2559602923985027572">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‏‏‏‎‎‎‎‏‎‏‏‎‎‎‏‎‎‏‎‏‎‎‏‏‎‎‎‏‎‎‏‎‏‎‎‎‏‎‏‏‎‏‏‏‎‎‎‎‎‏‏‏‏‏‎‏‎‎‎Always require confirmation‎‏‎‎‏‎"</string>
-    <string name="security_settings_face_settings_require_confirmation_details" msgid="2002651109571928756">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‏‏‏‏‎‎‏‎‏‎‏‏‎‏‏‎‎‎‏‎‎‏‎‎‏‎‏‏‎‏‏‎‏‏‎‎‎‏‎‎‏‏‏‎‏‎‎‎‏‎‏‎‏‏‎‏‎‎‎When authenticating in apps, always require confirmation‎‏‎‎‏‎"</string>
-    <string name="security_settings_face_settings_remove_face_data" msgid="3477772641643318370">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‎‎‎‎‎‏‎‎‎‎‏‏‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‏‎‏‎‎‎‏‎‏‎‏‏‏‎‎‎‏‏‎‎‏‏‎‎‎‏‏‎‎‎‏‎‎Remove face data‎‏‎‎‏‎"</string>
-    <string name="security_settings_face_settings_footer" msgid="8056977398747222768">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‏‏‏‏‏‎‏‎‎‎‎‎‎‏‎‎‎‏‎‎‏‎‎‎‎‎‏‏‎‏‎‎‏‏‏‏‎‏‎‏‏‎‏‏‏‎‏‎‎‏‎‏‏‏‏‎‎‎‎‎Your face can be used to unlock your device and access apps. ‎‏‎‎‏‏‎"<annotation id="url">"‎‏‎‎‏‏‏‎Learn more‎‏‎‎‏‏‎"</annotation>"‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <!-- no translation found for security_settings_face_settings_remove_dialog_title (4829278778459836075) -->
-    <skip />
-    <!-- no translation found for security_settings_face_settings_remove_dialog_details (2609671025686003946) -->
-    <skip />
+    <string name="security_settings_face_settings_require_confirmation_details" msgid="6466094680756211420">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‏‎‎‏‏‎‏‏‏‏‎‎‎‎‏‎‏‏‏‎‏‏‎‏‏‎‏‎‎‏‏‏‎‎‏‎‏‎‎‎‎‏‎‎‎‏‎‎‏‏‏‎‏‏‎‏‏‏‎‎‎When using face unlock in apps, always require confirmation step‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_remove_face_data" msgid="304401377141467791">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‏‏‏‎‎‎‎‏‏‏‎‎‏‎‏‏‏‎‎‏‏‎‏‏‏‎‎‎‎‏‎‎‏‎‎‎‏‏‎‏‎‏‎‎‎‎‎‏‎‏‎‏‎‏‎‎‎‏‏‏‏‎Delete face data‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_enroll" msgid="495403103503629382">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‏‏‏‏‎‏‏‏‎‎‎‎‎‎‎‎‎‎‏‏‎‎‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‏‏‏‏‎‏‎‏‏‎‏‏‏‏‎‎‎‏‎‎‎‏‏‎‎Set up face unlock‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_footer" msgid="6072833685685070967">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‎‏‎‎‎‏‎‎‎‏‏‏‎‎‎‎‏‎‏‎‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‏‎‏‎‎‏‎‎‎‏‏‏‎‏‏‎‎‎‏‏‏‎‏‏‏‎Use face unlock to unlock your device, sign in to apps, and confirm payments.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Keep in mind:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Looking at the phone can unlock it when you don’t intend to.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Your phone can be unlocked by someone else if it’s held up to your face while your eyes are open.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Your phone can be unlocked by someone who looks a lot like you, say, an identical sibling.‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_remove_dialog_title" msgid="4829278778459836075">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‎‎‏‏‎‎‎‎‎‏‎‏‎‎‎‎‏‎‏‏‎‏‏‏‎‏‏‎‎‏‎‏‏‏‏‏‎‏‏‎‏‏‏‎‎‏‎‎‏‏‏‎‏‎‏‎‏‎‏‏‎Delete face data?‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_remove_dialog_details" msgid="1959642447512807205">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‏‏‎‎‏‏‎‎‏‎‎‎‎‎‏‏‎‎‎‏‏‎‏‏‎‎‎‏‏‎‎‎‏‎‏‏‎‎‎‏‏‏‎‎‏‎‎‏‏‏‎‎‏‎‎‏‎‏‎The images and biometric data used by face unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern, or password to unlock your phone, sign in to apps, and confirm payments.‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_context_subtitle" msgid="4381276009777294566">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‏‏‎‎‏‏‎‎‏‏‎‏‎‏‏‎‏‎‏‏‎‏‎‏‎‎‎‏‎‏‏‎‎‎‎‏‏‎‏‏‎‏‏‏‎‏‏‎‏‏‎‎‏‏‏‎‎‏‏‎‎Use face unlock to unlock your phone‎‏‎‎‏‎"</string>
     <string name="security_settings_fingerprint_preference_title" msgid="2488725232406204350">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‎‎‎‏‎‎‏‏‎‏‏‏‎‏‎‎‏‏‎‏‎‎‏‏‎‏‏‏‏‎‏‎‎‎‏‏‏‏‏‏‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‎Fingerprint‎‏‎‎‏‎"</string>
     <string name="fingerprint_manage_category_title" msgid="8293801041700001681">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‏‏‎‎‏‏‎‎‎‎‎‎‎‎‎‎‏‏‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‏‏‎‎‎‏‎‏‏‏‏‎‎‏‎‎‎‏‎Manage fingerprints‎‏‎‎‏‎"</string>
     <string name="fingerprint_usage_category_title" msgid="8438526918999536619">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‏‏‎‏‏‏‎‏‎‏‎‏‏‏‎‎‎‎‏‏‎‎‎‎‎‏‎‏‎‏‎‎‎‏‎‎‏‏‏‏‏‎‎‏‏‏‏‏‎‏‎‏‏‎Use fingerprint for‎‏‎‎‏‎"</string>
@@ -4351,9 +4351,13 @@
     <string name="game_driver_app_preference_default" msgid="7686384740483216333">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‏‎‏‎‏‏‏‎‎‎‎‏‏‎‎‎‏‏‎‎‏‎‎‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‎‏‏‎‎‏‏‏‏‎‎‏‏‎‏‎Default‎‏‎‎‏‎"</string>
     <string name="game_driver_app_preference_game_driver" msgid="6426312331295324606">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‏‎‎‏‎‎‏‎‏‏‏‎‏‏‎‏‏‎‎‏‎‎‎‎‎‏‎‎‎‏‏‎‏‎‏‎‏‎‎‏‎‎‎‏‏‏‏‏‏‎‎‏‏‎‏‏‏‏‏‎‎Game Driver‎‏‎‎‏‎"</string>
     <string name="game_driver_app_preference_system" msgid="8272672982113332753">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‏‎‎‏‏‏‎‎‏‏‏‎‎‎‎‎‎‏‏‏‏‏‏‎‎‏‎‏‎‎‏‏‏‎‏‎‏‏‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‎System Graphics Driver‎‏‎‎‏‎"</string>
+    <!-- no translation found for game_driver_all_apps_preference_values:0 (7193648562434970105) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:1 (7189663725490629463) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:2 (7166160247759864796) -->
     <!-- no translation found for game_driver_app_preference_values:0 (4271044622117073985) -->
     <!-- no translation found for game_driver_app_preference_values:1 (6628516810440406199) -->
     <!-- no translation found for game_driver_app_preference_values:2 (1760397725970916076) -->
+    <!-- no translation found for game_driver_app_preference_values:3 (6260984152570269090) -->
     <string name="unsupported_setting_summary" product="default" msgid="11246953620654225">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‎‏‏‎‏‎‎‏‏‏‏‏‏‏‎‏‎‏‎‎‎‎‏‎‏‏‎‏‏‏‎‎‏‏‎‏‎‏‏‏‎‏‎‏‎‎‏‎‎‎‏‎‎‏‎‎‎‏‎Setting isn’t supported on this phone‎‏‎‎‏‎"</string>
     <string name="unsupported_setting_summary" product="tablet" msgid="6328431665635673717">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‎‏‏‏‏‏‎‏‎‎‏‏‎‎‎‏‏‎‏‏‎‎‎‏‎‎‏‎‎‎‎‎‎‏‏‏‏‎‎‎‏‏‎‎‎‏‎‎‎‏‏‎‎‏‏‏‎‏‎‏‎Setting isn’t supported on this tablet‎‏‎‎‏‎"</string>
     <string name="unsupported_setting_summary" product="device" msgid="2348970994972110886">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‎‎‏‎‎‏‏‎‎‏‎‎‏‏‏‎‎‎‏‎‏‎‏‏‎‎‏‎‏‎‏‏‏‏‎‎‎‎‎‎‏‎‎‎‏‏‎‎‎‎‎‎‏‎‎‏‏‎‎Setting isn’t supported on this device‎‏‎‎‏‎"</string>
diff --git a/res/xml/app_notification_settings.xml b/res/xml/app_notification_settings.xml
index fedd3cc..7330f8d 100644
--- a/res/xml/app_notification_settings.xml
+++ b/res/xml/app_notification_settings.xml
@@ -30,6 +30,11 @@
         android:key="block_desc" />
 
     <!-- Channels/Channel groups added here -->
+    <PreferenceCategory
+        android:key="channels"
+        android:layout="@layout/empty_view"
+        settings:allowDividerAbove="false"
+        settings:allowDividerBelow="false" />
 
     <!-- Importance toggle -->
     <com.android.settingslib.RestrictedSwitchPreference
diff --git a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
index e15b0e3..e526417 100644
--- a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
+++ b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
@@ -160,7 +160,7 @@
     @Override
     public int getAvailabilityStatus() {
         // TODO(b/37313605): Re-enable once this controller supports instant apps
-        return isInstantApp() || isSystemModule() ? DISABLED_FOR_USER : AVAILABLE;
+        return mFinishing || isInstantApp() || isSystemModule() ? DISABLED_FOR_USER : AVAILABLE;
     }
 
     @Override
@@ -189,7 +189,7 @@
 
     @Override
     public void onResume() {
-        if (isAvailable() && !mFinishing) {
+        if (isAvailable()) {
             mAppsControlDisallowedBySystem = RestrictedLockUtilsInternal.hasBaseUserRestriction(
                     mActivity, UserManager.DISALLOW_APPS_CONTROL, mUserId);
             mAppsControlDisallowedAdmin = RestrictedLockUtilsInternal.checkIfRestrictionEnforced(
diff --git a/src/com/android/settings/core/gateway/SettingsGateway.java b/src/com/android/settings/core/gateway/SettingsGateway.java
index 5a81e71..384f262 100644
--- a/src/com/android/settings/core/gateway/SettingsGateway.java
+++ b/src/com/android/settings/core/gateway/SettingsGateway.java
@@ -106,7 +106,6 @@
 import com.android.settings.nfc.PaymentSettings;
 import com.android.settings.notification.AppBubbleNotificationSettings;
 import com.android.settings.notification.AppNotificationSettings;
-import com.android.settings.notification.ChannelGroupNotificationSettings;
 import com.android.settings.notification.ChannelNotificationSettings;
 import com.android.settings.notification.ConfigureNotificationSettings;
 import com.android.settings.notification.NotificationAccessSettings;
@@ -238,7 +237,6 @@
             AppNotificationSettings.class.getName(),
             NotificationAssistantPicker.class.getName(),
             ChannelNotificationSettings.class.getName(),
-            ChannelGroupNotificationSettings.class.getName(),
             ApnSettings.class.getName(),
             ApnEditor.class.getName(),
             WifiCallingSettings.class.getName(),
diff --git a/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java b/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java
index 3da5763..c477abc 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java
@@ -26,6 +26,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
+import android.provider.Settings;
 
 import androidx.core.graphics.drawable.IconCompat;
 import androidx.slice.Slice;
@@ -72,11 +73,12 @@
             return null;
         }
 
-        // Display the contextual card only if all the following 3 conditions hold:
-        // 1. The Screen Attention is enabled in Settings.
+        // Display the contextual card only if all the following 4 conditions hold:
+        // 1. The Screen Attention is available in Settings.
         // 2. The device is not recently set up.
         // 3. Current user hasn't opened Screen Attention's settings page before.
-        if (isSettingsAvailable() && !isUserInteracted() && !isRecentlySetup()) {
+        // 4. Screen Attention is off.
+        if (isSettingsAvailable() && !isUserInteracted() && !isRecentlySetup() && !isTurnedOn()) {
             final IconCompat icon = IconCompat.createWithResource(mContext,
                     R.drawable.ic_settings_adaptive_sleep);
             final CharSequence title = mContext.getText(R.string.adaptive_sleep_title);
@@ -123,6 +125,14 @@
     }
 
     /**
+     * @return {@code true} if the feature is turned on for the device, otherwise {@code false}
+     */
+    private boolean isTurnedOn() {
+        return Settings.System.getInt(
+                mContext.getContentResolver(), Settings.System.ADAPTIVE_SLEEP, 0) != 0;
+    }
+
+    /**
      * @return {@code true} if the current user has opened the Screen Attention settings page
      * before, otherwise {@code false}.
      */
diff --git a/src/com/android/settings/homepage/contextualcards/slices/NotificationChannelSlice.java b/src/com/android/settings/homepage/contextualcards/slices/NotificationChannelSlice.java
index ccccd39..ff76779 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/NotificationChannelSlice.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/NotificationChannelSlice.java
@@ -20,7 +20,7 @@
 import static android.app.NotificationManager.IMPORTANCE_NONE;
 import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
 
-import static com.android.settings.notification.NotificationSettingsBase.ARG_FROM_SETTINGS;
+import static com.android.settings.notification.ChannelListPreferenceController.ARG_FROM_SETTINGS;
 
 import android.app.Application;
 import android.app.NotificationChannel;
@@ -110,7 +110,7 @@
      *
      * Note:
      * When the sent count of notification channels is the same, follow the sorting mechanism from
-     * {@link com.android.settings.notification.NotificationSettingsBase#mChannelComparator}.
+     * {@link com.android.settings.notification.ChannelListPreferenceController}.
      * Since slice view only shows displayable notification channels, so those deleted ones are
      * excluded from the comparison here.
      */
@@ -257,7 +257,6 @@
         channelArgs.putInt(AppInfoBase.ARG_PACKAGE_UID, mUid);
         channelArgs.putString(AppInfoBase.ARG_PACKAGE_NAME, mPackageName);
         channelArgs.putString(Settings.EXTRA_CHANNEL_ID, channel.getId());
-        channelArgs.putBoolean(ARG_FROM_SETTINGS, true);
 
         final Intent channelIntent = new SubSettingLauncher(mContext)
                 .setDestination(ChannelNotificationSettings.class.getName())
diff --git a/src/com/android/settings/network/ApnEditor.java b/src/com/android/settings/network/ApnEditor.java
index 542a869..1451a40 100644
--- a/src/com/android/settings/network/ApnEditor.java
+++ b/src/com/android/settings/network/ApnEditor.java
@@ -135,7 +135,10 @@
     private int mBearerInitialVal = 0;
     private String mMvnoTypeStr;
     private String mMvnoMatchDataStr;
-    private String[] mReadOnlyApnTypes;
+    @VisibleForTesting
+    String[] mReadOnlyApnTypes;
+    @VisibleForTesting
+    String[] mDefaultApnTypes;
     private String[] mReadOnlyApnFields;
     private boolean mReadOnlyApn;
     private Uri mCarrierUri;
@@ -189,7 +192,8 @@
     private static final int MMSPROXY_INDEX = 12;
     private static final int MMSPORT_INDEX = 13;
     private static final int AUTH_TYPE_INDEX = 14;
-    private static final int TYPE_INDEX = 15;
+    @VisibleForTesting
+    static final int TYPE_INDEX = 15;
     private static final int PROTOCOL_INDEX = 16;
     @VisibleForTesting
     static final int CARRIER_ENABLED_INDEX = 17;
@@ -250,12 +254,17 @@
                 mReadOnlyApnTypes = b.getStringArray(
                         CarrierConfigManager.KEY_READ_ONLY_APN_TYPES_STRING_ARRAY);
                 if (!ArrayUtils.isEmpty(mReadOnlyApnTypes)) {
-                    for (String apnType : mReadOnlyApnTypes) {
-                        Log.d(TAG, "onCreate: read only APN type: " + apnType);
-                    }
+                    Log.d(TAG,
+                            "onCreate: read only APN type: " + Arrays.toString(mReadOnlyApnTypes));
                 }
                 mReadOnlyApnFields = b.getStringArray(
                         CarrierConfigManager.KEY_READ_ONLY_APN_FIELDS_STRING_ARRAY);
+
+                mDefaultApnTypes = b.getStringArray(
+                        CarrierConfigManager.KEY_APN_SETTINGS_DEFAULT_APN_TYPES_STRING_ARRAY);
+                if (!ArrayUtils.isEmpty(mDefaultApnTypes)) {
+                    Log.d(TAG, "onCreate: default apn types: " + Arrays.toString(mDefaultApnTypes));
+                }
             }
         }
 
@@ -1150,17 +1159,24 @@
         return sNotSet.equals(value) ? null : value;
     }
 
-    private String getUserEnteredApnType() {
+    @VisibleForTesting
+    String getUserEnteredApnType() {
         // if user has not specified a type, map it to "ALL APN TYPES THAT ARE NOT READ-ONLY"
+        // but if user enter empty type, map it just for default
         String userEnteredApnType = mApnType.getText();
         if (userEnteredApnType != null) userEnteredApnType = userEnteredApnType.trim();
         if ((TextUtils.isEmpty(userEnteredApnType)
                 || PhoneConstants.APN_TYPE_ALL.equals(userEnteredApnType))
                 && !ArrayUtils.isEmpty(mReadOnlyApnTypes)) {
+            String[] apnTypeList = PhoneConstants.APN_TYPES;
+            if (TextUtils.isEmpty(userEnteredApnType) && !ArrayUtils.isEmpty(mDefaultApnTypes)) {
+                apnTypeList = mDefaultApnTypes;
+            }
+
             StringBuilder editableApnTypes = new StringBuilder();
             List<String> readOnlyApnTypes = Arrays.asList(mReadOnlyApnTypes);
             boolean first = true;
-            for (String apnType : PhoneConstants.APN_TYPES) {
+            for (String apnType : apnTypeList) {
                 // add APN type if it is not read-only and is not wild-cardable
                 if (!readOnlyApnTypes.contains(apnType)
                         && !apnType.equals(PhoneConstants.APN_TYPE_IA)
diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java
index 531d8fa..dc06f47 100644
--- a/src/com/android/settings/notification/AppNotificationSettings.java
+++ b/src/com/android/settings/notification/AppNotificationSettings.java
@@ -16,46 +16,34 @@
 
 package com.android.settings.notification;
 
-import android.app.NotificationChannel;
-import android.app.NotificationChannelGroup;
 import android.app.settings.SettingsEnums;
 import android.content.Context;
-import android.os.AsyncTask;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.util.Log;
 
-import androidx.preference.Preference;
-import androidx.preference.PreferenceCategory;
-import androidx.preference.PreferenceGroup;
-import androidx.preference.PreferenceScreen;
-import androidx.preference.SwitchPreference;
-
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.R;
-import com.android.settings.widget.MasterSwitchPreference;
-import com.android.settingslib.RestrictedSwitchPreference;
 import com.android.settingslib.core.AbstractPreferenceController;
 
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import androidx.preference.Preference;
+import androidx.preference.PreferenceGroup;
+import androidx.preference.PreferenceScreen;
+
 /** These settings are per app, so should not be returned in global search results. */
 public class AppNotificationSettings extends NotificationSettingsBase {
     private static final String TAG = "AppNotificationSettings";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
 
-    private static String KEY_GENERAL_CATEGORY = "categories";
     private static String KEY_ADVANCED_CATEGORY = "app_advanced";
     private static String KEY_BADGE = "badge";
     private static String KEY_APP_LINK = "app_link";
     private static String KEY_BUBBLE = "bubble_link_pref";
     private static String[] LEGACY_NON_ADVANCED_KEYS = {KEY_BADGE, KEY_APP_LINK, KEY_BUBBLE};
 
-    private List<NotificationChannelGroup> mChannelGroupList;
-
     @Override
     public int getMetricsCategory() {
         return SettingsEnums.NOTIFICATION_APP_NOTIFICATION;
@@ -91,26 +79,6 @@
             return;
         }
 
-        if (!mShowLegacyChannelConfig) {
-            // Load channel settings
-            new AsyncTask<Void, Void, Void>() {
-                @Override
-                protected Void doInBackground(Void... unused) {
-                    mChannelGroupList = mBackend.getGroups(mPkg, mUid).getList();
-                    Collections.sort(mChannelGroupList, mChannelGroupComparator);
-                    return null;
-                }
-
-                @Override
-                protected void onPostExecute(Void unused) {
-                    if (getHost() == null) {
-                        return;
-                    }
-                    populateList();
-                }
-            }.execute();
-        }
-
         for (NotificationPreferenceController controller : mControllers) {
             controller.onResume(mAppRow, mChannel, mChannelGroup, mSuspendedAppsAdmin);
             controller.displayPreference(getPreferenceScreen());
@@ -154,125 +122,7 @@
         mControllers.add(new NotificationsOffPreferenceController(context));
         mControllers.add(new DeletedChannelsPreferenceController(context, mBackend));
         mControllers.add(new BubbleSummaryPreferenceController(context, mBackend));
+        mControllers.add(new ChannelListPreferenceController(context, mBackend));
         return new ArrayList<>(mControllers);
     }
-
-    private void populateList() {
-        if (!mDynamicPreferences.isEmpty()) {
-            for (Preference p : mDynamicPreferences) {
-                getPreferenceScreen().removePreference(p);
-            }
-            mDynamicPreferences.clear();
-        }
-        if (mChannelGroupList.isEmpty()) {
-            PreferenceCategory groupCategory = new PreferenceCategory(getPrefContext());
-            groupCategory.setTitle(R.string.notification_channels);
-            groupCategory.setKey(KEY_GENERAL_CATEGORY);
-            getPreferenceScreen().addPreference(groupCategory);
-            mDynamicPreferences.add(groupCategory);
-
-            Preference empty = new Preference(getPrefContext());
-            empty.setTitle(R.string.no_channels);
-            empty.setEnabled(false);
-            groupCategory.addPreference(empty);
-        } else {
-            populateGroupList();
-            mImportanceListener.onImportanceChanged();
-        }
-    }
-
-    private void populateGroupList() {
-        for (NotificationChannelGroup group : mChannelGroupList) {
-            PreferenceCategory groupCategory = new PreferenceCategory(getPrefContext());
-            groupCategory.setOrderingAsAdded(true);
-            getPreferenceScreen().addPreference(groupCategory);
-            mDynamicPreferences.add(groupCategory);
-            if (group.getId() == null) {
-                if (mChannelGroupList.size() > 1) {
-                    groupCategory.setTitle(R.string.notification_channels_other);
-                }
-                groupCategory.setKey(KEY_GENERAL_CATEGORY);
-            } else {
-                groupCategory.setTitle(group.getName());
-                groupCategory.setKey(group.getId());
-                populateGroupToggle(groupCategory, group);
-            }
-            if (!group.isBlocked()) {
-                final List<NotificationChannel> channels = group.getChannels();
-                Collections.sort(channels, mChannelComparator);
-                int N = channels.size();
-                for (int i = 0; i < N; i++) {
-                    final NotificationChannel channel = channels.get(i);
-                    populateSingleChannelPrefs(groupCategory, channel, group.isBlocked());
-                }
-            }
-        }
-    }
-
-    protected void populateGroupToggle(final PreferenceGroup parent,
-            NotificationChannelGroup group) {
-        RestrictedSwitchPreference preference = new RestrictedSwitchPreference(getPrefContext());
-        preference.setTitle(R.string.notification_switch_label);
-        preference.setEnabled(mSuspendedAppsAdmin == null
-                && isChannelGroupBlockable(group));
-        preference.setChecked(!group.isBlocked());
-        preference.setOnPreferenceClickListener(preference1 -> {
-            final boolean allowGroup = ((SwitchPreference) preference1).isChecked();
-            group.setBlocked(!allowGroup);
-            mBackend.updateChannelGroup(mAppRow.pkg, mAppRow.uid, group);
-
-            onGroupBlockStateChanged(group);
-            return true;
-        });
-
-        parent.addPreference(preference);
-    }
-
-    private Comparator<NotificationChannelGroup> mChannelGroupComparator =
-            new Comparator<NotificationChannelGroup>() {
-
-                @Override
-                public int compare(NotificationChannelGroup left, NotificationChannelGroup right) {
-                    // Non-grouped channels (in placeholder group with a null id) come last
-                    if (left.getId() == null && right.getId() != null) {
-                        return 1;
-                    } else if (right.getId() == null && left.getId() != null) {
-                        return -1;
-                    }
-                    return left.getId().compareTo(right.getId());
-                }
-            };
-
-    protected void onGroupBlockStateChanged(NotificationChannelGroup group) {
-        if (group == null) {
-            return;
-        }
-        PreferenceGroup groupGroup = (
-                PreferenceGroup) getPreferenceScreen().findPreference(group.getId());
-
-        if (groupGroup != null) {
-            if (group.isBlocked()) {
-                List<Preference> toRemove = new ArrayList<>();
-                int childCount = groupGroup.getPreferenceCount();
-                for (int i = 0; i < childCount; i++) {
-                    Preference pref = groupGroup.getPreference(i);
-                    if (pref instanceof MasterSwitchPreference) {
-                        toRemove.add(pref);
-                    }
-                }
-                for (Preference pref : toRemove) {
-                    groupGroup.removePreference(pref);
-                }
-            } else {
-                final List<NotificationChannel> channels = group.getChannels();
-                Collections.sort(channels, mChannelComparator);
-                int N = channels.size();
-                for (int i = 0; i < N; i++) {
-                    final NotificationChannel channel = channels.get(i);
-                    populateSingleChannelPrefs(groupGroup, channel, group.isBlocked());
-                }
-            }
-        }
-    }
-
 }
diff --git a/src/com/android/settings/notification/ChannelGroupNotificationSettings.java b/src/com/android/settings/notification/ChannelGroupNotificationSettings.java
deleted file mode 100644
index 1f8b1c3..0000000
--- a/src/com/android/settings/notification/ChannelGroupNotificationSettings.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.notification;
-
-import android.app.NotificationChannel;
-import android.app.settings.SettingsEnums;
-import android.content.Context;
-import android.util.Log;
-
-import androidx.preference.Preference;
-
-import com.android.settings.R;
-import com.android.settingslib.core.AbstractPreferenceController;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-public class ChannelGroupNotificationSettings extends NotificationSettingsBase {
-    private static final String TAG = "ChannelGroupSettings";
-
-    @Override
-    public int getMetricsCategory() {
-        return SettingsEnums.NOTIFICATION_CHANNEL_GROUP;
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (mAppRow == null || mChannelGroup == null) {
-            Log.w(TAG, "Missing package or uid or packageinfo or group");
-            finish();
-            return;
-        }
-
-        populateChannelList();
-        for (NotificationPreferenceController controller : mControllers) {
-            controller.onResume(mAppRow, mChannel, mChannelGroup, mSuspendedAppsAdmin);
-            controller.displayPreference(getPreferenceScreen());
-        }
-        updatePreferenceStates();
-    }
-
-    @Override
-    protected String getLogTag() {
-        return TAG;
-    }
-
-    @Override
-    protected int getPreferenceScreenResId() {
-        return R.xml.notification_group_settings;
-    }
-
-    @Override
-    protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
-        mControllers = new ArrayList<>();
-        mControllers.add(new HeaderPreferenceController(context, this));
-        mControllers.add(new BlockPreferenceController(context, mImportanceListener, mBackend));
-        mControllers.add(new AppLinkPreferenceController(context));
-        mControllers.add(new NotificationsOffPreferenceController(context));
-        mControllers.add(new DescriptionPreferenceController(context));
-        return new ArrayList<>(mControllers);
-    }
-
-    private void populateChannelList() {
-        if (!mDynamicPreferences.isEmpty()) {
-            // If there's anything in mDynamicPreferences, we've called populateChannelList twice.
-            // Clear out existing channels and log.
-            Log.w(TAG, "Notification channel group posted twice to settings - old size " +
-                    mDynamicPreferences.size() + ", new size " + mDynamicPreferences.size());
-            for (Preference p : mDynamicPreferences) {
-                getPreferenceScreen().removePreference(p);
-            }
-        }
-        if (mChannelGroup.getChannels().isEmpty()) {
-            Preference empty = new Preference(getPrefContext());
-            empty.setTitle(R.string.no_channels);
-            empty.setEnabled(false);
-            getPreferenceScreen().addPreference(empty);
-            mDynamicPreferences.add(empty);
-
-        } else {
-            final List<NotificationChannel> channels = mChannelGroup.getChannels();
-            Collections.sort(channels, mChannelComparator);
-            for (NotificationChannel channel : channels) {
-                mDynamicPreferences.add(populateSingleChannelPrefs(
-                        getPreferenceScreen(), channel, mChannelGroup.isBlocked()));
-            }
-
-        }
-    }
-}
diff --git a/src/com/android/settings/notification/ChannelListPreferenceController.java b/src/com/android/settings/notification/ChannelListPreferenceController.java
new file mode 100644
index 0000000..7ff407c
--- /dev/null
+++ b/src/com/android/settings/notification/ChannelListPreferenceController.java
@@ -0,0 +1,311 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.notification;
+
+import static android.app.NotificationManager.IMPORTANCE_LOW;
+import static android.app.NotificationManager.IMPORTANCE_NONE;
+
+import android.app.NotificationChannel;
+import android.app.NotificationChannelGroup;
+import android.app.settings.SettingsEnums;
+import android.content.Context;
+import android.graphics.BlendMode;
+import android.graphics.BlendModeColorFilter;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.LayerDrawable;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.provider.Settings;
+
+import com.android.settings.R;
+import com.android.settings.Utils;
+import com.android.settings.applications.AppInfoBase;
+import com.android.settings.core.SubSettingLauncher;
+import com.android.settings.widget.MasterSwitchPreference;
+import com.android.settingslib.RestrictedSwitchPreference;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceGroup;
+import androidx.preference.SwitchPreference;
+
+public class ChannelListPreferenceController extends NotificationPreferenceController {
+
+    private static final String KEY = "channels";
+    private static String KEY_GENERAL_CATEGORY = "categories";
+    public static final String ARG_FROM_SETTINGS = "fromSettings";
+
+    private List<NotificationChannelGroup> mChannelGroupList;
+    private PreferenceCategory mPreference;
+
+    public ChannelListPreferenceController(Context context, NotificationBackend backend) {
+        super(context, backend);
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY;
+    }
+
+    @Override
+    public boolean isAvailable() {
+        if (mAppRow == null) {
+            return false;
+        }
+        if (mAppRow.banned) {
+            return false;
+        }
+        if (mChannel != null) {
+            if (mBackend.onlyHasDefaultChannel(mAppRow.pkg, mAppRow.uid)
+                    || NotificationChannel.DEFAULT_CHANNEL_ID.equals(mChannel.getId())) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        mPreference = (PreferenceCategory) preference;
+        // Load channel settings
+        new AsyncTask<Void, Void, Void>() {
+            @Override
+            protected Void doInBackground(Void... unused) {
+                mChannelGroupList = mBackend.getGroups(mAppRow.pkg, mAppRow.uid).getList();
+                Collections.sort(mChannelGroupList, mChannelGroupComparator);
+                return null;
+            }
+
+            @Override
+            protected void onPostExecute(Void unused) {
+                if (mContext == null) {
+                    return;
+                }
+                populateList();
+            }
+        }.execute();
+    }
+
+    private void populateList() {
+        // TODO: if preference has children, compare with newly loaded list
+        mPreference.removeAll();
+
+        if (mChannelGroupList.isEmpty()) {
+            PreferenceCategory groupCategory = new PreferenceCategory(mContext);
+            groupCategory.setTitle(R.string.notification_channels);
+            groupCategory.setKey(KEY_GENERAL_CATEGORY);
+            mPreference.addPreference(groupCategory);
+
+            Preference empty = new Preference(mContext);
+            empty.setTitle(R.string.no_channels);
+            empty.setEnabled(false);
+            groupCategory.addPreference(empty);
+        } else {
+            populateGroupList();
+        }
+    }
+
+    private void populateGroupList() {
+        for (NotificationChannelGroup group : mChannelGroupList) {
+            PreferenceCategory groupCategory = new PreferenceCategory(mContext);
+            groupCategory.setOrderingAsAdded(true);
+            mPreference.addPreference(groupCategory);
+            if (group.getId() == null) {
+                if (mChannelGroupList.size() > 1) {
+                    groupCategory.setTitle(R.string.notification_channels_other);
+                }
+                groupCategory.setKey(KEY_GENERAL_CATEGORY);
+            } else {
+                groupCategory.setTitle(group.getName());
+                groupCategory.setKey(group.getId());
+                populateGroupToggle(groupCategory, group);
+            }
+            if (!group.isBlocked()) {
+                final List<NotificationChannel> channels = group.getChannels();
+                Collections.sort(channels, mChannelComparator);
+                int N = channels.size();
+                for (int i = 0; i < N; i++) {
+                    final NotificationChannel channel = channels.get(i);
+                    populateSingleChannelPrefs(groupCategory, channel, group.isBlocked());
+                }
+            }
+        }
+    }
+
+    protected void populateGroupToggle(final PreferenceGroup parent,
+            NotificationChannelGroup group) {
+        RestrictedSwitchPreference preference =
+                new RestrictedSwitchPreference(mContext);
+        preference.setTitle(R.string.notification_switch_label);
+        preference.setEnabled(mAdmin == null
+                && isChannelGroupBlockable(group));
+        preference.setChecked(!group.isBlocked());
+        preference.setOnPreferenceClickListener(preference1 -> {
+            final boolean allowGroup = ((SwitchPreference) preference1).isChecked();
+            group.setBlocked(!allowGroup);
+            mBackend.updateChannelGroup(mAppRow.pkg, mAppRow.uid, group);
+
+            onGroupBlockStateChanged(group);
+            return true;
+        });
+
+        parent.addPreference(preference);
+    }
+
+    protected Preference populateSingleChannelPrefs(PreferenceGroup parent,
+            final NotificationChannel channel, final boolean groupBlocked) {
+        MasterSwitchPreference channelPref = new MasterSwitchPreference(mContext);
+        channelPref.setSwitchEnabled(mAdmin == null
+                && isChannelBlockable(channel)
+                && isChannelConfigurable(channel)
+                && !groupBlocked);
+        channelPref.setIcon(null);
+        if (channel.getImportance() > IMPORTANCE_LOW) {
+            channelPref.setIcon(getAlertingIcon());
+        }
+        channelPref.setIconSize(MasterSwitchPreference.ICON_SIZE_SMALL);
+        channelPref.setKey(channel.getId());
+        channelPref.setTitle(channel.getName());
+        channelPref.setSummary(NotificationBackend.getSentSummary(
+                mContext, mAppRow.sentByChannel.get(channel.getId()), false));
+        channelPref.setChecked(channel.getImportance() != IMPORTANCE_NONE);
+        Bundle channelArgs = new Bundle();
+        channelArgs.putInt(AppInfoBase.ARG_PACKAGE_UID, mAppRow.uid);
+        channelArgs.putString(AppInfoBase.ARG_PACKAGE_NAME, mAppRow.pkg);
+        channelArgs.putString(Settings.EXTRA_CHANNEL_ID, channel.getId());
+        channelArgs.putBoolean(ARG_FROM_SETTINGS, true);
+        channelPref.setIntent(new SubSettingLauncher(mContext)
+                .setDestination(ChannelNotificationSettings.class.getName())
+                .setArguments(channelArgs)
+                .setTitleRes(R.string.notification_channel_title)
+                .setSourceMetricsCategory(SettingsEnums.NOTIFICATION_APP_NOTIFICATION)
+                .toIntent());
+
+        channelPref.setOnPreferenceChangeListener(
+                (preference, o) -> {
+                    boolean value = (Boolean) o;
+                    int importance = value ? IMPORTANCE_LOW : IMPORTANCE_NONE;
+                    channel.setImportance(importance);
+                    channel.lockFields(
+                            NotificationChannel.USER_LOCKED_IMPORTANCE);
+                    MasterSwitchPreference channelPref1 = (MasterSwitchPreference) preference;
+                    channelPref1.setIcon(null);
+                    if (channel.getImportance() > IMPORTANCE_LOW) {
+                        channelPref1.setIcon(getAlertingIcon());
+                    }
+                    toggleBehaviorIconState(channelPref1.getIcon(),
+                            importance != IMPORTANCE_NONE);
+                    mBackend.updateChannel(mAppRow.pkg, mAppRow.uid, channel);
+
+                    return true;
+                });
+        if (parent.findPreference(channelPref.getKey()) == null) {
+            parent.addPreference(channelPref);
+        }
+        return channelPref;
+    }
+
+    private Drawable getAlertingIcon() {
+        Drawable icon = mContext.getDrawable(R.drawable.ic_notifications_alert);
+        icon.setTintList(Utils.getColorAccent(mContext));
+        return icon;
+    }
+
+    private void toggleBehaviorIconState(Drawable icon, boolean enabled) {
+        if (icon == null) return;
+
+        LayerDrawable layerDrawable = (LayerDrawable) icon;
+        GradientDrawable background =
+                (GradientDrawable) layerDrawable.findDrawableByLayerId(R.id.back);
+
+        if (background == null) return;
+
+        if (enabled) {
+            background.clearColorFilter();
+        } else {
+            background.setColorFilter(new BlendModeColorFilter(
+                    mContext.getColor(R.color.material_grey_300),
+                    BlendMode.SRC_IN));
+        }
+    }
+
+    protected void onGroupBlockStateChanged(NotificationChannelGroup group) {
+        if (group == null) {
+            return;
+        }
+        PreferenceGroup groupGroup = mPreference.findPreference(group.getId());
+
+        if (groupGroup != null) {
+            if (group.isBlocked()) {
+                List<Preference> toRemove = new ArrayList<>();
+                int childCount = groupGroup.getPreferenceCount();
+                for (int i = 0; i < childCount; i++) {
+                    Preference pref = groupGroup.getPreference(i);
+                    if (pref instanceof MasterSwitchPreference) {
+                        toRemove.add(pref);
+                    }
+                }
+                for (Preference pref : toRemove) {
+                    groupGroup.removePreference(pref);
+                }
+            } else {
+                final List<NotificationChannel> channels = group.getChannels();
+                Collections.sort(channels, mChannelComparator);
+                int N = channels.size();
+                for (int i = 0; i < N; i++) {
+                    final NotificationChannel channel = channels.get(i);
+                    populateSingleChannelPrefs(groupGroup, channel, group.isBlocked());
+                }
+            }
+        }
+    }
+
+    private Comparator<NotificationChannelGroup> mChannelGroupComparator =
+            new Comparator<NotificationChannelGroup>() {
+
+                @Override
+                public int compare(NotificationChannelGroup left, NotificationChannelGroup right) {
+                    // Non-grouped channels (in placeholder group with a null id) come last
+                    if (left.getId() == null && right.getId() != null) {
+                        return 1;
+                    } else if (right.getId() == null && left.getId() != null) {
+                        return -1;
+                    }
+                    return left.getId().compareTo(right.getId());
+                }
+            };
+
+    protected Comparator<NotificationChannel> mChannelComparator =
+            (left, right) -> {
+                if (left.isDeleted() != right.isDeleted()) {
+                    return Boolean.compare(left.isDeleted(), right.isDeleted());
+                } else if (left.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
+                    // Uncategorized/miscellaneous legacy channel goes last
+                    return 1;
+                } else if (right.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
+                    return -1;
+                }
+
+                return left.getId().compareTo(right.getId());
+            };
+}
diff --git a/src/com/android/settings/notification/ChannelNotificationSettings.java b/src/com/android/settings/notification/ChannelNotificationSettings.java
index 8399a49..09bf0e2 100644
--- a/src/com/android/settings/notification/ChannelNotificationSettings.java
+++ b/src/com/android/settings/notification/ChannelNotificationSettings.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.notification;
 
+import static com.android.settings.notification.ChannelListPreferenceController.ARG_FROM_SETTINGS;
+
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.Intent;
diff --git a/src/com/android/settings/notification/NotificationPreferenceController.java b/src/com/android/settings/notification/NotificationPreferenceController.java
index 2ae7019..b5acd2d 100644
--- a/src/com/android/settings/notification/NotificationPreferenceController.java
+++ b/src/com/android/settings/notification/NotificationPreferenceController.java
@@ -113,25 +113,40 @@
     }
 
     protected boolean isChannelBlockable() {
-        if (mChannel != null && mAppRow != null) {
-            if (mChannel.isImportanceLockedByCriticalDeviceFunction()
-                    || mChannel.isImportanceLockedByOEM()) {
-                return mChannel.getImportance() == IMPORTANCE_NONE;
+        return isChannelBlockable(mChannel);
+    }
+
+    protected boolean isChannelBlockable(NotificationChannel channel) {
+        if (channel != null && mAppRow != null) {
+            if (channel.isImportanceLockedByCriticalDeviceFunction()
+                    || channel.isImportanceLockedByOEM()) {
+                return channel.getImportance() == IMPORTANCE_NONE;
             }
 
-            return mChannel.isBlockableSystem() || !mAppRow.systemApp
-                    || mChannel.getImportance() == IMPORTANCE_NONE;
+            return channel.isBlockableSystem() || !mAppRow.systemApp
+                    || channel.getImportance() == IMPORTANCE_NONE;
+        }
+        return false;
+    }
+
+    protected boolean isChannelConfigurable(NotificationChannel channel) {
+        if (channel != null && mAppRow != null) {
+            return !channel.isImportanceLockedByOEM();
         }
         return false;
     }
 
     protected boolean isChannelGroupBlockable() {
-        if (mChannelGroup != null && mAppRow != null) {
+        return isChannelGroupBlockable(mChannelGroup);
+    }
+
+    protected boolean isChannelGroupBlockable(NotificationChannelGroup group) {
+        if (group != null && mAppRow != null) {
             if (!mAppRow.systemApp) {
                 return true;
             }
 
-            return mChannelGroup.isBlocked();
+            return group.isBlocked();
         }
         return false;
     }
diff --git a/src/com/android/settings/notification/NotificationSettingsBase.java b/src/com/android/settings/notification/NotificationSettingsBase.java
index 2a728c5..27a2de0 100644
--- a/src/com/android/settings/notification/NotificationSettingsBase.java
+++ b/src/com/android/settings/notification/NotificationSettingsBase.java
@@ -67,7 +67,6 @@
 abstract public class NotificationSettingsBase extends DashboardFragment {
     private static final String TAG = "NotifiSettingsBase";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
-    public static final String ARG_FROM_SETTINGS = "fromSettings";
 
     protected PackageManager mPm;
     protected NotificationBackend mBackend = new NotificationBackend();
@@ -88,7 +87,6 @@
     protected boolean mListeningToPackageRemove;
 
     protected List<NotificationPreferenceController> mControllers = new ArrayList<>();
-    protected List<Preference> mDynamicPreferences = new ArrayList<>();
     protected ImportanceListener mImportanceListener = new ImportanceListener();
 
     protected Intent mIntent;
@@ -126,7 +124,6 @@
             mSuspendedAppsAdmin = RestrictedLockUtilsInternal.checkIfApplicationIsSuspended(
                     mContext, mPkg, mUserId);
 
-
             loadChannel();
             loadAppRow();
             loadChannelGroup();
@@ -280,135 +277,6 @@
         return null;
     }
 
-    private Drawable getAlertingIcon() {
-        Drawable icon = getContext().getDrawable(R.drawable.ic_notifications_alert);
-        icon.setTintList(Utils.getColorAccent(getContext()));
-        return icon;
-    }
-
-    protected Preference populateSingleChannelPrefs(PreferenceGroup parent,
-            final NotificationChannel channel, final boolean groupBlocked) {
-        MasterSwitchPreference channelPref = new MasterSwitchPreference(getPrefContext());
-        channelPref.setSwitchEnabled(mSuspendedAppsAdmin == null
-                && isChannelBlockable(channel)
-                && isChannelConfigurable(channel)
-                && !groupBlocked);
-        channelPref.setIcon(null);
-        if (channel.getImportance() > IMPORTANCE_LOW) {
-            channelPref.setIcon(getAlertingIcon());
-        }
-        channelPref.setIconSize(MasterSwitchPreference.ICON_SIZE_SMALL);
-        channelPref.setKey(channel.getId());
-        channelPref.setTitle(channel.getName());
-        channelPref.setSummary(NotificationBackend.getSentSummary(
-                mContext, mAppRow.sentByChannel.get(channel.getId()), false));
-        channelPref.setChecked(channel.getImportance() != IMPORTANCE_NONE);
-        Bundle channelArgs = new Bundle();
-        channelArgs.putInt(AppInfoBase.ARG_PACKAGE_UID, mUid);
-        channelArgs.putString(AppInfoBase.ARG_PACKAGE_NAME, mPkg);
-        channelArgs.putString(Settings.EXTRA_CHANNEL_ID, channel.getId());
-        channelArgs.putBoolean(ARG_FROM_SETTINGS, true);
-        channelPref.setIntent(new SubSettingLauncher(getActivity())
-                .setDestination(ChannelNotificationSettings.class.getName())
-                .setArguments(channelArgs)
-                .setTitleRes(R.string.notification_channel_title)
-                .setSourceMetricsCategory(getMetricsCategory())
-                .toIntent());
-
-        channelPref.setOnPreferenceChangeListener(
-                (preference, o) -> {
-                    boolean value = (Boolean) o;
-                    int importance = value ? IMPORTANCE_LOW : IMPORTANCE_NONE;
-                    channel.setImportance(importance);
-                    channel.lockFields(
-                            NotificationChannel.USER_LOCKED_IMPORTANCE);
-                    MasterSwitchPreference channelPref1 = (MasterSwitchPreference) preference;
-                    channelPref1.setIcon(null);
-                    if (channel.getImportance() > IMPORTANCE_LOW) {
-                        channelPref1.setIcon(getAlertingIcon());
-                    }
-                    toggleBehaviorIconState(channelPref1.getIcon(),
-                            importance != IMPORTANCE_NONE);
-                    mBackend.updateChannel(mPkg, mUid, channel);
-
-                    return true;
-                });
-        if (parent.findPreference(channelPref.getKey()) == null) {
-            parent.addPreference(channelPref);
-        }
-        return channelPref;
-    }
-
-    private void toggleBehaviorIconState(Drawable icon, boolean enabled) {
-        if (icon == null) return;
-
-        LayerDrawable layerDrawable = (LayerDrawable) icon;
-        GradientDrawable background =
-                (GradientDrawable) layerDrawable.findDrawableByLayerId(R.id.back);
-
-        if (background == null) return;
-
-        if (enabled) {
-            background.clearColorFilter();
-        } else {
-            background.setColorFilter(new BlendModeColorFilter(
-                    mContext.getColor(R.color.material_grey_300),
-                    BlendMode.SRC_IN));
-        }
-    }
-
-    protected boolean isChannelConfigurable(NotificationChannel channel) {
-        if (channel != null && mAppRow != null) {
-            return !channel.isImportanceLockedByOEM();
-        }
-        return false;
-    }
-
-    protected boolean isChannelBlockable(NotificationChannel channel) {
-        if (channel != null && mAppRow != null) {
-            if (!mAppRow.systemApp) {
-                return true;
-            }
-
-            if (channel.isImportanceLockedByCriticalDeviceFunction()) {
-                return false;
-            }
-
-            if (channel.isImportanceLockedByOEM()) {
-                return false;
-            }
-
-            return channel.isBlockableSystem()
-                    || channel.getImportance() == NotificationManager.IMPORTANCE_NONE;
-        }
-        return false;
-    }
-
-    protected boolean isChannelGroupBlockable(NotificationChannelGroup group) {
-        if (group != null && mAppRow != null) {
-            if (!mAppRow.systemApp) {
-                return true;
-            }
-
-            return group.isBlocked();
-        }
-        return false;
-    }
-
-    protected void setVisible(Preference p, boolean visible) {
-        setVisible(getPreferenceScreen(), p, visible);
-    }
-
-    protected void setVisible(PreferenceGroup parent, Preference p, boolean visible) {
-        final boolean isVisible = parent.findPreference(p.getKey()) != null;
-        if (isVisible == visible) return;
-        if (visible) {
-            parent.addPreference(p);
-        } else {
-            parent.removePreference(p);
-        }
-    }
-
     protected void startListeningToPackageRemove() {
         if (mListeningToPackageRemove) {
             return;
@@ -445,20 +313,6 @@
         }
     };
 
-    protected Comparator<NotificationChannel> mChannelComparator =
-            (left, right) -> {
-                if (left.isDeleted() != right.isDeleted()) {
-                    return Boolean.compare(left.isDeleted(), right.isDeleted());
-                } else if (left.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
-                    // Uncategorized/miscellaneous legacy channel goes last
-                    return 1;
-                } else if (right.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
-                    return -1;
-                }
-
-                return left.getId().compareTo(right.getId());
-            };
-
     protected class ImportanceListener {
         protected void onImportanceChanged() {
             final PreferenceScreen screen = getPreferenceScreen();
@@ -466,20 +320,6 @@
                 controller.displayPreference(screen);
             }
             updatePreferenceStates();
-
-            boolean hideDynamicFields = false;
-            if (mAppRow == null || mAppRow.banned) {
-                hideDynamicFields = true;
-            } else {
-                if (mChannel != null) {
-                    hideDynamicFields = mChannel.getImportance() == IMPORTANCE_NONE;
-                } else if (mChannelGroup != null) {
-                    hideDynamicFields = mChannelGroup.isBlocked();
-                }
-            }
-            for (Preference preference : mDynamicPreferences) {
-                setVisible(getPreferenceScreen(), preference, !hideDynamicFields);
-            }
         }
     }
 }
diff --git a/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java b/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java
index 8b5b761..9b20e7a 100644
--- a/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java
+++ b/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java
@@ -266,14 +266,17 @@
             Bundle args = new Bundle();
             args.putString(AppInfoBase.ARG_PACKAGE_NAME, pkgName);
             args.putInt(AppInfoBase.ARG_PACKAGE_UID, appEntry.info.uid);
-            pref.setIntent(new SubSettingLauncher(mHost.getActivity())
-                    .setDestination(AppNotificationSettings.class.getName())
-                    .setTitleRes(R.string.notifications_title)
-                    .setArguments(args)
-                    .setUserHandle(new UserHandle(UserHandle.getUserId(appEntry.info.uid)))
-                    .setSourceMetricsCategory(
-                            SettingsEnums.MANAGE_APPLICATIONS_NOTIFICATIONS)
-                    .toIntent());
+            pref.setOnPreferenceClickListener(preference -> {
+                new SubSettingLauncher(mHost.getActivity())
+                        .setDestination(AppNotificationSettings.class.getName())
+                        .setTitleRes(R.string.notifications_title)
+                        .setArguments(args)
+                        .setUserHandle(new UserHandle(UserHandle.getUserId(appEntry.info.uid)))
+                        .setSourceMetricsCategory(
+                                SettingsEnums.MANAGE_APPLICATIONS_NOTIFICATIONS)
+                        .launch();
+                return true;
+            });
             pref.setSwitchEnabled(mNotificationBackend.isBlockable(mContext, appEntry.info));
             pref.setOnPreferenceChangeListener((preference, newValue) -> {
                 boolean blocked = !(Boolean) newValue;
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java
index 0be7c2b..8e0da6b 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -179,7 +179,9 @@
     private TextView mSsidView;
 
     private Context mContext;
-    private Integer mSecurityInPosition[];
+
+    @VisibleForTesting
+    Integer mSecurityInPosition[];
 
     private final WifiManager mWifiManager;
 
@@ -325,7 +327,7 @@
             if ((!mAccessPoint.isSaved() && !mAccessPoint.isActive()
                     && !mAccessPoint.isPasspointConfig())
                     || mMode != WifiConfigUiBase.MODE_VIEW) {
-                showSecurityFields();
+                showSecurityFields(true /* refreshEapMethods */, true /* refreshCertificates */);
                 showIpConfigFields();
                 showProxyFields();
                 final CheckBox advancedTogglebox =
@@ -956,7 +958,7 @@
         return 0;
     }
 
-    private void showSecurityFields() {
+    private void showSecurityFields(boolean refreshEapMethods, boolean refreshCertificates) {
         if (mAccessPointSecurity == AccessPoint.SECURITY_NONE ||
                 mAccessPointSecurity == AccessPoint.SECURITY_OWE ||
                 mAccessPointSecurity == AccessPoint.SECURITY_OWE_TRANSITION) {
@@ -988,16 +990,6 @@
         if (mEapMethodSpinner == null) {
             mEapMethodSpinner = (Spinner) mView.findViewById(R.id.method);
             mEapMethodSpinner.setOnItemSelectedListener(this);
-            if (Utils.isWifiOnly(mContext) || !mContext.getResources().getBoolean(
-                    com.android.internal.R.bool.config_eap_sim_based_auth_supported)) {
-                String[] eapMethods = mContext.getResources().getStringArray(
-                        R.array.eap_method_without_sim_auth);
-                ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(mContext,
-                        android.R.layout.simple_spinner_item, eapMethods);
-                spinnerAdapter.setDropDownViewResource(
-                        android.R.layout.simple_spinner_dropdown_item);
-                mEapMethodSpinner.setAdapter(spinnerAdapter);
-            }
             mPhase2Spinner = (Spinner) mView.findViewById(R.id.phase2);
             mPhase2Spinner.setOnItemSelectedListener(this);
             mEapCaCertSpinner = (Spinner) mView.findViewById(R.id.ca_cert);
@@ -1008,11 +1000,36 @@
             mEapUserCertSpinner.setOnItemSelectedListener(this);
             mEapIdentityView = (TextView) mView.findViewById(R.id.identity);
             mEapAnonymousView = (TextView) mView.findViewById(R.id.anonymous);
+        }
 
-            if (mAccessPoint != null && mAccessPoint.isCarrierAp()) {
-                mEapMethodSpinner.setSelection(mAccessPoint.getCarrierApEapType());
+        if (refreshEapMethods) {
+            ArrayAdapter<CharSequence> eapMethodSpinnerAdapter;
+            if (mAccessPointSecurity == AccessPoint.SECURITY_EAP_SUITE_B) {
+                eapMethodSpinnerAdapter = getSpinnerAdapter(R.array.wifi_eap_method);
+                mEapMethodSpinner.setAdapter(eapMethodSpinnerAdapter);
+                // WAP3-Enterprise 192-bit only allows EAP method TLS
+                mEapMethodSpinner.setSelection(Eap.TLS);
+                mEapMethodSpinner.setEnabled(false);
+            } else if (Utils.isWifiOnly(mContext) || !mContext.getResources().getBoolean(
+                    com.android.internal.R.bool.config_eap_sim_based_auth_supported)) {
+                eapMethodSpinnerAdapter = getSpinnerAdapter(
+                        R.array.eap_method_without_sim_auth);
+                mEapMethodSpinner.setAdapter(eapMethodSpinnerAdapter);
+                mEapMethodSpinner.setEnabled(true);
+            } else {
+                eapMethodSpinnerAdapter = getSpinnerAdapter(R.array.wifi_eap_method);
+                mEapMethodSpinner.setAdapter(eapMethodSpinnerAdapter);
+                mEapMethodSpinner.setEnabled(true);
             }
+        }
 
+        if (mAccessPointSecurity != AccessPoint.SECURITY_EAP_SUITE_B
+                && mAccessPoint != null
+                && mAccessPoint.isCarrierAp()) {
+            mEapMethodSpinner.setSelection(mAccessPoint.getCarrierApEapType());
+        }
+
+        if (refreshCertificates) {
             loadCertificates(
                     mEapCaCertSpinner,
                     Credentials.CA_CERTIFICATE,
@@ -1025,76 +1042,73 @@
                     mDoNotProvideEapUserCertString,
                     false,
                     false);
+        }
 
-            // Modifying an existing network
-            if (mAccessPoint != null && mAccessPoint.isSaved()) {
-                WifiEnterpriseConfig enterpriseConfig = mAccessPoint.getConfig().enterpriseConfig;
-                int eapMethod = enterpriseConfig.getEapMethod();
-                int phase2Method = enterpriseConfig.getPhase2Method();
-                mEapMethodSpinner.setSelection(eapMethod);
-                showEapFieldsByMethod(eapMethod);
-                switch (eapMethod) {
-                    case Eap.PEAP:
-                        switch (phase2Method) {
-                            case Phase2.NONE:
-                                mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_NONE);
-                                break;
-                            case Phase2.MSCHAPV2:
-                                mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_MSCHAPV2);
-                                break;
-                            case Phase2.GTC:
-                                mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_GTC);
-                                break;
-                            case Phase2.SIM:
-                                mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_SIM);
-                                break;
-                            case Phase2.AKA:
-                                mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_AKA);
-                                break;
-                            case Phase2.AKA_PRIME:
-                                mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_AKA_PRIME);
-                                break;
-                            default:
-                                Log.e(TAG, "Invalid phase 2 method " + phase2Method);
-                                break;
-                        }
-                        break;
-                    default:
-                        mPhase2Spinner.setSelection(phase2Method);
-                        break;
-                }
-                if (!TextUtils.isEmpty(enterpriseConfig.getCaPath())) {
-                    setSelection(mEapCaCertSpinner, mUseSystemCertsString);
-                } else {
-                    String[] caCerts = enterpriseConfig.getCaCertificateAliases();
-                    if (caCerts == null) {
-                        setSelection(mEapCaCertSpinner, mDoNotValidateEapServerString);
-                    } else if (caCerts.length == 1) {
-                        setSelection(mEapCaCertSpinner, caCerts[0]);
-                    } else {
-                        // Reload the cert spinner with an extra "multiple certificates added" item.
-                        loadCertificates(
-                                mEapCaCertSpinner,
-                                Credentials.CA_CERTIFICATE,
-                                mDoNotValidateEapServerString,
-                                true,
-                                true);
-                        setSelection(mEapCaCertSpinner, mMultipleCertSetString);
+        // Modifying an existing network
+        if (mAccessPoint != null && mAccessPoint.isSaved()) {
+            final WifiEnterpriseConfig enterpriseConfig = mAccessPoint.getConfig().enterpriseConfig;
+            final int eapMethod = enterpriseConfig.getEapMethod();
+            final int phase2Method = enterpriseConfig.getPhase2Method();
+            mEapMethodSpinner.setSelection(eapMethod);
+            showEapFieldsByMethod(eapMethod);
+            switch (eapMethod) {
+                case Eap.PEAP:
+                    switch (phase2Method) {
+                        case Phase2.NONE:
+                            mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_NONE);
+                            break;
+                        case Phase2.MSCHAPV2:
+                            mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_MSCHAPV2);
+                            break;
+                        case Phase2.GTC:
+                            mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_GTC);
+                            break;
+                        case Phase2.SIM:
+                            mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_SIM);
+                            break;
+                        case Phase2.AKA:
+                            mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_AKA);
+                            break;
+                        case Phase2.AKA_PRIME:
+                            mPhase2Spinner.setSelection(WIFI_PEAP_PHASE2_AKA_PRIME);
+                            break;
+                        default:
+                            Log.e(TAG, "Invalid phase 2 method " + phase2Method);
+                            break;
                     }
-                }
-                mEapDomainView.setText(enterpriseConfig.getDomainSuffixMatch());
-                String userCert = enterpriseConfig.getClientCertificateAlias();
-                if (TextUtils.isEmpty(userCert)) {
-                    setSelection(mEapUserCertSpinner, mDoNotProvideEapUserCertString);
-                } else {
-                    setSelection(mEapUserCertSpinner, userCert);
-                }
-                mEapIdentityView.setText(enterpriseConfig.getIdentity());
-                mEapAnonymousView.setText(enterpriseConfig.getAnonymousIdentity());
-            } else {
-                mPhase2Spinner = (Spinner) mView.findViewById(R.id.phase2);
-                showEapFieldsByMethod(mEapMethodSpinner.getSelectedItemPosition());
+                    break;
+                default:
+                    mPhase2Spinner.setSelection(phase2Method);
+                    break;
             }
+            if (!TextUtils.isEmpty(enterpriseConfig.getCaPath())) {
+                setSelection(mEapCaCertSpinner, mUseSystemCertsString);
+            } else {
+                final String[] caCerts = enterpriseConfig.getCaCertificateAliases();
+                if (caCerts == null) {
+                    setSelection(mEapCaCertSpinner, mDoNotValidateEapServerString);
+                } else if (caCerts.length == 1) {
+                    setSelection(mEapCaCertSpinner, caCerts[0]);
+                } else {
+                    // Reload the cert spinner with an extra "multiple certificates added" item.
+                    loadCertificates(
+                            mEapCaCertSpinner,
+                            Credentials.CA_CERTIFICATE,
+                            mDoNotValidateEapServerString,
+                            true,
+                            true);
+                    setSelection(mEapCaCertSpinner, mMultipleCertSetString);
+                }
+            }
+            mEapDomainView.setText(enterpriseConfig.getDomainSuffixMatch());
+            final String userCert = enterpriseConfig.getClientCertificateAlias();
+            if (TextUtils.isEmpty(userCert)) {
+                setSelection(mEapUserCertSpinner, mDoNotProvideEapUserCertString);
+            } else {
+                setSelection(mEapUserCertSpinner, userCert);
+            }
+            mEapIdentityView.setText(enterpriseConfig.getIdentity());
+            mEapAnonymousView.setText(enterpriseConfig.getAnonymousIdentity());
         } else {
             showEapFieldsByMethod(mEapMethodSpinner.getSelectedItemPosition());
         }
@@ -1389,7 +1403,18 @@
         } catch (Exception e) {
             Log.e(TAG, "can't get the certificate list from KeyStore");
         }
-        certs.add(noCertificateString);
+
+        if (mAccessPointSecurity != AccessPoint.SECURITY_EAP_SUITE_B) {
+            certs.add(noCertificateString);
+        }
+
+        // If there are only mUnspecifiedCertString and one item to select, only shows the item
+        if (certs.size() == 2) {
+            certs.remove(mUnspecifiedCertString);
+            spinner.setEnabled(false);
+        } else {
+            spinner.setEnabled(true);
+        }
 
         final ArrayAdapter<String> adapter = new ArrayAdapter<String>(
                 context, android.R.layout.simple_spinner_item,
@@ -1486,15 +1511,17 @@
         if (parent == mSecuritySpinner) {
             // Convert menu position to actual Wi-Fi security type
             mAccessPointSecurity = mSecurityInPosition[position];
-            showSecurityFields();
+            showSecurityFields(true /* refreshEapMethods */, true /* refreshCertificates */);
 
             if (WifiDppUtils.isSupportEnrolleeQrCodeScanner(mContext, mAccessPointSecurity)) {
                 mSsidScanButton.setVisibility(View.VISIBLE);
             } else {
                 mSsidScanButton.setVisibility(View.GONE);
             }
-        } else if (parent == mEapMethodSpinner || parent == mEapCaCertSpinner) {
-            showSecurityFields();
+        } else if (parent == mEapMethodSpinner) {
+            showSecurityFields(false /* refreshEapMethods */, true /* refreshCertificates */);
+        } else if (parent == mEapCaCertSpinner) {
+            showSecurityFields(false /* refreshEapMethods */, false /* refreshCertificates */);
         } else if (parent == mPhase2Spinner
                 && mEapMethodSpinner.getSelectedItemPosition() == WIFI_EAP_METHOD_PEAP) {
             showPeapFields();
@@ -1585,4 +1612,15 @@
         ((CheckBox) mView.findViewById(R.id.wifi_advanced_togglebox))
                 .setOnCheckedChangeListener(this);
     }
+
+    private ArrayAdapter<CharSequence> getSpinnerAdapter(
+            int contentStringArrayResId) {
+        final String[] eapMethods = mContext.getResources().getStringArray(
+                contentStringArrayResId);
+        final ArrayAdapter<CharSequence> spinnerAdapter = new ArrayAdapter<>(mContext,
+                android.R.layout.simple_spinner_item, eapMethods);
+        spinnerAdapter.setDropDownViewResource(
+                android.R.layout.simple_spinner_dropdown_item);
+        return spinnerAdapter;
+    }
 }
diff --git a/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java b/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java
index 5dfcc25..cc80b0c 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java
@@ -390,7 +390,7 @@
                     WifiDppUtils.getSecurityString(wifiConfiguration),
                     wifiConfiguration.getPrintableSsid(),
                     wifiConfiguration.preSharedKey,
-                    /* hiddenSsid */ false,
+                    wifiConfiguration.hiddenSSID,
                     wifiConfiguration.networkId,
                     /* isHotspot */ false);
             }
diff --git a/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java b/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java
index d595f79..c37bdc0a 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java
@@ -172,22 +172,25 @@
 
                     // Adds all Wi-Fi networks in QR code to the set of configured networks and
                     // connects to it if it's reachable.
-                    boolean hasReachableWifiNetwork = false;
+                    boolean hasHiddenOrReachableWifiNetwork = false;
                     for (WifiConfiguration qrCodeWifiConfiguration : qrCodeWifiConfigurations) {
                         final int id = wifiManager.addNetwork(qrCodeWifiConfiguration);
                         if (id == -1) {
                             continue;
                         }
                         wifiManager.enableNetwork(id, /* attemptConnect */ false);
-                        if (isReachableWifiNetwork(qrCodeWifiConfiguration)) {
-                            hasReachableWifiNetwork = true;
+                        // WifiTracker only contains a hidden SSID Wi-Fi network if it's saved.
+                        // We can't check if a hidden SSID Wi-Fi network is reachable in advance.
+                        if (qrCodeWifiConfiguration.hiddenSSID ||
+                                isReachableWifiNetwork(qrCodeWifiConfiguration)) {
+                            hasHiddenOrReachableWifiNetwork = true;
                             mEnrolleeWifiConfiguration = qrCodeWifiConfiguration;
                             wifiManager.connect(id,
                                     /* listener */ WifiDppQrCodeScannerFragment.this);
                         }
                     }
 
-                    if (hasReachableWifiNetwork == false) {
+                    if (!hasHiddenOrReachableWifiNetwork) {
                         showErrorMessageAndRestartCamera(
                                 R.string.wifi_dpp_check_connection_try_again);
                         return;
diff --git a/src/com/android/settings/wifi/dpp/WifiDppUtils.java b/src/com/android/settings/wifi/dpp/WifiDppUtils.java
index 7e15064..2a958e8 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppUtils.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppUtils.java
@@ -296,6 +296,7 @@
         if (!TextUtils.isEmpty(preSharedKey)) {
             intent.putExtra(EXTRA_WIFI_PRE_SHARED_KEY, preSharedKey);
         }
+        intent.putExtra(EXTRA_WIFI_HIDDEN_SSID, wifiConfiguration.hiddenSSID);
     }
 
     /**
diff --git a/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java b/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java
index fa2dc99..372bc44 100644
--- a/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java
+++ b/src/com/android/settings/wifi/dpp/WifiNetworkListFragment.java
@@ -220,7 +220,7 @@
             }
             final WifiNetworkConfig networkConfig = WifiNetworkConfig.getValidConfigOrNull(
                     selectedAccessPoint.getSecurityString(/* concise */ true),
-                    wifiConfig.getPrintableSsid(), wifiConfig.preSharedKey, /* hiddenSsid */ false,
+                    wifiConfig.getPrintableSsid(), wifiConfig.preSharedKey, wifiConfig.hiddenSSID,
                     wifiConfig.networkId, /* isHotspot */ false);
             if (mOnChooseNetworkListener != null) {
                 mOnChooseNetworkListener.onChooseNetwork(networkConfig);
diff --git a/tests/robotests/assets/grandfather_not_implementing_index_provider b/tests/robotests/assets/grandfather_not_implementing_index_provider
index 061a81e..5d4abad 100644
--- a/tests/robotests/assets/grandfather_not_implementing_index_provider
+++ b/tests/robotests/assets/grandfather_not_implementing_index_provider
@@ -51,7 +51,6 @@
 com.android.settings.network.ApnSettings
 com.android.settings.network.telephony.NetworkSelectSettings
 com.android.settings.notification.AppNotificationSettings
-com.android.settings.notification.ChannelGroupNotificationSettings
 com.android.settings.notification.ChannelNotificationSettings
 com.android.settings.notification.NotificationStation
 com.android.settings.notification.RedactionInterstitial$RedactionInterstitialFragment
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java
index e42c3d2..637ffbc 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java
@@ -19,8 +19,8 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doAnswer;
@@ -39,8 +39,8 @@
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.Intent;
-import android.content.om.OverlayManager;
 import android.content.om.OverlayInfo;
+import android.content.om.OverlayManager;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -49,6 +49,8 @@
 import android.util.ArraySet;
 import android.view.View;
 
+import androidx.preference.PreferenceScreen;
+
 import com.android.settings.R;
 import com.android.settings.SettingsActivity;
 import com.android.settings.core.InstrumentedPreferenceFragment;
@@ -59,7 +61,6 @@
 import com.android.settingslib.core.lifecycle.Lifecycle;
 import com.android.settingslib.widget.ActionButtonsPreference;
 
-import java.util.Set;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -70,12 +71,15 @@
 import org.mockito.MockitoAnnotations;
 import org.mockito.stubbing.Answer;
 import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
 import org.robolectric.annotation.Resetter;
 import org.robolectric.util.ReflectionHelpers;
 
+import java.util.Set;
+
 @RunWith(RobolectricTestRunner.class)
 public class AppButtonsPreferenceControllerTest {
 
@@ -112,10 +116,9 @@
     @Mock
     private UserManager mUserManager;
     @Mock
-    private Application mApplication;
-    @Mock
     private PackageInfo mPackageInfo;
 
+    private Context mContext;
     private Intent mUninstallIntent;
     private ActionButtonsPreference mButtonPrefs;
     private AppButtonsPreferenceController mController;
@@ -125,14 +128,15 @@
         MockitoAnnotations.initMocks(this);
 
         FakeFeatureFactory.setupForTest();
+        mContext = RuntimeEnvironment.application;
         doReturn(mDpm).when(mSettingsActivity).getSystemService(Context.DEVICE_POLICY_SERVICE);
         doReturn(mUserManager).when(mSettingsActivity).getSystemService(Context.USER_SERVICE);
         doReturn(mPackageManger).when(mSettingsActivity).getPackageManager();
         doReturn(mAm).when(mSettingsActivity).getSystemService(Context.ACTIVITY_SERVICE);
         doReturn(mOverlayManager).when(mSettingsActivity).
-            getSystemService(OverlayManager.class);
+                getSystemService(OverlayManager.class);
         doReturn(mAppEntry).when(mState).getEntry(anyString(), anyInt());
-        when(mSettingsActivity.getApplication()).thenReturn(mApplication);
+        doReturn(mContext).when(mSettingsActivity).getApplicationContext();
         when(mSettingsActivity.getResources().getString(anyInt())).thenReturn(RESOURCE_STRING);
 
         mController = spy(new AppButtonsPreferenceController(mSettingsActivity, mFragment,
@@ -162,6 +166,21 @@
     }
 
     @Test
+    @Config(shadows = ShadowAppUtils.class)
+    public void isAvailable_validPackageName_isTrue() {
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    public void isAvailable_nullPackageName_isFalse() {
+        final AppButtonsPreferenceController controller = spy(
+                new AppButtonsPreferenceController(mSettingsActivity, mFragment,
+                        mLifecycle, null, mState, REQUEST_UNINSTALL, REQUEST_REMOVE_DEVICE_ADMIN));
+
+        assertThat(controller.isAvailable()).isFalse();
+    }
+
+    @Test
     public void retrieveAppEntry_hasAppEntry_notNull()
             throws PackageManager.NameNotFoundException {
         doReturn(mPackageInfo).when(mPackageManger).getPackageInfo(anyString(), anyInt());
@@ -306,10 +325,10 @@
 
     @Test
     public void updateUninstallButton_isNonSystemRro_setButtonDisable()
-                throws RemoteException {
+            throws RemoteException {
         when(mAppInfo.isResourceOverlay()).thenReturn(true);
         when(mOverlayManager.getOverlayInfo(anyString(), any()))
-            .thenReturn(OVERLAY_ENABLED);
+                .thenReturn(OVERLAY_ENABLED);
 
         mController.updateUninstallButton();
 
@@ -318,10 +337,10 @@
 
     @Test
     public void updateUninstallButton_isNonSystemRro_setButtonEnable()
-                throws RemoteException {
+            throws RemoteException {
         when(mAppInfo.isResourceOverlay()).thenReturn(true);
         when(mOverlayManager.getOverlayInfo(anyString(), any()))
-            .thenReturn(OVERLAY_DISABLED);
+                .thenReturn(OVERLAY_DISABLED);
 
         mController.updateUninstallButton();
 
@@ -423,7 +442,7 @@
     @Test
     public void onPackageListChanged_available_shouldRefreshUi() {
         doReturn(AppButtonsPreferenceController.AVAILABLE)
-            .when(mController).getAvailabilityStatus();
+                .when(mController).getAvailabilityStatus();
         doReturn(true).when(mController).refreshUi();
 
         mController.onPackageListChanged();
@@ -434,7 +453,7 @@
     @Test
     public void onPackageListChanged_notAvailable_shouldNotRefreshUiAndNoCrash() {
         doReturn(AppButtonsPreferenceController.DISABLED_FOR_USER)
-            .when(mController).getAvailabilityStatus();
+                .when(mController).getAvailabilityStatus();
 
         mController.onPackageListChanged();
 
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSliceTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSliceTest.java
index 54fb2c3..ff60aab 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSliceTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSliceTest.java
@@ -32,6 +32,7 @@
 import android.content.SharedPreferences;
 import android.content.pm.PackageManager;
 import android.net.Uri;
+import android.provider.Settings;
 
 import androidx.slice.Slice;
 import androidx.slice.SliceProvider;
@@ -65,6 +66,7 @@
         mContext = spy(RuntimeEnvironment.application);
         mContextualAdaptiveSleepSlice = spy(new ContextualAdaptiveSleepSlice(mContext));
 
+        Settings.System.putInt(mContext.getContentResolver(), Settings.System.ADAPTIVE_SLEEP, 0);
         doReturn(mPackageManager).when(mContext).getPackageManager();
         doReturn(mSharedPreferences).when(mContext).getSharedPreferences(eq(PREF), anyInt());
         doReturn(true).when(mContextualAdaptiveSleepSlice).isSettingsAvailable();
@@ -112,4 +114,20 @@
 
         assertThat(slice).isNull();
     }
+
+    @Test
+    public void getSlice_ShowIfNotTurnedOn() {
+        final Slice slice = mContextualAdaptiveSleepSlice.getSlice();
+
+        assertThat(slice).isNotNull();
+    }
+
+    @Test
+    public void getSlice_DoNotShowIfTurnedOn() {
+        Settings.System.putInt(mContext.getContentResolver(), Settings.System.ADAPTIVE_SLEEP, 1);
+
+        final Slice slice = mContextualAdaptiveSleepSlice.getSlice();
+
+        assertThat(slice).isNull();
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/network/ApnEditorTest.java b/tests/robotests/src/com/android/settings/network/ApnEditorTest.java
index 8624eb9..dc14418 100644
--- a/tests/robotests/src/com/android/settings/network/ApnEditorTest.java
+++ b/tests/robotests/src/com/android/settings/network/ApnEditorTest.java
@@ -463,6 +463,43 @@
         verify(mApnEditorUT).finish();
     }
 
+    @Test
+    public void getUserEnteredApnType_emptyApnType_shouldReturnDefault() {
+        // case 1
+        // GIVEN read only APN types with DUN
+        String[] readOnlyApnTypes = {"dun"};
+        mApnEditorUT.mReadOnlyApnTypes = readOnlyApnTypes;
+        // GIVEN read specificApnTypeForEmptyInput with DEFAULT,DUN
+        String[] defaultApnTypes = {"default", "dun"};
+        mApnEditorUT.mDefaultApnTypes = defaultApnTypes;
+
+        // Input empty in TYPE
+        final FakeApnData apnData = new FakeApnData(APN_DATA);
+        apnData.mData[ApnEditor.TYPE_INDEX] = "";
+        mApnEditorUT.mApnData = apnData;
+        mApnEditorUT.fillUI(true /* firstTime */);
+
+        // THEN APN type should be default
+        assertThat(mApnEditorUT.getUserEnteredApnType()).isEqualTo("default");
+
+        // case 2
+        // GIVEN read only APN types with DUN
+        String[] readOnlyApnTypesCase2 = {"dun"};
+        mApnEditorUT.mReadOnlyApnTypes = readOnlyApnTypesCase2;
+        // GIVEN read specificApnTypeForEmptyInput with DEFAULT
+        String[] defaultApnTypesCase2 = {"default"};
+        mApnEditorUT.mDefaultApnTypes = defaultApnTypesCase2;
+
+        // Input empty in TYPE
+        final FakeApnData apnDataCase2 = new FakeApnData(APN_DATA);
+        apnDataCase2.mData[ApnEditor.TYPE_INDEX] = "";
+        mApnEditorUT.mApnData = apnDataCase2;
+        mApnEditorUT.fillUI(true /* firstTime */);
+
+        // THEN APN type should be default
+        assertThat(mApnEditorUT.getUserEnteredApnType()).isEqualTo("default");
+    }
+
     private void initCursor() {
         doReturn(2).when(mCursor).getColumnCount();
         doReturn(2).when(mCursor).getInt(CURSOR_INTEGER_INDEX);
diff --git a/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java b/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java
index 107da79..4c7d02d 100644
--- a/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java
@@ -26,6 +26,7 @@
 import com.android.settingslib.wifi.WifiTracker;
 import com.android.settingslib.wifi.WifiTrackerFactory;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.robolectric.Robolectric;
@@ -36,15 +37,18 @@
 @Config(shadows = ShadowAlertDialogCompat.class)
 public class NetworkRequestDialogActivityTest {
 
-    @Test
-    public void LaunchActivity_shouldShowNetworkRequestDialog() {
+    @Before
+    public void setUp() {
         // Mocks fake WifiTracker, in case of exception in NetworkRequestDialogFragment.onResume().
         WifiTracker wifiTracker = mock(WifiTracker.class);
         WifiTrackerFactory.setTestingWifiTracker(wifiTracker);
+    }
 
+    @Test
+    public void launchActivity_shouldShowNetworkRequestDialog() {
         Robolectric.setupActivity(NetworkRequestDialogActivity.class);
 
-        AlertDialog alertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
+        final AlertDialog alertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
 
         assertThat(alertDialog.isShowing()).isTrue();
     }
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java b/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java
index b16d900..dd7ecde 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java
@@ -445,4 +445,28 @@
         WifiConfiguration config = mController.getConfig();
         assertThat(config.macRandomizationSetting).isEqualTo(WifiConfiguration.RANDOMIZATION_NONE);
     }
+
+    @Test
+    public void selectSecurity_wpa3Eap192bit_eapMethodTls() {
+        final WifiManager wifiManager = mock(WifiManager.class);
+        when(wifiManager.isWpa3SuiteBSupported()).thenReturn(true);
+        mController = new TestWifiConfigController(mConfigUiBase, mView, null /* accessPoint */,
+                WifiConfigUiBase.MODE_MODIFY, wifiManager);
+        final Spinner securitySpinner = mView.findViewById(R.id.security);
+        final Spinner eapMethodSpinner = mView.findViewById(R.id.method);
+        int wpa3Eap192bitPosition = -1;
+        final int securityCount = mController.mSecurityInPosition.length;
+        for (int i = 0; i < securityCount; i++) {
+            if (mController.mSecurityInPosition[i] != null &&
+                    mController.mSecurityInPosition[i] == AccessPoint.SECURITY_EAP_SUITE_B) {
+                wpa3Eap192bitPosition = i;
+            }
+        }
+
+        mController.onItemSelected(securitySpinner, null /* view */, wpa3Eap192bitPosition,
+                0 /* id */);
+
+        final int selectedItemPosition = eapMethodSpinner.getSelectedItemPosition();
+        assertThat(eapMethodSpinner.getSelectedItem().toString()).isEqualTo("TLS");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/wifi/dpp/WifiDppUtilsTest.java b/tests/robotests/src/com/android/settings/wifi/dpp/WifiDppUtilsTest.java
new file mode 100644
index 0000000..694088a
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/wifi/dpp/WifiDppUtilsTest.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.wifi.dpp;
+
+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 android.content.Intent;
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiConfiguration.KeyMgmt;
+import android.net.wifi.WifiManager;
+
+import com.android.settingslib.wifi.AccessPoint;
+
+import java.util.BitSet;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.shadows.ShadowApplication;
+
+@RunWith(RobolectricTestRunner.class)
+public class WifiDppUtilsTest {
+
+    @Mock
+    private WifiManager mWifiManager;
+
+    @Mock
+    private AccessPoint mAccessPoint;
+
+    @Mock
+    private WifiConfiguration mWifiConfiguration;
+
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+
+        mContext = spy(RuntimeEnvironment.application);
+        ShadowApplication shadowApplication = ShadowApplication.getInstance();
+        shadowApplication.setSystemService(Context.WIFI_SERVICE, mWifiManager);
+    }
+
+    @Test
+    public void getConfiguratorQrCodeScannerIntentOrNull_hiddenSsidNetwork_hasHiddenSsidExtra() {
+        when(mWifiManager.isEasyConnectSupported()).thenReturn(true);
+        when(mAccessPoint.isPasspoint()).thenReturn(false);
+        when(mAccessPoint.getSecurity()).thenReturn(AccessPoint.SECURITY_PSK);
+        when(mAccessPoint.getConfig()).thenReturn(mWifiConfiguration);
+        mWifiConfiguration.SSID = "GuestNetwork";
+        mWifiConfiguration.allowedKeyManagement = new BitSet();
+        mWifiConfiguration.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
+        mWifiConfiguration.hiddenSSID = true;
+
+        Intent intent = WifiDppUtils
+                .getConfiguratorQrCodeScannerIntentOrNull(mContext, mWifiManager, mAccessPoint);
+
+        assertThat(intent.getBooleanExtra(WifiDppUtils.EXTRA_WIFI_HIDDEN_SSID, false))
+                .isEqualTo(true);
+    }
+}