Merge "Add flag to allow NAS to peform ranking"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c8fc45d..6ee6a87 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1974,6 +1974,18 @@
         <activity android:name="Settings$WebViewAppPickerActivity"
                   android:label="@string/select_webview_provider_dialog_title" />
 
+        <activity android:name="Settings$BugReportHandlerPickerActivity"
+            android:label="@string/bug_report_handler_title"
+            android:exported="true"
+            android:excludeFromRecents="true">
+            <intent-filter>
+                <action android:name="android.settings.BUGREPORT_HANDLER_SETTINGS" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                android:value="com.android.settings.bugreporthandler.BugReportHandlerPicker" />
+        </activity>
+
         <activity android:name=".bluetooth.BluetoothPairingDialog"
                   android:excludeFromRecents="true"
                   android:windowSoftInputMode="stateVisible|adjustResize"
diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml
index f551e36..55ac6f9 100644
--- a/res/layout/face_enroll_introduction.xml
+++ b/res/layout/face_enroll_introduction.xml
@@ -124,9 +124,9 @@
                     android:layout_width="24dp"
                     android:layout_height="wrap_content"/>
                 <TextView
+                    android:id="@+id/face_enroll_introduction_footer_part_2"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:text="@string/security_settings_face_enroll_introduction_footer_part_2"/>
+                    android:layout_height="wrap_content"/>
 
             </LinearLayout>
 
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index eb2b869..6b7f842 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -102,9 +102,9 @@
 
     <!-- Dark theme scheduling preferences  [CHAR LIMIT=NONE] -->
     <string-array name="dark_ui_scheduler_preference_titles">
-        <!-- 1: None -->
+        <!-- 0: None -->
         <item>@string/dark_ui_auto_mode_never</item>
-        <!-- 2: Auto -->
+        <!-- 1: Auto -->
         <item>@string/dark_ui_auto_mode_auto</item>
     </string-array>
 
@@ -1014,6 +1014,13 @@
         <item>\?</item>
     </string-array>
 
+    <!-- Summary for color space adjustment modes for accessibility -->
+    <string-array name="daltonizer_mode_summary" translatable="false">
+        <item>@string/daltonizer_mode_deuteranomaly</item>
+        <item>@string/daltonizer_mode_protanomaly</item>
+        <item>@string/daltonizer_mode_tritanomaly</item>
+    </string-array>
+
     <!-- Keys for color space adjustment modes for accessibility -->
     <string-array name="daltonizer_mode_keys" translatable="false">
         <item>daltonizer_mode_deuteranomaly</item>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index daba0be..206c704 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -815,6 +815,8 @@
     <string name="security_settings_face_settings_enroll">Set up face unlock</string>
     <!-- Text shown in face settings explaining what your face can be used for. [CHAR LIMIT=NONE] -->
     <string name="security_settings_face_settings_footer">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\u2019t intend to.\n\nYour phone can be unlocked by someone else if it\u2019s held up to your face while your eyes are open.\n\nYour phone can be unlocked by someone who looks a lot like you, say, an identical sibling.</string>
+    <!-- Text shown in face settings explaining what your face can be used for. Used when attention checking is not supported. [CHAR LIMIT=NONE] -->
+    <string name="security_settings_face_settings_footer_attention_not_supported">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\u2019t intend to.\n\nYour phone can be unlocked by someone else if it\u2019s held up to your face, even if your eyes are closed.\n\nYour phone can be unlocked by someone who looks a lot like you, say, an identical sibling.</string>
     <!-- Dialog title shown when the user removes an enrollment [CHAR LIMIT=35] -->
     <string name="security_settings_face_settings_remove_dialog_title">Delete face data?</string>
     <!-- Dialog contents shown when the user removes an enrollment [CHAR LIMIT=NONE] -->
@@ -11378,4 +11380,22 @@
     <!-- DSU Loader Loading. Do not translate. -->
     <string name="dsu_loader_loading" translatable="false">Loading...</string>
 
+    <!-- Name of dev option called "Bug report handler" [CHAR LIMIT=NONE] -->
+    <string name="bug_report_handler_title">Bug report handler</string>
+
+    <!-- Developer Settings: Footer text for bug report handler picker [CHAR LIMIT=NONE] -->
+    <string name="bug_report_handler_picker_footer_text">Determines which app handles the Bug Report shortcut on your device.</string>
+
+    <!-- Label of personal profile app for current setting [CHAR LIMIT=NONE] -->
+    <string name="personal_profile_app">(Personal)</string>
+
+    <!-- Label of work profile app for current setting [CHAR LIMIT=NONE] -->
+    <string name="work_profile_app">(Work)</string>
+
+    <!-- Title of Shell app for current setting [CHAR LIMIT=NONE] -->
+    <string name="shell_app">Android System (Shell)</string>
+
+    <!-- Developer settings: text for the bug report handler selection toast shown if an invalid bug report handler was chosen. [CHAR LIMIT=NONE] -->
+    <string name="select_invalid_bug_report_handler_toast_text">This choice is no longer valid. Try again.</string>
+
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 4cbf2c3..4052813 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -572,7 +572,7 @@
         <item name="android:showDividers">middle</item>
     </style>
 
-    <style name="TextAppearance.Tab" parent="TextAppearance.Design.Tab">
+    <style name="TextAppearance.Tab" parent="@android:style/TextAppearance.DeviceDefault">
         <item name="android:textAllCaps">false</item>
     </style>
 
diff --git a/res/xml/bug_report_handler_settings.xml b/res/xml/bug_report_handler_settings.xml
new file mode 100644
index 0000000..41e8f08
--- /dev/null
+++ b/res/xml/bug_report_handler_settings.xml
@@ -0,0 +1,23 @@
+<?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.
+  -->
+
+<PreferenceScreen
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:settings="http://schemas.android.com/apk/res-auto"
+    android:title="@string/bug_report_handler_title"
+    settings:staticPreferenceLocation="append" >
+</PreferenceScreen>
\ No newline at end of file
diff --git a/res/xml/development_settings.xml b/res/xml/development_settings.xml
index 3ddf1db..42ce465 100644
--- a/res/xml/development_settings.xml
+++ b/res/xml/development_settings.xml
@@ -36,6 +36,11 @@
             android:dialogTitle="@*android:string/bugreport_title" />
 
         <Preference
+            android:key="bug_report_handler"
+            android:title="@string/bug_report_handler_title"
+            android:fragment="com.android.settings.bugreporthandler.BugReportHandlerPicker" />
+
+        <Preference
             android:key="system_server_heap_dump"
             android:title="@string/capture_system_heap_dump_title" />
 
@@ -278,6 +283,11 @@
             android:summary="@string/bluetooth_disable_absolute_volume_summary" />
 
         <SwitchPreference
+            android:key="bluetooth_gabeldorsche_enable"
+            android:title="@string/bluetooth_enable_gabeldorsche"
+            android:summary="@string/bluetooth_enable_gabeldorsche_summary" />
+
+        <SwitchPreference
             android:key="bluetooth_disable_a2dp_hw_offload"
             android:title="@string/bluetooth_disable_a2dp_hw_offload" />
 
diff --git a/res/xml/language_and_input.xml b/res/xml/language_and_input.xml
index 5880076..03c83d4 100644
--- a/res/xml/language_and_input.xml
+++ b/res/xml/language_and_input.xml
@@ -109,7 +109,7 @@
             android:title="@string/spellcheckers_settings_for_work_title"
             android:fragment="com.android.settings.inputmethod.SpellCheckersSettings"
             settings:forWork="true"
-            settings:controller="com.android.settings.language.UserDictionaryForWorkPreferenceController" />
+            settings:controller="com.android.settings.core.WorkPreferenceController" />
 
         <Preference
             android:key="user_dictionary_settings_for_work_pref"
diff --git a/res/xml/location_settings_workprofile.xml b/res/xml/location_settings_workprofile.xml
index 92af073..f15c8d8 100644
--- a/res/xml/location_settings_workprofile.xml
+++ b/res/xml/location_settings_workprofile.xml
@@ -32,6 +32,8 @@
         android:title="@string/location_recent_location_requests_see_all"
         android:icon="@drawable/ic_chevron_right_24dp"
         android:fragment="com.android.settings.location.RecentLocationRequestSeeAllFragment"
+        settings:controller="com.android.settings.core.WorkPreferenceController"
+        settings:forWork="true"
         settings:searchable="false"/>
 
     <com.android.settingslib.RestrictedSwitchPreference
diff --git a/res/xml/storage_summary_donut.xml b/res/xml/storage_summary_donut.xml
deleted file mode 100644
index be95cf8..0000000
--- a/res/xml/storage_summary_donut.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  ~ 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
-  -->
-
-<PreferenceScreen
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:settings="http://schemas.android.com/apk/res-auto"
-    android:key="storage_dashboard_screen"
-    android:title="@string/storage_settings"
-    android:orderingFromXml="false">
-    <com.android.settings.deviceinfo.storage.StorageSummaryDonutPreference
-        android:key="pref_summary"
-        android:order="0"
-        settings:searchable="false"
-        settings:controller="com.android.settings.deviceinfo.storage.StorageSummaryDonutPreferenceController"/>
-</PreferenceScreen>
\ No newline at end of file
diff --git a/src/com/android/settings/ResetNetworkConfirm.java b/src/com/android/settings/ResetNetworkConfirm.java
index beb0528..c50e200 100644
--- a/src/com/android/settings/ResetNetworkConfirm.java
+++ b/src/com/android/settings/ResetNetworkConfirm.java
@@ -52,6 +52,7 @@
 import com.android.settings.core.InstrumentedFragment;
 import com.android.settings.enterprise.ActionDisabledByAdminDialogHelper;
 import com.android.settings.network.ApnSettings;
+import com.android.settings.network.SubscriptionUtil;
 import com.android.settingslib.RestrictedLockUtilsInternal;
 
 /**
@@ -126,7 +127,7 @@
             }
 
             ImsManager.getInstance(mContext,
-                    SubscriptionManager.getPhoneId(mSubId)).factoryReset();
+                    SubscriptionUtil.getPhoneId(mContext, mSubId)).factoryReset();
             restoreDefaultApn(mContext);
             if (mEraseEsim) {
                 return RecoverySystem.wipeEuiccData(mContext, mPackageName);
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index e203699..46992ef 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -169,6 +169,10 @@
     public static class WifiCallingDisclaimerActivity extends SettingsActivity { /* empty */ }
     public static class MobileNetworkListActivity extends SettingsActivity {}
     public static class GlobalActionsPanelSettingsActivity extends SettingsActivity {}
+    /**
+     * Activity for BugReportHandlerPicker.
+     */
+    public static class BugReportHandlerPickerActivity extends SettingsActivity { /* empty */ }
 
     // Top level categories for new IA
     public static class NetworkDashboardActivity extends SettingsActivity {}
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index bef4f1b..4144914 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -192,19 +192,6 @@
     }
 
     /**
-     * Returns the UserManager for a given context
-     *
-     * @throws IllegalStateException if no UserManager could be retrieved.
-     */
-    public static UserManager getUserManager(Context context) {
-        final UserManager um = UserManager.get(context);
-        if (um == null) {
-            throw new IllegalStateException("Unable to load UserManager");
-        }
-        return um;
-    }
-
-    /**
      * Returns true if Monkey is running.
      */
     public static boolean isMonkeyRunning() {
@@ -679,7 +666,7 @@
      * @throws SecurityException if the given userId does not belong to the current user group.
      */
     public static int enforceSameOwner(Context context, int userId) {
-        final UserManager um = getUserManager(context);
+        final UserManager um = UserManager.get(context);
         final int[] profileIds = um.getProfileIdsWithDisabled(UserHandle.myUserId());
         if (ArrayUtils.contains(profileIds, userId)) {
             return userId;
@@ -699,7 +686,7 @@
      * Returns the user id of the credential owner of the given user id.
      */
     public static int getCredentialOwnerUserId(Context context, int userId) {
-        final UserManager um = getUserManager(context);
+        final UserManager um = UserManager.get(context);
         return um.getCredentialOwnerProfile(userId);
     }
 
@@ -836,7 +823,7 @@
     }
 
     public static boolean isDemoUser(Context context) {
-        return UserManager.isDeviceInDemoMode(context) && getUserManager(context).isDemoUser();
+        return UserManager.isDeviceInDemoMode(context) && UserManager.get(context).isDemoUser();
     }
 
     public static ComponentName getDeviceOwnerComponent(Context context) {
diff --git a/src/com/android/settings/accessibility/CaptionPropertiesFragment.java b/src/com/android/settings/accessibility/CaptionPropertiesFragment.java
index 9c344df..c022409 100644
--- a/src/com/android/settings/accessibility/CaptionPropertiesFragment.java
+++ b/src/com/android/settings/accessibility/CaptionPropertiesFragment.java
@@ -37,7 +37,10 @@
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
+import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settingslib.accessibility.AccessibilityUtils;
+import com.android.settingslib.search.SearchIndexable;
+import com.android.settingslib.search.SearchIndexableRaw;
 import com.android.settingslib.widget.LayoutPreference;
 
 import java.util.ArrayList;
@@ -47,6 +50,7 @@
 /**
  * Settings fragment containing captioning properties.
  */
+@SearchIndexable
 public class CaptionPropertiesFragment extends SettingsPreferenceFragment
         implements OnPreferenceChangeListener, OnValueChangedListener {
     private static final String PREF_CAPTION_PREVIEW = "caption_preview";
@@ -420,4 +424,90 @@
 
         return true;
     }
+
+    public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
+            new BaseSearchIndexProvider() {
+                @Override
+                public List<SearchIndexableRaw> getRawDataToIndex(Context context,
+                        boolean enabled) {
+                    final Resources res = context.getResources();
+                    final List<SearchIndexableRaw> indexRaws = new ArrayList<>();
+
+                    SearchIndexableRaw raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_SWITCH;
+                    raw.title = res.getString(R.string.accessibility_caption_master_switch_title);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_FONT_SIZE;
+                    raw.title = res.getString(R.string.captioning_text_size);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_PRESET;
+                    raw.title = res.getString(R.string.captioning_preset);
+                    indexRaws.add(raw);
+
+                    return indexRaws;
+                }
+
+                @Override
+                public List<SearchIndexableRaw> getDynamicRawDataToIndex(Context context,
+                        boolean enabled) {
+                    final ContentResolver cr = context.getContentResolver();
+                    final int preserValue = Settings.Secure.getInt(cr,
+                            Settings.Secure.ACCESSIBILITY_CAPTIONING_PRESET, 0);
+                    if (preserValue != CaptionStyle.PRESET_CUSTOM) {
+                        return null;
+                    }
+                    final Resources res = context.getResources();
+                    final List<SearchIndexableRaw> indexRaws = new ArrayList<>();
+                    SearchIndexableRaw raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_TYPEFACE;
+                    raw.title = res.getString(R.string.captioning_typeface);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_FOREGROUND_COLOR;
+                    raw.title = res.getString(R.string.captioning_foreground_color);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_FOREGROUND_OPACITY;
+                    raw.title = res.getString(R.string.captioning_foreground_opacity);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_EDGE_TYPE;
+                    raw.title = res.getString(R.string.captioning_edge_type);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_EDGE_COLOR;
+                    raw.title = res.getString(R.string.captioning_edge_color);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_BACKGROUND_COLOR;
+                    raw.title = res.getString(R.string.captioning_background_color);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_BACKGROUND_OPACITY;
+                    raw.title = res.getString(R.string.captioning_background_opacity);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_WINDOW_COLOR;
+                    raw.title = res.getString(R.string.captioning_window_color);
+                    indexRaws.add(raw);
+
+                    raw = new SearchIndexableRaw(context);
+                    raw.key = PREF_WINDOW_OPACITY;
+                    raw.title = res.getString(R.string.captioning_window_opacity);
+                    indexRaws.add(raw);
+
+                    return indexRaws;
+                }
+            };
 }
diff --git a/src/com/android/settings/accessibility/DaltonizerPreferenceController.java b/src/com/android/settings/accessibility/DaltonizerPreferenceController.java
index efdfaed..e026313 100644
--- a/src/com/android/settings/accessibility/DaltonizerPreferenceController.java
+++ b/src/com/android/settings/accessibility/DaltonizerPreferenceController.java
@@ -16,91 +16,23 @@
 
 package com.android.settings.accessibility;
 
-import android.content.ContentResolver;
 import android.content.Context;
-import android.content.res.Resources;
 import android.provider.Settings;
-import android.view.accessibility.AccessibilityManager;
-
-import androidx.lifecycle.LifecycleObserver;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceScreen;
 
 import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
-import com.android.settingslib.core.lifecycle.Lifecycle;
-import com.android.settingslib.widget.RadioButtonPreference;
 
 import com.google.common.primitives.Ints;
 
-import java.util.HashMap;
-import java.util.Map;
+/** Controller that shows and updates the color correction summary. */
+public class DaltonizerPreferenceController extends BasePreferenceController {
 
-/** Controller class that control accessibility daltonizer settings. */
-public class DaltonizerPreferenceController extends BasePreferenceController implements
-        LifecycleObserver, RadioButtonPreference.OnClickListener {
-    private static final String TYPE = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER;
+    private static final String DALTONIZER_TYPE = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER;
+    private static final String DALTONIZER_ENABLED =
+            Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED;
 
-    // pair the preference key and daltonizer value.
-    private final Map<String, Integer> mAccessibilityDaltonizerKeyToValueMap = new HashMap<>();
-
-    // RadioButtonPreference key, each preference represent a daltonizer value.
-    private final ContentResolver mContentResolver;
-    private final Resources mResources;
-    private DaltonizerPreferenceController.OnChangeListener mOnChangeListener;
-    private RadioButtonPreference mPreference;
-    private int mAccessibilityDaltonizerValue;
-
-    public DaltonizerPreferenceController(Context context, Lifecycle lifecycle,
-            String preferenceKey) {
+    public DaltonizerPreferenceController(Context context, String preferenceKey) {
         super(context, preferenceKey);
-
-        mContentResolver = context.getContentResolver();
-        mResources = context.getResources();
-
-        if (lifecycle != null) {
-            lifecycle.addObserver(this);
-        }
-    }
-
-    protected static int getSecureAccessibilityDaltonizerValue(ContentResolver resolver,
-            String name) {
-        final String daltonizerStringValue = Settings.Secure.getString(resolver, name);
-        if (daltonizerStringValue == null) {
-            return AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY;
-        }
-        final Integer daltonizerIntValue = Ints.tryParse(daltonizerStringValue);
-        return daltonizerIntValue == null ? AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY
-                : daltonizerIntValue;
-    }
-
-    public void setOnChangeListener(DaltonizerPreferenceController.OnChangeListener listener) {
-        mOnChangeListener = listener;
-    }
-
-    private Map<String, Integer> getDaltonizerValueToKeyMap() {
-        if (mAccessibilityDaltonizerKeyToValueMap.size() == 0) {
-
-            final String[] daltonizerKeys = mResources.getStringArray(
-                    R.array.daltonizer_mode_keys);
-
-            final int[] daltonizerValues = mResources.getIntArray(
-                    R.array.daltonizer_type_values);
-
-            final int daltonizerValueCount = daltonizerValues.length;
-            for (int i = 0; i < daltonizerValueCount; i++) {
-                mAccessibilityDaltonizerKeyToValueMap.put(daltonizerKeys[i], daltonizerValues[i]);
-            }
-        }
-        return mAccessibilityDaltonizerKeyToValueMap;
-    }
-
-    private void putSecureString(String name, String value) {
-        Settings.Secure.putString(mContentResolver, name, value);
-    }
-
-    private void handlePreferenceChange(String value) {
-        putSecureString(TYPE, value);
     }
 
     @Override
@@ -109,50 +41,22 @@
     }
 
     @Override
-    public void displayPreference(PreferenceScreen screen) {
-        super.displayPreference(screen);
-        mPreference = (RadioButtonPreference)
-                screen.findPreference(getPreferenceKey());
-        mPreference.setOnClickListener(this);
-        updateState(mPreference);
+    public CharSequence getSummary() {
+        final String[] daltonizerSummarys = mContext.getResources().getStringArray(
+                R.array.daltonizer_mode_summary);
+        final int[] daltonizerValues = mContext.getResources().getIntArray(
+                R.array.daltonizer_type_values);
+        final int timeoutValue =
+                DaltonizerRadioButtonPreferenceController.getSecureAccessibilityDaltonizerValue(
+                        mContext.getContentResolver(), DALTONIZER_TYPE);
+        final int idx = Ints.indexOf(daltonizerValues, timeoutValue);
+        final String serviceSummary = daltonizerSummarys[idx == -1 ? 0 : idx];
+
+        final CharSequence serviceState = AccessibilityUtil.getSummary(mContext,
+                DALTONIZER_ENABLED);
+
+        return mContext.getString(
+                R.string.preference_summary_default_combination,
+                serviceState, serviceSummary);
     }
-
-    @Override
-    public void onRadioButtonClicked(RadioButtonPreference preference) {
-        final int value = getDaltonizerValueToKeyMap().get(mPreferenceKey);
-        handlePreferenceChange(String.valueOf(value));
-        if (mOnChangeListener != null) {
-            mOnChangeListener.onCheckedChanged(mPreference);
-        }
-    }
-
-    private int getAccessibilityDaltonizerValue() {
-        final int daltonizerValue = getSecureAccessibilityDaltonizerValue(mContentResolver,
-                TYPE);
-        return daltonizerValue;
-    }
-
-    protected void updatePreferenceCheckedState(int value) {
-        if (mAccessibilityDaltonizerValue == value) {
-            mPreference.setChecked(true);
-        }
-    }
-
-    @Override
-    public void updateState(Preference preference) {
-        super.updateState(preference);
-        mAccessibilityDaltonizerValue = getAccessibilityDaltonizerValue();
-
-        // reset RadioButton
-        mPreference.setChecked(false);
-        final int preferenceValue = getDaltonizerValueToKeyMap().get(mPreference.getKey());
-        updatePreferenceCheckedState(preferenceValue);
-    }
-
-    /** Listener interface handles checked event. */
-    public interface OnChangeListener {
-        /** A hook that is called when preference checked.*/
-        void onCheckedChanged(Preference preference);
-    }
-
-}
\ No newline at end of file
+}
diff --git a/src/com/android/settings/accessibility/DaltonizerRadioButtonPreferenceController.java b/src/com/android/settings/accessibility/DaltonizerRadioButtonPreferenceController.java
new file mode 100644
index 0000000..dd5eb10
--- /dev/null
+++ b/src/com/android/settings/accessibility/DaltonizerRadioButtonPreferenceController.java
@@ -0,0 +1,165 @@
+/*
+ * 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.accessibility;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.res.Resources;
+import android.provider.Settings;
+import android.view.accessibility.AccessibilityManager;
+
+import androidx.lifecycle.LifecycleObserver;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.core.BasePreferenceController;
+import com.android.settingslib.core.lifecycle.Lifecycle;
+import com.android.settingslib.widget.RadioButtonPreference;
+
+import com.google.common.primitives.Ints;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/** Controller class that control radio button of accessibility daltonizer settings. */
+public class DaltonizerRadioButtonPreferenceController extends BasePreferenceController implements
+        LifecycleObserver, RadioButtonPreference.OnClickListener {
+    private static final String TYPE = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER;
+
+    // pair the preference key and daltonizer value.
+    private final Map<String, Integer> mAccessibilityDaltonizerKeyToValueMap = new HashMap<>();
+
+    // RadioButtonPreference key, each preference represent a daltonizer value.
+    private final ContentResolver mContentResolver;
+    private final Resources mResources;
+    private DaltonizerRadioButtonPreferenceController.OnChangeListener mOnChangeListener;
+    private RadioButtonPreference mPreference;
+    private int mAccessibilityDaltonizerValue;
+
+    public DaltonizerRadioButtonPreferenceController(Context context, String preferenceKey) {
+        super(context, preferenceKey);
+
+        mContentResolver = context.getContentResolver();
+        mResources = context.getResources();
+    }
+
+    public DaltonizerRadioButtonPreferenceController(Context context, Lifecycle lifecycle,
+            String preferenceKey) {
+        super(context, preferenceKey);
+
+        mContentResolver = context.getContentResolver();
+        mResources = context.getResources();
+
+        if (lifecycle != null) {
+            lifecycle.addObserver(this);
+        }
+    }
+
+    protected static int getSecureAccessibilityDaltonizerValue(ContentResolver resolver,
+            String name) {
+        final String daltonizerStringValue = Settings.Secure.getString(resolver, name);
+        if (daltonizerStringValue == null) {
+            return AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY;
+        }
+        final Integer daltonizerIntValue = Ints.tryParse(daltonizerStringValue);
+        return daltonizerIntValue == null ? AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY
+                : daltonizerIntValue;
+    }
+
+    public void setOnChangeListener(
+            DaltonizerRadioButtonPreferenceController.OnChangeListener listener) {
+        mOnChangeListener = listener;
+    }
+
+    private Map<String, Integer> getDaltonizerValueToKeyMap() {
+        if (mAccessibilityDaltonizerKeyToValueMap.size() == 0) {
+
+            final String[] daltonizerKeys = mResources.getStringArray(
+                    R.array.daltonizer_mode_keys);
+
+            final int[] daltonizerValues = mResources.getIntArray(
+                    R.array.daltonizer_type_values);
+
+            final int daltonizerValueCount = daltonizerValues.length;
+            for (int i = 0; i < daltonizerValueCount; i++) {
+                mAccessibilityDaltonizerKeyToValueMap.put(daltonizerKeys[i], daltonizerValues[i]);
+            }
+        }
+        return mAccessibilityDaltonizerKeyToValueMap;
+    }
+
+    private void putSecureString(String name, String value) {
+        Settings.Secure.putString(mContentResolver, name, value);
+    }
+
+    private void handlePreferenceChange(String value) {
+        putSecureString(TYPE, value);
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return AVAILABLE;
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+        mPreference = (RadioButtonPreference)
+                screen.findPreference(getPreferenceKey());
+        mPreference.setOnClickListener(this);
+        updateState(mPreference);
+    }
+
+    @Override
+    public void onRadioButtonClicked(RadioButtonPreference preference) {
+        final int value = getDaltonizerValueToKeyMap().get(mPreferenceKey);
+        handlePreferenceChange(String.valueOf(value));
+        if (mOnChangeListener != null) {
+            mOnChangeListener.onCheckedChanged(mPreference);
+        }
+    }
+
+    private int getAccessibilityDaltonizerValue() {
+        final int daltonizerValue = getSecureAccessibilityDaltonizerValue(mContentResolver,
+                TYPE);
+        return daltonizerValue;
+    }
+
+    protected void updatePreferenceCheckedState(int value) {
+        if (mAccessibilityDaltonizerValue == value) {
+            mPreference.setChecked(true);
+        }
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        super.updateState(preference);
+        mAccessibilityDaltonizerValue = getAccessibilityDaltonizerValue();
+
+        // reset RadioButton
+        mPreference.setChecked(false);
+        final int preferenceValue = getDaltonizerValueToKeyMap().get(mPreference.getKey());
+        updatePreferenceCheckedState(preferenceValue);
+    }
+
+    /** Listener interface handles checked event. */
+    public interface OnChangeListener {
+        /** A hook that is called when preference checked. */
+        void onCheckedChanged(Preference preference);
+    }
+}
diff --git a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
index f127b53..3cde80a 100644
--- a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
@@ -36,13 +36,29 @@
 
 @SearchIndexable
 public final class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceFragment
-        implements DaltonizerPreferenceController.OnChangeListener,
+        implements DaltonizerRadioButtonPreferenceController.OnChangeListener,
         SwitchBar.OnSwitchChangeListener {
 
+    public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
+            new BaseSearchIndexProvider(R.xml.accessibility_daltonizer_settings);
     private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED;
-
     private static final List<AbstractPreferenceController> sControllers = new ArrayList<>();
 
+    private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
+            Lifecycle lifecycle) {
+        if (sControllers.size() == 0) {
+            final Resources resources = context.getResources();
+            final String[] daltonizerKeys = resources.getStringArray(
+                    R.array.daltonizer_mode_keys);
+
+            for (int i = 0; i < daltonizerKeys.length; i++) {
+                sControllers.add(new DaltonizerRadioButtonPreferenceController(
+                        context, lifecycle, daltonizerKeys[i]));
+            }
+        }
+        return sControllers;
+    }
+
     @Override
     public void onCheckedChanged(Preference preference) {
         for (AbstractPreferenceController controller : sControllers) {
@@ -55,8 +71,9 @@
         super.onResume();
         for (AbstractPreferenceController controller :
                 buildPreferenceControllers(getPrefContext(), getSettingsLifecycle())) {
-            ((DaltonizerPreferenceController) controller).setOnChangeListener(this);
-            ((DaltonizerPreferenceController) controller).displayPreference(getPreferenceScreen());
+            ((DaltonizerRadioButtonPreferenceController) controller).setOnChangeListener(this);
+            ((DaltonizerRadioButtonPreferenceController) controller).displayPreference(
+                    getPreferenceScreen());
         }
     }
 
@@ -65,7 +82,7 @@
         super.onPause();
         for (AbstractPreferenceController controller :
                 buildPreferenceControllers(getPrefContext(), getSettingsLifecycle())) {
-            ((DaltonizerPreferenceController) controller).setOnChangeListener(null);
+            ((DaltonizerRadioButtonPreferenceController) controller).setOnChangeListener(null);
         }
     }
 
@@ -79,7 +96,6 @@
         return R.string.help_url_color_correction;
     }
 
-
     @Override
     protected int getPreferenceScreenResId() {
         return R.xml.accessibility_daltonizer_settings;
@@ -115,22 +131,4 @@
                 Settings.Secure.getInt(getContentResolver(), ENABLED, 0) == 1);
         mSwitchBar.addOnSwitchChangeListener(this);
     }
-
-    private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
-            Lifecycle lifecycle) {
-        if (sControllers.size() == 0) {
-            final Resources resources = context.getResources();
-            final String[] daltonizerKeys = resources.getStringArray(
-                    R.array.daltonizer_mode_keys);
-
-            for (int i = 0; i < daltonizerKeys.length; i++) {
-                sControllers.add(new DaltonizerPreferenceController(
-                        context, lifecycle, daltonizerKeys[i]));
-            }
-        }
-        return sControllers;
-    }
-
-    public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
-            new BaseSearchIndexProvider(R.xml.accessibility_daltonizer_settings);
 }
diff --git a/src/com/android/settings/accounts/AccountPreferenceController.java b/src/com/android/settings/accounts/AccountPreferenceController.java
index 1f27963..db3a8eb 100644
--- a/src/com/android/settings/accounts/AccountPreferenceController.java
+++ b/src/com/android/settings/accounts/AccountPreferenceController.java
@@ -90,7 +90,7 @@
     private Preference mProfileNotAvailablePreference;
     private String[] mAuthorities;
     private int mAuthoritiesCount = 0;
-    private SettingsPreferenceFragment mParent;
+    private SettingsPreferenceFragment mFragment;
     private int mAccountProfileOrder = ORDER_ACCOUNT_PROFILES;
     private AccountRestrictionHelper mHelper;
     private MetricsFeatureProvider mMetricsFeatureProvider;
@@ -146,7 +146,7 @@
         super(context);
         mUm = (UserManager) context.getSystemService(Context.USER_SERVICE);
         mAuthorities = authorities;
-        mParent = parent;
+        mFragment = parent;
         if (mAuthorities != null) {
             mAuthoritiesCount = mAuthorities.length;
         }
@@ -238,7 +238,7 @@
             }
             if (preference == profileData.removeWorkProfilePreference) {
                 final int userId = profileData.userInfo.id;
-                RemoveUserFragment.newInstance(userId).show(mParent.getFragmentManager(),
+                RemoveUserFragment.newInstance(userId).show(mFragment.getFragmentManager(),
                         "removeUser");
                 return true;
             }
@@ -246,7 +246,7 @@
                 Bundle arguments = new Bundle();
                 arguments.putParcelable(Intent.EXTRA_USER, profileData.userInfo.getUserHandle());
                 new SubSettingLauncher(mContext)
-                        .setSourceMetricsCategory(mParent.getMetricsCategory())
+                        .setSourceMetricsCategory(mFragment.getMetricsCategory())
                         .setDestination(ManagedProfileSettings.class.getName())
                         .setTitleRes(R.string.managed_profile_settings_title)
                         .setArguments(arguments)
@@ -297,7 +297,7 @@
     }
 
     private void updateProfileUi(final UserInfo userInfo) {
-        if (mParent.getPreferenceManager() == null) {
+        if (mFragment.getPreferenceManager() == null) {
             return;
         }
         final ProfileData data = mProfiles.get(userInfo.id);
@@ -316,7 +316,7 @@
         profileData.userInfo = userInfo;
         AccessiblePreferenceCategory preferenceGroup =
                 mHelper.createAccessiblePreferenceCategory(
-                        mParent.getPreferenceManager().getContext());
+                        mFragment.getPreferenceManager().getContext());
         preferenceGroup.setOrder(mAccountProfileOrder++);
         if (isSingleProfile()) {
             preferenceGroup.setTitle(context.getString(R.string.account_for_section_header,
@@ -342,7 +342,7 @@
                         mContext.getString(R.string.accessibility_category_personal));
             }
         }
-        final PreferenceScreen screen = mParent.getPreferenceScreen();
+        final PreferenceScreen screen = mFragment.getPreferenceScreen();
         if (screen != null) {
             screen.addPreference(preferenceGroup);
         }
@@ -359,7 +359,7 @@
 
     private RestrictedPreference newAddAccountPreference() {
         RestrictedPreference preference =
-                new RestrictedPreference(mParent.getPreferenceManager().getContext());
+                new RestrictedPreference(mFragment.getPreferenceManager().getContext());
         preference.setTitle(R.string.add_account_label);
         preference.setIcon(R.drawable.ic_add_24dp);
         preference.setOnPreferenceClickListener(this);
@@ -369,7 +369,7 @@
 
     private RestrictedPreference newRemoveWorkProfilePreference() {
         RestrictedPreference preference = new RestrictedPreference(
-                mParent.getPreferenceManager().getContext());
+                mFragment.getPreferenceManager().getContext());
         preference.setKey(PREF_KEY_REMOVE_PROFILE);
         preference.setTitle(R.string.remove_managed_profile_label);
         preference.setIcon(R.drawable.ic_delete);
@@ -380,7 +380,7 @@
 
 
     private Preference newManagedProfileSettings() {
-        Preference preference = new Preference(mParent.getPreferenceManager().getContext());
+        Preference preference = new Preference(mFragment.getPreferenceManager().getContext());
         preference.setKey(PREF_KEY_WORK_PROFILE_SETTING);
         preference.setTitle(R.string.managed_profile_settings_title);
         preference.setIcon(R.drawable.ic_settings_24dp);
@@ -400,7 +400,7 @@
     }
 
     void cleanUpPreferences() {
-        PreferenceScreen screen = mParent.getPreferenceScreen();
+        PreferenceScreen screen = mFragment.getPreferenceScreen();
         if (screen == null) {
             return;
         }
@@ -435,7 +435,7 @@
     }
 
     private void updateAccountTypes(ProfileData profileData) {
-        if (mParent.getPreferenceManager() == null
+        if (mFragment.getPreferenceManager() == null
                 || profileData.preferenceGroup.getPreferenceManager() == null) {
             // This could happen if activity is finishing
             return;
@@ -469,7 +469,7 @@
             // Put a label instead of the accounts list
             if (mProfileNotAvailablePreference == null) {
                 mProfileNotAvailablePreference =
-                        new Preference(mParent.getPreferenceManager().getContext());
+                        new Preference(mFragment.getPreferenceManager().getContext());
             }
             mProfileNotAvailablePreference.setEnabled(false);
             mProfileNotAvailablePreference.setIcon(R.drawable.empty_icon);
@@ -508,7 +508,7 @@
             final Account[] accounts = AccountManager.get(mContext)
                     .getAccountsByTypeAsUser(accountType, userHandle);
             final Drawable icon = helper.getDrawableForType(mContext, accountType);
-            final Context prefContext = mParent.getPreferenceManager().getContext();
+            final Context prefContext = mFragment.getPreferenceManager().getContext();
 
             // Add a preference row for each individual account
             for (Account account : accounts) {
@@ -536,7 +536,7 @@
                         titleResId);
                 fragmentArguments.putParcelable(EXTRA_USER, userHandle);
                 accountTypePreferences.add(new AccountTypePreference(
-                        prefContext, mMetricsFeatureProvider.getMetricsCategory(mParent),
+                        prefContext, mMetricsFeatureProvider.getMetricsCategory(mFragment),
                         account, titleResPackageName, titleResId, label,
                         AccountDetailDashboardFragment.class.getName(), fragmentArguments, icon));
             }
@@ -587,11 +587,15 @@
             Log.v(TAG, "Received broadcast: " + action);
             if (action.equals(Intent.ACTION_MANAGED_PROFILE_REMOVED)
                     || action.equals(Intent.ACTION_MANAGED_PROFILE_ADDED)) {
-                // Clean old state
-                stopListeningToAccountUpdates();
-                // Build new state
-                updateUi();
-                listenToAccountUpdates();
+                if (mFragment instanceof AccountWorkProfileDashboardFragment) {
+                    mFragment.getActivity().finish();
+                } else {
+                    // Clean old state
+                    stopListeningToAccountUpdates();
+                    // Build new state
+                    updateUi();
+                    listenToAccountUpdates();
+                }
                 return;
             }
             Log.w(TAG, "Cannot handle received broadcast: " + intent.getAction());
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
index 5f164d6..073c7e6 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
@@ -26,6 +26,7 @@
 import com.android.settings.R;
 import com.android.settings.Utils;
 import com.android.settings.biometrics.BiometricEnrollIntroduction;
+import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.password.ChooseLockSettingsHelper;
 import com.android.settingslib.RestrictedLockUtilsInternal;
 
@@ -40,12 +41,15 @@
     private static final String TAG = "FaceIntro";
 
     private FaceManager mFaceManager;
+    private FaceFeatureProvider mFaceFeatureProvider;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
         mFaceManager = Utils.getFaceManagerOrNull(this);
+        mFaceFeatureProvider = FeatureFactory.getFactory(getApplicationContext())
+                .getFaceFeatureProvider();
 
         mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
         if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
@@ -87,6 +91,12 @@
                     });
         }
 
+        final TextView footer2 = findViewById(R.id.face_enroll_introduction_footer_part_2);
+        final int footer2TextResource =
+                mFaceFeatureProvider.isAttentionSupported(getApplicationContext())
+                        ? R.string.security_settings_face_enroll_introduction_footer_part_2
+                        : R.string.security_settings_face_settings_footer_attention_not_supported;
+        footer2.setText(footer2TextResource);
     }
 
     @Override
diff --git a/src/com/android/settings/biometrics/face/FaceFeatureProvider.java b/src/com/android/settings/biometrics/face/FaceFeatureProvider.java
new file mode 100644
index 0000000..26ea261
--- /dev/null
+++ b/src/com/android/settings/biometrics/face/FaceFeatureProvider.java
@@ -0,0 +1,25 @@
+/*
+ * 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.biometrics.face;
+
+import android.content.Context;
+
+/** Feature provider for face unlock */
+public interface FaceFeatureProvider {
+    /** Returns true if attention checking is supported. */
+    boolean isAttentionSupported(Context context);
+}
diff --git a/src/com/android/settings/biometrics/face/FaceFeatureProviderImpl.java b/src/com/android/settings/biometrics/face/FaceFeatureProviderImpl.java
new file mode 100644
index 0000000..e508600
--- /dev/null
+++ b/src/com/android/settings/biometrics/face/FaceFeatureProviderImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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.biometrics.face;
+
+import android.content.Context;
+import android.provider.Settings;
+
+public class FaceFeatureProviderImpl implements FaceFeatureProvider {
+
+    @Override
+    public boolean isAttentionSupported(Context context) {
+        return true;
+    }
+}
diff --git a/src/com/android/settings/biometrics/face/FaceSettings.java b/src/com/android/settings/biometrics/face/FaceSettings.java
index 3afe450..ca51f18 100644
--- a/src/com/android/settings/biometrics/face/FaceSettings.java
+++ b/src/com/android/settings/biometrics/face/FaceSettings.java
@@ -36,6 +36,7 @@
 import com.android.settings.SettingsActivity;
 import com.android.settings.Utils;
 import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.password.ChooseLockSettingsHelper;
 import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settingslib.core.AbstractPreferenceController;
@@ -68,6 +69,7 @@
     private List<Preference> mTogglePreferences;
     private Preference mRemoveButton;
     private Preference mEnrollButton;
+    private FaceFeatureProvider mFaceFeatureProvider;
 
     private boolean mConfirmingPassword;
 
@@ -126,6 +128,7 @@
 
         mUserId = getActivity().getIntent().getIntExtra(
                 Intent.EXTRA_USER_ID, UserHandle.myUserId());
+        mFaceFeatureProvider = FeatureFactory.getFactory(getContext()).getFaceFeatureProvider();
 
         if (mUserManager.getUserInfo(mUserId).isManagedProfile()) {
             getActivity().setTitle(getActivity().getResources().getString(
@@ -199,6 +202,10 @@
         final boolean hasEnrolled = mFaceManager.hasEnrolledTemplates(mUserId);
         mEnrollButton.setVisible(!hasEnrolled);
         mRemoveButton.setVisible(hasEnrolled);
+
+        if (!mFaceFeatureProvider.isAttentionSupported(getContext())) {
+            removePreference(FaceSettingsAttentionPreferenceController.KEY);
+        }
     }
 
     @Override
diff --git a/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java b/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java
index 838dc0d..c665467 100644
--- a/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java
+++ b/src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java
@@ -23,6 +23,7 @@
 
 import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
+import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.utils.AnnotationSpan;
 import com.android.settingslib.HelpUtils;
 import com.android.settingslib.widget.FooterPreference;
@@ -34,8 +35,11 @@
 
     private static final String ANNOTATION_URL = "url";
 
+    private FaceFeatureProvider mProvider;
+
     public FaceSettingsFooterPreferenceController(Context context, String preferenceKey) {
         super(context, preferenceKey);
+        mProvider = FeatureFactory.getFactory(context).getFaceFeatureProvider();
     }
 
     public FaceSettingsFooterPreferenceController(Context context) {
@@ -55,7 +59,12 @@
                 mContext, mContext.getString(R.string.help_url_face), getClass().getName());
         final AnnotationSpan.LinkInfo linkInfo =
                 new AnnotationSpan.LinkInfo(mContext, ANNOTATION_URL, helpIntent);
+
+        final int footerRes = mProvider.isAttentionSupported(mContext)
+                ? R.string.security_settings_face_settings_footer
+                : R.string.security_settings_face_settings_footer_attention_not_supported;
+
         preference.setTitle(AnnotationSpan.linkify(
-                mContext.getText(R.string.security_settings_face_settings_footer), linkInfo));
+                mContext.getText(footerRes), linkInfo));
     }
 }
diff --git a/src/com/android/settings/bugreporthandler/BugReportHandlerPicker.java b/src/com/android/settings/bugreporthandler/BugReportHandlerPicker.java
new file mode 100644
index 0000000..9c2ac9e
--- /dev/null
+++ b/src/com/android/settings/bugreporthandler/BugReportHandlerPicker.java
@@ -0,0 +1,205 @@
+/*
+ * 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.bugreporthandler;
+
+import static android.provider.Settings.ACTION_BUGREPORT_HANDLER_SETTINGS;
+
+import android.app.Activity;
+import android.app.settings.SettingsEnums;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageItemInfo;
+import android.content.pm.PackageManager;
+import android.os.UserHandle;
+import android.util.Log;
+import android.util.Pair;
+
+import androidx.annotation.VisibleForTesting;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.Utils;
+import com.android.settings.applications.defaultapps.DefaultAppPickerFragment;
+import com.android.settingslib.applications.DefaultAppInfo;
+import com.android.settingslib.widget.FooterPreference;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Picker for BugReportHandler.
+ */
+public class BugReportHandlerPicker extends DefaultAppPickerFragment {
+    private static final String TAG = "BugReportHandlerPicker";
+
+    private BugReportHandlerUtil mBugReportHandlerUtil;
+    private FooterPreference mFooter;
+
+    private static String getHandlerApp(String key) {
+        int index = key.lastIndexOf('#');
+        String handlerApp = key.substring(0, index);
+        return handlerApp;
+    }
+
+    private static int getHandlerUser(String key) {
+        int index = key.lastIndexOf('#');
+        int handlerUser = 0;
+        try {
+            handlerUser = Integer.parseInt(key.substring(index + 1));
+        } catch (NumberFormatException nfe) {
+            Log.e(TAG, "Failed to get handlerUser");
+        }
+        return handlerUser;
+    }
+
+    @VisibleForTesting
+    static String getKey(String handlerApp, int handlerUser) {
+        return handlerApp + "#" + handlerUser;
+    }
+
+    @Override
+    protected int getPreferenceScreenResId() {
+        return R.xml.bug_report_handler_settings;
+    }
+
+    @Override
+    protected void addStaticPreferences(PreferenceScreen screen) {
+        if (mFooter == null) {
+            mFooter = new FooterPreference(screen.getContext());
+            mFooter.setIcon(R.drawable.ic_info_outline_24dp);
+            mFooter.setSingleLineTitle(false);
+            mFooter.setTitle(R.string.bug_report_handler_picker_footer_text);
+            mFooter.setSelectable(false);
+        }
+        screen.addPreference(mFooter);
+    }
+
+    @Override
+    protected List<DefaultAppInfo> getCandidates() {
+        final Context context = getContext();
+        final List<Pair<ApplicationInfo, Integer>> validBugReportHandlerInfos =
+                getBugReportHandlerUtil().getValidBugReportHandlerInfos(context);
+        final List<DefaultAppInfo> candidates = new ArrayList<>();
+        for (Pair<ApplicationInfo, Integer> info : validBugReportHandlerInfos) {
+            candidates.add(createDefaultAppInfo(context, mPm, info.second, info.first));
+        }
+        return candidates;
+    }
+
+    private BugReportHandlerUtil getBugReportHandlerUtil() {
+        if (mBugReportHandlerUtil == null) {
+            setBugReportHandlerUtil(createDefaultBugReportHandlerUtil());
+        }
+        return mBugReportHandlerUtil;
+    }
+
+    @VisibleForTesting
+    void setBugReportHandlerUtil(BugReportHandlerUtil bugReportHandlerUtil) {
+        mBugReportHandlerUtil = bugReportHandlerUtil;
+    }
+
+    @VisibleForTesting
+    BugReportHandlerUtil createDefaultBugReportHandlerUtil() {
+        return new BugReportHandlerUtil();
+    }
+
+    @Override
+    protected String getDefaultKey() {
+        final Pair<String, Integer> pair =
+                getBugReportHandlerUtil().getCurrentBugReportHandlerAppAndUser(getContext());
+        return getKey(pair.first, pair.second);
+    }
+
+    @Override
+    protected boolean setDefaultKey(String key) {
+        return getBugReportHandlerUtil().setCurrentBugReportHandlerAppAndUser(getContext(),
+                getHandlerApp(key),
+                getHandlerUser(key));
+    }
+
+    @Override
+    protected void onSelectionPerformed(boolean success) {
+        super.onSelectionPerformed(success);
+        if (success) {
+            final Activity activity = getActivity();
+            final Intent intent = activity == null ? null : activity.getIntent();
+            if (intent != null && ACTION_BUGREPORT_HANDLER_SETTINGS.equals(intent.getAction())) {
+                // If this was started through ACTION_BUGREPORT_HANDLER_SETTINGS then return once
+                // we have chosen a new handler.
+                getActivity().finish();
+            }
+        } else {
+            getBugReportHandlerUtil().showInvalidChoiceToast(getContext());
+            updateCandidates();
+        }
+    }
+
+    @Override
+    public int getMetricsCategory() {
+        return SettingsEnums.SETTINGS_BUGREPORT_HANDLER;
+    }
+
+    @VisibleForTesting
+    DefaultAppInfo createDefaultAppInfo(Context context, PackageManager pm, int userId,
+            PackageItemInfo packageItemInfo) {
+        return new BugreportHandlerAppInfo(context, pm, userId, packageItemInfo,
+                getDescription(packageItemInfo.packageName, userId));
+    }
+
+    private String getDescription(String handlerApp, int handlerUser) {
+        final Context context = getContext();
+        if (BugReportHandlerUtil.SHELL_APP_PACKAGE.equals(handlerApp)) {
+            return context.getString(R.string.system_default_app);
+        }
+        final UserHandle managedProfile = Utils.getManagedProfile(mUserManager);
+        if (managedProfile != null && managedProfile.getIdentifier() == handlerUser) {
+            return context.getString(R.string.work_profile_app);
+        }
+        return context.getString(R.string.personal_profile_app);
+    }
+
+    private static class BugreportHandlerAppInfo extends DefaultAppInfo {
+        private final Context mContext;
+
+        BugreportHandlerAppInfo(Context context, PackageManager pm, int userId,
+                PackageItemInfo packageItemInfo, String summary) {
+            super(context, pm, userId, packageItemInfo, summary, true /* enabled */);
+            mContext = context;
+        }
+
+        @Override
+        public String getKey() {
+            if (packageItemInfo != null) {
+                return BugReportHandlerPicker.getKey(packageItemInfo.packageName, userId);
+            } else {
+                return null;
+            }
+        }
+
+        @Override
+        public CharSequence loadLabel() {
+            if (mContext == null || packageItemInfo == null) {
+                return null;
+            }
+            if (BugReportHandlerUtil.SHELL_APP_PACKAGE.equals(packageItemInfo.packageName)) {
+                return mContext.getString(R.string.shell_app);
+            }
+            return super.loadLabel();
+        }
+    }
+}
diff --git a/src/com/android/settings/bugreporthandler/BugReportHandlerUtil.java b/src/com/android/settings/bugreporthandler/BugReportHandlerUtil.java
new file mode 100644
index 0000000..f4acc7d
--- /dev/null
+++ b/src/com/android/settings/bugreporthandler/BugReportHandlerUtil.java
@@ -0,0 +1,246 @@
+/*
+ * 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.bugreporthandler;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.UserInfo;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.util.Log;
+import android.util.Pair;
+import android.widget.Toast;
+
+import com.android.settings.R;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Utility methods related to BugReportHandler.
+ */
+public class BugReportHandlerUtil {
+    private static final String TAG = "BugReportHandlerUtil";
+    private static final String INTENT_BUGREPORT_REQUESTED =
+            "com.android.internal.intent.action.BUGREPORT_REQUESTED";
+
+    public static final String SHELL_APP_PACKAGE = "com.android.shell";
+
+    public BugReportHandlerUtil() {
+    }
+
+    /**
+     * Check is BugReportHandler enabled on the device.
+     *
+     * @param context Context
+     * @return true if BugReportHandler is enabled, or false otherwise
+     */
+    public boolean isBugReportHandlerEnabled(Context context) {
+        return context.getResources().getBoolean(
+                com.android.internal.R.bool.config_bugReportHandlerEnabled);
+    }
+
+    /**
+     * Fetch the package name currently used as bug report handler app and the user.
+     *
+     * @param context Context
+     * @return a pair of two values, first one is the current bug report handler app, second is
+     * the user.
+     */
+    public Pair<String, Integer> getCurrentBugReportHandlerAppAndUser(Context context) {
+
+        String handlerApp = getCustomBugReportHandlerApp(context);
+        int handlerUser = getCustomBugReportHandlerUser(context);
+
+        boolean needToResetOutdatedSettings = false;
+        if (!isBugreportWhitelistedApp(handlerApp)) {
+            handlerApp = getDefaultBugReportHandlerApp(context);
+            handlerUser = UserHandle.USER_SYSTEM;
+        } else if (getBugReportHandlerAppReceivers(context, handlerApp, handlerUser).isEmpty()) {
+            // It looks like the settings are outdated, need to reset outdated settings.
+            //
+            // i.e.
+            // If user chooses which profile and which bugreport-whitelisted app in that
+            // profile to handle a bugreport, then user remove the profile.
+            // === RESULT ===
+            // The chosen bugreport handler app is outdated because the profile is removed,
+            // so need to reset outdated settings
+            handlerApp = getDefaultBugReportHandlerApp(context);
+            handlerUser = UserHandle.USER_SYSTEM;
+            needToResetOutdatedSettings = true;
+        }
+
+        if (!isBugreportWhitelistedApp(handlerApp)
+                || getBugReportHandlerAppReceivers(context, handlerApp, handlerUser).isEmpty()) {
+            // It looks like current handler app may be too old and doesn't support to handle a
+            // bugreport, so change to let shell to handle a bugreport and need to reset
+            // settings.
+            handlerApp = SHELL_APP_PACKAGE;
+            handlerUser = UserHandle.USER_SYSTEM;
+            needToResetOutdatedSettings = true;
+        }
+
+        if (needToResetOutdatedSettings) {
+            setBugreportHandlerAppAndUser(context, handlerApp, handlerUser);
+        }
+
+        return Pair.create(handlerApp, handlerUser);
+    }
+
+    private String getCustomBugReportHandlerApp(Context context) {
+        // Get the package of custom bugreport handler app
+        return Settings.Global.getString(context.getContentResolver(),
+                Settings.Global.CUSTOM_BUGREPORT_HANDLER_APP);
+    }
+
+    private int getCustomBugReportHandlerUser(Context context) {
+        return Settings.Global.getInt(context.getContentResolver(),
+                Settings.Global.CUSTOM_BUGREPORT_HANDLER_USER, UserHandle.USER_NULL);
+    }
+
+    private String getDefaultBugReportHandlerApp(Context context) {
+        return context.getResources().getString(
+                com.android.internal.R.string.config_defaultBugReportHandlerApp);
+    }
+
+    /**
+     * Change current bug report handler app and user.
+     *
+     * @param context     Context
+     * @param handlerApp  the package name of the handler app
+     * @param handlerUser the id of the handler user
+     * @return whether the change succeeded
+     */
+    public boolean setCurrentBugReportHandlerAppAndUser(Context context, String handlerApp,
+            int handlerUser) {
+        if (!isBugreportWhitelistedApp(handlerApp)) {
+            return false;
+        } else if (getBugReportHandlerAppReceivers(context, handlerApp, handlerUser).isEmpty()) {
+            return false;
+        }
+        setBugreportHandlerAppAndUser(context, handlerApp, handlerUser);
+        return true;
+    }
+
+    /**
+     * Fetches ApplicationInfo objects and user ids for all currently valid BugReportHandler.
+     * A BugReportHandler is considered valid if it can receive BUGREPORT_REQUESTED intent.
+     *
+     * @param context Context
+     * @return pair objects for all currently valid BugReportHandler packages and user id
+     */
+    public List<Pair<ApplicationInfo, Integer>> getValidBugReportHandlerInfos(Context context) {
+        final List<Pair<ApplicationInfo, Integer>> validBugReportHandlerApplicationInfos =
+                new ArrayList<>();
+        List<String> bugreportWhitelistedPackages;
+        try {
+            bugreportWhitelistedPackages =
+                    ActivityManager.getService().getBugreportWhitelistedPackages();
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to get bugreportWhitelistedPackages:", e);
+            return validBugReportHandlerApplicationInfos;
+        }
+
+        // Add "Shell with system user" as System default preference on top of screen
+        if (bugreportWhitelistedPackages.contains(SHELL_APP_PACKAGE)
+                && !getBugReportHandlerAppReceivers(context, SHELL_APP_PACKAGE,
+                UserHandle.USER_SYSTEM).isEmpty()) {
+            try {
+                validBugReportHandlerApplicationInfos.add(
+                        Pair.create(
+                                context.getPackageManager().getApplicationInfo(SHELL_APP_PACKAGE,
+                                        PackageManager.MATCH_ANY_USER), UserHandle.USER_SYSTEM)
+                );
+            } catch (PackageManager.NameNotFoundException e) {
+            }
+        }
+
+        final UserManager userManager = context.getSystemService(UserManager.class);
+        final List<UserInfo> profileList = userManager.getProfiles(UserHandle.getCallingUserId());
+        // Only add non-Shell app as normal preference
+        final List<String> nonShellPackageList = bugreportWhitelistedPackages.stream()
+                .filter(pkg -> !SHELL_APP_PACKAGE.equals(pkg)).collect(Collectors.toList());
+        Collections.sort(nonShellPackageList);
+        for (String pkg : nonShellPackageList) {
+            for (UserInfo profile : profileList) {
+                final int userId = profile.getUserHandle().getIdentifier();
+                if (getBugReportHandlerAppReceivers(context, pkg, userId).isEmpty()) {
+                    continue;
+                }
+                try {
+                    validBugReportHandlerApplicationInfos.add(
+                            Pair.create(context.getPackageManager()
+                                            .getApplicationInfo(pkg, PackageManager.MATCH_ANY_USER),
+                                    userId));
+                } catch (PackageManager.NameNotFoundException e) {
+                }
+            }
+        }
+        return validBugReportHandlerApplicationInfos;
+    }
+
+    private boolean isBugreportWhitelistedApp(String app) {
+        // Verify the app is bugreport-whitelisted
+        if (TextUtils.isEmpty(app)) {
+            return false;
+        }
+        try {
+            return ActivityManager.getService().getBugreportWhitelistedPackages().contains(app);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to get bugreportWhitelistedPackages:", e);
+            return false;
+        }
+    }
+
+    private List<ResolveInfo> getBugReportHandlerAppReceivers(Context context, String handlerApp,
+            int handlerUser) {
+        // Use the app package and the user id to retrieve the receiver that can handle a
+        // broadcast of the intent.
+        final Intent intent = new Intent(INTENT_BUGREPORT_REQUESTED);
+        intent.setPackage(handlerApp);
+        return context.getPackageManager()
+                .queryBroadcastReceiversAsUser(intent, PackageManager.MATCH_SYSTEM_ONLY,
+                        handlerUser);
+    }
+
+    private void setBugreportHandlerAppAndUser(Context context, String handlerApp,
+            int handlerUser) {
+        Settings.Global.putString(context.getContentResolver(),
+                Settings.Global.CUSTOM_BUGREPORT_HANDLER_APP,
+                handlerApp);
+        Settings.Global.putInt(context.getContentResolver(),
+                Settings.Global.CUSTOM_BUGREPORT_HANDLER_USER, handlerUser);
+    }
+
+    /**
+     * Show a toast to explain the chosen bug report handler can no longer be chosen.
+     */
+    public void showInvalidChoiceToast(Context context) {
+        final Toast toast = Toast.makeText(context,
+                R.string.select_invalid_bug_report_handler_toast_text, Toast.LENGTH_SHORT);
+        toast.show();
+    }
+}
diff --git a/src/com/android/settings/core/BasePreferenceController.java b/src/com/android/settings/core/BasePreferenceController.java
index 7215bb7..1985a99 100644
--- a/src/com/android/settings/core/BasePreferenceController.java
+++ b/src/com/android/settings/core/BasePreferenceController.java
@@ -13,6 +13,8 @@
  */
 package com.android.settings.core;
 
+import static android.content.Intent.EXTRA_USER_ID;
+
 import static com.android.settings.dashboard.DashboardFragment.CATEGORY;
 
 import android.annotation.IntDef;
@@ -20,6 +22,7 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.net.Uri;
+import android.os.Bundle;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.provider.SettingsSlicesContract;
@@ -204,7 +207,7 @@
      * The status is used for the convenience methods: {@link #isAvailable()},
      * {@link #isSupported()}
      * </p>
-     * The inherited class doesn't need to check work profile is existed or not if
+     * The inherited class doesn't need to check work profile if
      * android:forWork="true" is set in preference xml.
      */
     @AvailabilityStatus
@@ -337,6 +340,8 @@
         if (!mIsForWork || mWorkProfileUser == null) {
             return super.handlePreferenceTreeClick(preference);
         }
+        final Bundle extra = preference.getExtras();
+        extra.putInt(EXTRA_USER_ID, mWorkProfileUser.getIdentifier());
         new SubSettingLauncher(preference.getContext())
                 .setDestination(preference.getFragment())
                 .setSourceMetricsCategory(preference.getExtras().getInt(CATEGORY,
diff --git a/src/com/android/settings/core/WorkPreferenceController.java b/src/com/android/settings/core/WorkPreferenceController.java
new file mode 100644
index 0000000..5fdc476
--- /dev/null
+++ b/src/com/android/settings/core/WorkPreferenceController.java
@@ -0,0 +1,40 @@
+/*
+ * 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.core;
+
+import android.content.Context;
+
+import androidx.annotation.CallSuper;
+
+/**
+ * Base class to be used directly in Xml with settings:forWork="true" attribute.
+ * It is used specifically for work profile only preference
+ */
+public class WorkPreferenceController extends BasePreferenceController {
+
+    public WorkPreferenceController(Context context, String preferenceKey) {
+        super(context, preferenceKey);
+    }
+
+    /**
+     * Only available when work profile user is existed
+     */
+    @CallSuper
+    public int getAvailabilityStatus() {
+        return getWorkProfileUser() != null ? AVAILABLE : DISABLED_FOR_USER;
+    }
+}
diff --git a/src/com/android/settings/core/gateway/SettingsGateway.java b/src/com/android/settings/core/gateway/SettingsGateway.java
index 4ad4c5f..01b1598 100644
--- a/src/com/android/settings/core/gateway/SettingsGateway.java
+++ b/src/com/android/settings/core/gateway/SettingsGateway.java
@@ -56,6 +56,7 @@
 import com.android.settings.biometrics.face.FaceSettings;
 import com.android.settings.biometrics.fingerprint.FingerprintSettings;
 import com.android.settings.bluetooth.BluetoothDeviceDetailsFragment;
+import com.android.settings.bugreporthandler.BugReportHandlerPicker;
 import com.android.settings.connecteddevice.AdvancedConnectedDeviceDashboardFragment;
 import com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment;
 import com.android.settings.connecteddevice.PreviouslyConnectedDeviceDashboardFragment;
@@ -106,14 +107,14 @@
 import com.android.settings.network.NetworkDashboardFragment;
 import com.android.settings.nfc.AndroidBeam;
 import com.android.settings.nfc.PaymentSettings;
-import com.android.settings.notification.app.AppBubbleNotificationSettings;
-import com.android.settings.notification.app.AppNotificationSettings;
-import com.android.settings.notification.app.ChannelNotificationSettings;
 import com.android.settings.notification.ConfigureNotificationSettings;
 import com.android.settings.notification.NotificationAccessSettings;
 import com.android.settings.notification.NotificationAssistantPicker;
-import com.android.settings.notification.history.NotificationStation;
 import com.android.settings.notification.SoundSettings;
+import com.android.settings.notification.app.AppBubbleNotificationSettings;
+import com.android.settings.notification.app.AppNotificationSettings;
+import com.android.settings.notification.app.ChannelNotificationSettings;
+import com.android.settings.notification.history.NotificationStation;
 import com.android.settings.notification.zen.ZenAccessSettings;
 import com.android.settings.notification.zen.ZenModeAutomationSettings;
 import com.android.settings.notification.zen.ZenModeBlockedEffectsSettings;
@@ -287,7 +288,8 @@
             BatterySaverScheduleSettings.class.getName(),
             MobileNetworkListFragment.class.getName(),
             GlobalActionsPanelSettings.class.getName(),
-            DarkModeSettingsFragment.class.getName()
+            DarkModeSettingsFragment.class.getName(),
+            BugReportHandlerPicker.class.getName()
     };
 
     public static final String[] SETTINGS_FOR_RESTRICTED = {
diff --git a/src/com/android/settings/dashboard/profileselector/ProfileFragmentBridge.java b/src/com/android/settings/dashboard/profileselector/ProfileFragmentBridge.java
index 816deca..04fccb3 100644
--- a/src/com/android/settings/dashboard/profileselector/ProfileFragmentBridge.java
+++ b/src/com/android/settings/dashboard/profileselector/ProfileFragmentBridge.java
@@ -20,8 +20,8 @@
 
 import com.android.settings.accounts.AccountDashboardFragment;
 import com.android.settings.applications.manageapplications.ManageApplications;
-import com.android.settings.deviceinfo.StorageDashboardFragment;
 import com.android.settings.location.LocationSettings;
+import com.android.settings.location.RecentLocationRequestSeeAllFragment;
 
 import java.util.Map;
 
@@ -42,9 +42,9 @@
                 ProfileSelectAccountFragment.class.getName());
         FRAGMENT_MAP.put(ManageApplications.class.getName(),
                 ProfileSelectManageApplications.class.getName());
-        FRAGMENT_MAP.put(StorageDashboardFragment.class.getName(),
-                ProfileSelectStorageFragment.class.getName());
         FRAGMENT_MAP.put(LocationSettings.class.getName(),
                 ProfileSelectLocationFragment.class.getName());
+        FRAGMENT_MAP.put(RecentLocationRequestSeeAllFragment.class.getName(),
+                ProfileSelectRecentLocationRequestFragment.class.getName());
     }
 }
diff --git a/src/com/android/settings/dashboard/profileselector/ProfileSelectFragment.java b/src/com/android/settings/dashboard/profileselector/ProfileSelectFragment.java
index 79228c2..9ae8284 100644
--- a/src/com/android/settings/dashboard/profileselector/ProfileSelectFragment.java
+++ b/src/com/android/settings/dashboard/profileselector/ProfileSelectFragment.java
@@ -16,10 +16,13 @@
 
 package com.android.settings.dashboard.profileselector;
 
+import static android.content.Intent.EXTRA_USER_ID;
+
 import android.annotation.IntDef;
 import android.app.Activity;
 import android.content.Context;
 import android.os.Bundle;
+import android.os.UserHandle;
 import android.os.UserManager;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -27,6 +30,7 @@
 import android.widget.FrameLayout;
 import android.widget.LinearLayout;
 
+import androidx.annotation.VisibleForTesting;
 import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentStatePagerAdapter;
 import androidx.recyclerview.widget.RecyclerView;
@@ -97,21 +101,7 @@
             Bundle savedInstanceState) {
         mContentView = (ViewGroup) super.onCreateView(inflater, container, savedInstanceState);
         final Activity activity = getActivity();
-        final int intentUser = activity.getIntent().getContentUserHint();
-        int selectedTab = 0;
-
-        // Start intent from a specific user eg: adb shell --user 10
-        if (intentUser > 0 && Utils.getManagedProfile(UserManager.get(activity)).getIdentifier()
-                == intentUser) {
-            selectedTab = WORK_TAB;
-        }
-
-        // Set selected tab using fragment argument
-        final int extraTab = getArguments() != null ? getArguments().getInt(
-                SettingsActivity.EXTRA_SHOW_FRAGMENT_TAB, -1) : -1;
-        if (extraTab != -1) {
-            selectedTab = extraTab;
-        }
+        final int selectedTab = getTabId(activity, getArguments());
 
         final View tabContainer = mContentView.findViewById(R.id.tab_container);
         final ViewPager viewPager = tabContainer.findViewById(R.id.view_pager);
@@ -155,6 +145,28 @@
         return TAG;
     }
 
+    @VisibleForTesting
+    int getTabId(Activity activity, Bundle bundle) {
+        if (bundle != null) {
+            final int extraTab = bundle.getInt(SettingsActivity.EXTRA_SHOW_FRAGMENT_TAB, -1);
+            if (extraTab != -1) {
+                return WORK_TAB;
+            }
+            final int userId = bundle.getInt(EXTRA_USER_ID, UserHandle.SYSTEM.getIdentifier());
+            final boolean isWorkProfile = UserManager.get(activity).isManagedProfile(userId);
+            if (isWorkProfile) {
+                return WORK_TAB;
+            }
+        }
+        // Start intent from a specific user eg: adb shell --user 10
+        final int intentUser = activity.getIntent().getContentUserHint();
+        if (UserManager.get(activity).isManagedProfile(intentUser)) {
+            return WORK_TAB;
+        }
+
+        return PERSONAL_TAB;
+    }
+
     static class ViewPagerAdapter extends FragmentStatePagerAdapter {
 
         private final Fragment[] mChildFragments;
diff --git a/src/com/android/settings/dashboard/profileselector/ProfileSelectLocationFragment.java b/src/com/android/settings/dashboard/profileselector/ProfileSelectLocationFragment.java
index b256157..0d7c4d0 100644
--- a/src/com/android/settings/dashboard/profileselector/ProfileSelectLocationFragment.java
+++ b/src/com/android/settings/dashboard/profileselector/ProfileSelectLocationFragment.java
@@ -46,9 +46,19 @@
 
     @Override
     public Fragment[] getFragments() {
+
+        final Bundle workOnly = new Bundle();
+        workOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.ProfileType.WORK);
+        final Fragment workFragment = new LocationWorkProfileSettings();
+        workFragment.setArguments(workOnly);
+
+        final Bundle personalOnly = new Bundle();
+        personalOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.ProfileType.PERSONAL);
+        final Fragment personalFragment = new LocationPersonalSettings();
+        personalFragment.setArguments(personalOnly);
         return new Fragment[]{
-                new LocationPersonalSettings(),
-                new LocationWorkProfileSettings()
+                personalFragment,
+                workFragment
         };
     }
 }
diff --git a/src/com/android/settings/dashboard/profileselector/ProfileSelectRecentLocationRequestFragment.java b/src/com/android/settings/dashboard/profileselector/ProfileSelectRecentLocationRequestFragment.java
new file mode 100644
index 0000000..058ffe4
--- /dev/null
+++ b/src/com/android/settings/dashboard/profileselector/ProfileSelectRecentLocationRequestFragment.java
@@ -0,0 +1,46 @@
+/*
+ * 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.dashboard.profileselector;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.settings.location.RecentLocationRequestSeeAllFragment;
+
+/**
+ * Recent location request page for personal/managed profile.
+ */
+public class ProfileSelectRecentLocationRequestFragment extends ProfileSelectFragment {
+
+    @Override
+    public Fragment[] getFragments() {
+        final Bundle workOnly = new Bundle();
+        workOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.ProfileType.WORK);
+        final Fragment workFragment = new RecentLocationRequestSeeAllFragment();
+        workFragment.setArguments(workOnly);
+
+        final Bundle personalOnly = new Bundle();
+        personalOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.ProfileType.PERSONAL);
+        final Fragment personalFragment = new RecentLocationRequestSeeAllFragment();
+        personalFragment.setArguments(personalOnly);
+        return new Fragment[]{
+                personalFragment, //0
+                workFragment
+        };
+    }
+}
diff --git a/src/com/android/settings/dashboard/profileselector/ProfileSelectStorageFragment.java b/src/com/android/settings/dashboard/profileselector/ProfileSelectStorageFragment.java
deleted file mode 100644
index bb39cdb..0000000
--- a/src/com/android/settings/dashboard/profileselector/ProfileSelectStorageFragment.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.dashboard.profileselector;
-
-import android.os.Bundle;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.os.storage.VolumeInfo;
-
-import androidx.fragment.app.Fragment;
-
-import com.android.settings.R;
-import com.android.settings.Utils;
-import com.android.settings.deviceinfo.StorageDashboardFragment;
-import com.android.settings.deviceinfo.StorageProfileFragment;
-
-/**
- * Storage Setting page for personal/managed profile.
- */
-public class ProfileSelectStorageFragment extends ProfileSelectFragment {
-    @Override
-    public Fragment[] getFragments() {
-
-        final Bundle storageBundle = new Bundle();
-        storageBundle.putString(VolumeInfo.EXTRA_VOLUME_ID, VolumeInfo.ID_PRIVATE_INTERNAL);
-        storageBundle.putInt(EXTRA_PROFILE, ProfileSelectFragment.ProfileType.PERSONAL);
-
-        final Fragment storageDashboardFragment = new StorageDashboardFragment();
-        storageDashboardFragment.setArguments(storageBundle);
-
-        final UserHandle userHandle = Utils.getManagedProfile(UserManager.get(getActivity()));
-        if (userHandle != null) {
-            storageBundle.putInt(StorageProfileFragment.USER_ID_EXTRA, userHandle.getIdentifier());
-        }
-
-        final Fragment storageProfileFragment = new StorageProfileFragment();
-        storageProfileFragment.setArguments(storageBundle);
-
-        return new Fragment[]{
-                storageDashboardFragment,
-                storageProfileFragment
-        };
-    }
-
-    @Override
-    protected int getPreferenceScreenResId() {
-        return R.xml.storage_summary_donut;
-    }
-}
-
diff --git a/src/com/android/settings/development/BluetoothGabeldorschePreferenceController.java b/src/com/android/settings/development/BluetoothGabeldorschePreferenceController.java
new file mode 100644
index 0000000..48a3e95
--- /dev/null
+++ b/src/com/android/settings/development/BluetoothGabeldorschePreferenceController.java
@@ -0,0 +1,72 @@
+/*
+ * 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.development;
+
+import android.content.Context;
+import android.os.SystemProperties;
+
+import androidx.annotation.VisibleForTesting;
+import androidx.preference.Preference;
+import androidx.preference.SwitchPreference;
+
+import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settingslib.development.DeveloperOptionsPreferenceController;
+
+/**
+ * Preference controller for Bluetooth Gabeldorche feature
+ */
+public class BluetoothGabeldorschePreferenceController extends
+        DeveloperOptionsPreferenceController implements Preference.OnPreferenceChangeListener,
+        PreferenceControllerMixin {
+
+    private static final String BLUETOOTH_GABELDORSCHE_KEY =
+            "bluetooth_gabeldorsche_enable";
+    @VisibleForTesting
+    static final String BLUETOOTH_GABELDORSCHE_PROPERTY =
+            "bluetooth.gd.enabled";
+
+    public BluetoothGabeldorschePreferenceController(Context context) {
+        super(context);
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return BLUETOOTH_GABELDORSCHE_KEY;
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        final boolean isEnabled = (Boolean) newValue;
+        SystemProperties.set(BLUETOOTH_GABELDORSCHE_PROPERTY,
+                isEnabled ? "true" : "false");
+        return true;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        final boolean isEnabled = SystemProperties.getBoolean(
+                BLUETOOTH_GABELDORSCHE_PROPERTY, false /* default */);
+        ((SwitchPreference) mPreference).setChecked(isEnabled);
+    }
+
+    @Override
+    protected void onDeveloperOptionsSwitchDisabled() {
+        super.onDeveloperOptionsSwitchDisabled();
+        SystemProperties.set(BLUETOOTH_GABELDORSCHE_PROPERTY, "false");
+        ((SwitchPreference) mPreference).setChecked(false);
+    }
+}
diff --git a/src/com/android/settings/development/BugReportHandlerPreferenceController.java b/src/com/android/settings/development/BugReportHandlerPreferenceController.java
new file mode 100644
index 0000000..b95d31b
--- /dev/null
+++ b/src/com/android/settings/development/BugReportHandlerPreferenceController.java
@@ -0,0 +1,87 @@
+/*
+ * 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.development;
+
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.os.UserManager;
+import android.text.TextUtils;
+
+import androidx.annotation.VisibleForTesting;
+import androidx.preference.Preference;
+
+import com.android.settings.R;
+import com.android.settings.bugreporthandler.BugReportHandlerUtil;
+import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settingslib.development.DeveloperOptionsPreferenceController;
+
+/**
+ * PreferenceController for BugReportHandler
+ */
+public class BugReportHandlerPreferenceController extends DeveloperOptionsPreferenceController
+        implements PreferenceControllerMixin {
+
+    private static final String KEY_BUG_REPORT_HANDLER = "bug_report_handler";
+
+    private final UserManager mUserManager;
+    private final BugReportHandlerUtil mBugReportHandlerUtil;
+
+    public BugReportHandlerPreferenceController(Context context) {
+        super(context);
+        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
+        mBugReportHandlerUtil = new BugReportHandlerUtil();
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return !mUserManager.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)
+                && mBugReportHandlerUtil.isBugReportHandlerEnabled(mContext);
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_BUG_REPORT_HANDLER;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        final CharSequence currentBugReportHandlerAppLabel = getCurrentBugReportHandlerAppLabel();
+        if (!TextUtils.isEmpty(currentBugReportHandlerAppLabel)) {
+            mPreference.setSummary(currentBugReportHandlerAppLabel);
+        } else {
+            mPreference.setSummary(R.string.app_list_preference_none);
+        }
+    }
+
+    @VisibleForTesting
+    CharSequence getCurrentBugReportHandlerAppLabel() {
+        final String handlerApp = mBugReportHandlerUtil.getCurrentBugReportHandlerAppAndUser(
+                mContext).first;
+        if (BugReportHandlerUtil.SHELL_APP_PACKAGE.equals(handlerApp)) {
+            return mContext.getString(R.string.shell_app);
+        }
+        ApplicationInfo applicationInfo;
+        try {
+            applicationInfo = mContext.getPackageManager().getApplicationInfo(handlerApp,
+                    PackageManager.MATCH_ANY_USER);
+        } catch (PackageManager.NameNotFoundException e) {
+            return null;
+        }
+        return applicationInfo.loadLabel(mContext.getPackageManager());
+    }
+}
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index 8f1db0f..9387d52 100644
--- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -428,6 +428,7 @@
         final List<AbstractPreferenceController> controllers = new ArrayList<>();
         controllers.add(new MemoryUsagePreferenceController(context));
         controllers.add(new BugReportPreferenceController(context));
+        controllers.add(new BugReportHandlerPreferenceController(context));
         controllers.add(new SystemServerHeapDumpPreferenceController(context));
         controllers.add(new LocalBackupPasswordPreferenceController(context));
         controllers.add(new StayAwakePreferenceController(context, lifecycle));
@@ -462,6 +463,7 @@
         controllers.add(new TetheringHardwareAccelPreferenceController(context));
         controllers.add(new BluetoothDeviceNoNamePreferenceController(context));
         controllers.add(new BluetoothAbsoluteVolumePreferenceController(context));
+        controllers.add(new BluetoothGabeldorschePreferenceController(context));
         controllers.add(new BluetoothAvrcpVersionPreferenceController(context));
         controllers.add(new BluetoothA2dpHwOffloadPreferenceController(context, fragment));
         controllers.add(new BluetoothMaxConnectedAudioDevicesPreferenceController(context));
diff --git a/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorController.java b/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorController.java
index d99c7bf..9a86757 100644
--- a/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorController.java
+++ b/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorController.java
@@ -18,9 +18,11 @@
 import android.content.Context;
 import android.content.res.Configuration;
 import android.os.PowerManager;
+
 import androidx.preference.DropDownPreference;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceScreen;
+
 import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
 
@@ -33,7 +35,7 @@
     private final UiModeManager mUiModeManager;
     private PowerManager mPowerManager;
     private DropDownPreference mPreference;
-    private String mCurrentMode;
+    private int mCurrentMode;
 
     public DarkModeScheduleSelectorController(Context context, String key) {
         super(context, key);
@@ -44,8 +46,8 @@
     @Override
     public void displayPreference(PreferenceScreen screen) {
         super.displayPreference(screen);
-
         mPreference = screen.findPreference(getPreferenceKey());
+        init();
     }
 
     @Override
@@ -53,32 +55,35 @@
         return BasePreferenceController.AVAILABLE;
     }
 
-    @Override
-    public final void updateState(Preference preference) {
+    private void init() {
         final boolean batterySaver = mPowerManager.isPowerSaveMode();
         mPreference.setEnabled(!batterySaver);
-        mCurrentMode =
-                mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_AUTO
-                ? mContext.getString(R.string.dark_ui_auto_mode_auto)
-                : mContext.getString(R.string.dark_ui_auto_mode_never);
-        mPreference.setValue(mCurrentMode);
+        mCurrentMode = getCurrentMode();
+        mPreference.setValueIndex(mCurrentMode);
     }
+
+    private int getCurrentMode() {
+        final int resId = mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_AUTO
+                ? R.string.dark_ui_auto_mode_auto : R.string.dark_ui_auto_mode_never;
+        return mPreference.findIndexOfValue(mContext.getString(resId));
+    }
+
     @Override
     public final boolean onPreferenceChange(Preference preference, Object newValue) {
-        String newMode = (String) newValue;
+        final int newMode = mPreference.findIndexOfValue((String) newValue);
         if (newMode == mCurrentMode) {
             return false;
         }
         mCurrentMode = newMode;
-        if (mCurrentMode == mContext.getString(R.string.dark_ui_auto_mode_never)) {
+        if (mCurrentMode == mPreference.findIndexOfValue(
+                mContext.getString(R.string.dark_ui_auto_mode_never))) {
             boolean active = (mContext.getResources().getConfiguration().uiMode
                     & Configuration.UI_MODE_NIGHT_YES) != 0;
             int mode = active ? UiModeManager.MODE_NIGHT_YES
                     : UiModeManager.MODE_NIGHT_NO;
             mUiModeManager.setNightMode(mode);
-
-        } else if (mCurrentMode ==
-                mContext.getString(R.string.dark_ui_auto_mode_auto)) {
+        } else if (mCurrentMode == mPreference.findIndexOfValue(
+                mContext.getString(R.string.dark_ui_auto_mode_auto))) {
             mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_AUTO);
         }
         return true;
diff --git a/src/com/android/settings/gestures/SystemNavigationGestureSettings.java b/src/com/android/settings/gestures/SystemNavigationGestureSettings.java
index 0bd6b21..9e78388 100644
--- a/src/com/android/settings/gestures/SystemNavigationGestureSettings.java
+++ b/src/com/android/settings/gestures/SystemNavigationGestureSettings.java
@@ -258,9 +258,9 @@
 
     @VisibleForTesting
     static String getCurrentSystemNavigationMode(Context context) {
-        if (SystemNavigationPreferenceController.isEdgeToEdgeEnabled(context)) {
+        if (SystemNavigationPreferenceController.isGestureNavigationEnabled(context)) {
             return KEY_SYSTEM_NAV_GESTURAL;
-        } else if (SystemNavigationPreferenceController.isSwipeUpEnabled(context)) {
+        } else if (SystemNavigationPreferenceController.is2ButtonNavigationEnabled(context)) {
             return KEY_SYSTEM_NAV_2BUTTONS;
         } else {
             return KEY_SYSTEM_NAV_3BUTTONS;
diff --git a/src/com/android/settings/gestures/SystemNavigationPreferenceController.java b/src/com/android/settings/gestures/SystemNavigationPreferenceController.java
index d0d8155..ab83a9d 100644
--- a/src/com/android/settings/gestures/SystemNavigationPreferenceController.java
+++ b/src/com/android/settings/gestures/SystemNavigationPreferenceController.java
@@ -43,9 +43,9 @@
 
     @Override
     public CharSequence getSummary() {
-        if (isEdgeToEdgeEnabled(mContext)) {
+        if (isGestureNavigationEnabled(mContext)) {
             return mContext.getText(R.string.edge_to_edge_navigation_title);
-        } else if (isSwipeUpEnabled(mContext)) {
+        } else if (is2ButtonNavigationEnabled(mContext)) {
             return mContext.getText(R.string.swipe_up_to_switch_apps_title);
         } else {
             return mContext.getText(R.string.legacy_navigation_title);
@@ -86,15 +86,12 @@
         }
     }
 
-    static boolean isSwipeUpEnabled(Context context) {
-        if (isEdgeToEdgeEnabled(context)) {
-            return false;
-        }
+    static boolean is2ButtonNavigationEnabled(Context context) {
         return NAV_BAR_MODE_2BUTTON == context.getResources().getInteger(
                 com.android.internal.R.integer.config_navBarInteractionMode);
     }
 
-    static boolean isEdgeToEdgeEnabled(Context context) {
+    static boolean isGestureNavigationEnabled(Context context) {
         return NAV_BAR_MODE_GESTURAL == context.getResources().getInteger(
                 com.android.internal.R.integer.config_navBarInteractionMode);
     }
diff --git a/src/com/android/settings/language/UserDictionaryForWorkPreferenceController.java b/src/com/android/settings/language/UserDictionaryForWorkPreferenceController.java
deleted file mode 100644
index 99d1c2f..0000000
--- a/src/com/android/settings/language/UserDictionaryForWorkPreferenceController.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.language;
-
-import android.content.Context;
-
-import com.android.settings.core.BasePreferenceController;
-
-/**
- * Preference controller for "UserDictionary for work".
- *
- * @see UserDictionaryPreferenceController
- */
-public final class UserDictionaryForWorkPreferenceController
-        extends BasePreferenceController {
-
-    public UserDictionaryForWorkPreferenceController(Context context, String preferenceKey) {
-        super(context, preferenceKey);
-    }
-
-    @AvailabilityStatus
-    @Override
-    public int getAvailabilityStatus() {
-        return AVAILABLE;
-    }
-}
diff --git a/src/com/android/settings/location/LocationPersonalSettings.java b/src/com/android/settings/location/LocationPersonalSettings.java
index 503937e..92796a4 100644
--- a/src/com/android/settings/location/LocationPersonalSettings.java
+++ b/src/com/android/settings/location/LocationPersonalSettings.java
@@ -21,6 +21,7 @@
 
 import com.android.settings.R;
 import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
 
 /**
  * Location Setting page for personal profile.
@@ -49,9 +50,14 @@
         super.onAttach(context);
 
         use(AppLocationPermissionPreferenceController.class).init(this);
-        use(RecentLocationRequestPreferenceController.class).init(this);
         use(LocationServicePreferenceController.class).init(this);
         use(LocationFooterPreferenceController.class).init(this);
+
+        final int profileType = getArguments().getInt(ProfileSelectFragment.EXTRA_PROFILE);
+        final RecentLocationRequestPreferenceController controller = use(
+                RecentLocationRequestPreferenceController.class);
+        controller.init(this);
+        controller.setProfileType(profileType);
     }
 
     @Override
diff --git a/src/com/android/settings/location/LocationWorkProfileSettings.java b/src/com/android/settings/location/LocationWorkProfileSettings.java
index 2c52211..2bf5f98 100644
--- a/src/com/android/settings/location/LocationWorkProfileSettings.java
+++ b/src/com/android/settings/location/LocationWorkProfileSettings.java
@@ -21,6 +21,7 @@
 
 import com.android.settings.R;
 import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
 
 /**
  * Location Setting page for managed profile.
@@ -49,10 +50,15 @@
         super.onAttach(context);
 
         use(AppLocationPermissionPreferenceController.class).init(this);
-        use(RecentLocationRequestPreferenceController.class).init(this);
         use(LocationServiceForWorkPreferenceController.class).init(this);
         use(LocationFooterPreferenceController.class).init(this);
         use(LocationForWorkPreferenceController.class).init(this);
+
+        final int profileType = getArguments().getInt(ProfileSelectFragment.EXTRA_PROFILE);
+        final RecentLocationRequestPreferenceController controller = use(
+                RecentLocationRequestPreferenceController.class);
+        controller.init(this);
+        controller.setProfileType(profileType);
     }
 
     @Override
diff --git a/src/com/android/settings/location/RecentLocationRequestPreferenceController.java b/src/com/android/settings/location/RecentLocationRequestPreferenceController.java
index 515df46..d647826 100644
--- a/src/com/android/settings/location/RecentLocationRequestPreferenceController.java
+++ b/src/com/android/settings/location/RecentLocationRequestPreferenceController.java
@@ -16,6 +16,7 @@
 import android.content.Context;
 import android.os.Bundle;
 import android.os.UserHandle;
+import android.os.UserManager;
 
 import androidx.annotation.VisibleForTesting;
 import androidx.preference.Preference;
@@ -26,15 +27,20 @@
 import com.android.settings.applications.appinfo.AppInfoDashboardFragment;
 import com.android.settings.core.SubSettingLauncher;
 import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
 import com.android.settingslib.location.RecentLocationApps;
 import com.android.settingslib.widget.apppreference.AppPreference;
 
+import java.util.ArrayList;
 import java.util.List;
 
 public class RecentLocationRequestPreferenceController extends LocationBasePreferenceController {
 
-    private final RecentLocationApps mRecentLocationApps;
+    public static final int MAX_APPS = 3;
+    @VisibleForTesting
+    RecentLocationApps mRecentLocationApps;
     private PreferenceCategory mCategoryRecentLocationRequests;
+    private int mType = ProfileSelectFragment.ProfileType.ALL;
 
     /** Used in this class and {@link RecentLocationRequestSeeAllPreferenceController} */
     static class PackageEntryClickedListener implements Preference.OnPreferenceClickListener {
@@ -75,23 +81,27 @@
         super.displayPreference(screen);
         mCategoryRecentLocationRequests = screen.findPreference(getPreferenceKey());
         final Context prefContext = mCategoryRecentLocationRequests.getContext();
-        final List<RecentLocationApps.Request> recentLocationRequests =
-                mRecentLocationApps.getAppListSorted(false);
-        if (recentLocationRequests.size() > 3) {
-            // Display the top 3 preferences to container in original order.
-            for (int i = 0; i < 3; i++) {
-                mCategoryRecentLocationRequests.addPreference(
-                        createAppPreference(prefContext, recentLocationRequests.get(i)));
+        final List<RecentLocationApps.Request> recentLocationRequests = new ArrayList<>();
+        final UserManager userManager = UserManager.get(mContext);
+        for (RecentLocationApps.Request request : mRecentLocationApps.getAppListSorted(
+                false /* systemApps */)) {
+            if (isRequestMatchesProfileType(userManager, request, mType)) {
+                recentLocationRequests.add(request);
+                if (recentLocationRequests.size() == MAX_APPS) {
+                    break;
+                }
             }
-        } else if (recentLocationRequests.size() > 0) {
+        }
+
+        if (recentLocationRequests.size() > 0) {
             // Add preferences to container in original order (already sorted by recency).
             for (RecentLocationApps.Request request : recentLocationRequests) {
                 mCategoryRecentLocationRequests.addPreference(
-                        createAppPreference(prefContext, request));
+                        createAppPreference(prefContext, request, mFragment));
             }
         } else {
             // If there's no item to display, add a "No recent apps" item.
-            final Preference banner = createAppPreference(prefContext);
+            final Preference banner = new AppPreference(prefContext);
             banner.setTitle(R.string.location_no_recent_apps);
             banner.setSelectable(false);
             mCategoryRecentLocationRequests.addPreference(banner);
@@ -103,19 +113,42 @@
         mCategoryRecentLocationRequests.setEnabled(mLocationEnabler.isEnabled(mode));
     }
 
-    @VisibleForTesting
-    AppPreference createAppPreference(Context prefContext) {
-        return new AppPreference(prefContext);
+    /**
+     * Initialize {@link ProfileSelectFragment.ProfileType} of the controller
+     *
+     * @param type {@link ProfileSelectFragment.ProfileType} of the controller.
+     */
+    public void setProfileType(@ProfileSelectFragment.ProfileType int type) {
+        mType = type;
     }
 
-    @VisibleForTesting
-    AppPreference createAppPreference(Context prefContext, RecentLocationApps.Request request) {
-        final AppPreference pref = createAppPreference(prefContext);
-        pref.setSummary(request.contentDescription);
+    /**
+     * Create a {@link AppPreference}
+     */
+    public static AppPreference createAppPreference(Context prefContext,
+            RecentLocationApps.Request request, DashboardFragment fragment) {
+        final AppPreference pref = new AppPreference(prefContext);
         pref.setIcon(request.icon);
         pref.setTitle(request.label);
         pref.setOnPreferenceClickListener(new PackageEntryClickedListener(
-                mFragment, request.packageName, request.userHandle));
+                fragment, request.packageName, request.userHandle));
         return pref;
     }
+
+    /**
+     * Return if the {@link RecentLocationApps.Request} matches current UI
+     * {@ProfileSelectFragment.ProfileType}
+     */
+    public static boolean isRequestMatchesProfileType(UserManager userManager,
+            RecentLocationApps.Request request, @ProfileSelectFragment.ProfileType int type) {
+        final boolean isWorkProfile = userManager.isManagedProfile(
+                request.userHandle.getIdentifier());
+        if (isWorkProfile && (type & ProfileSelectFragment.ProfileType.WORK) != 0) {
+            return true;
+        }
+        if (!isWorkProfile && (type & ProfileSelectFragment.ProfileType.PERSONAL) != 0) {
+            return true;
+        }
+        return false;
+    }
 }
diff --git a/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java b/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java
index fc2a5fe..48a6aec 100644
--- a/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java
+++ b/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java
@@ -23,6 +23,7 @@
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.settings.R;
 import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
 import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settingslib.search.SearchIndexable;
 
@@ -49,9 +50,11 @@
     @Override
     public void onAttach(Context context) {
         super.onAttach(context);
+        final int profileType = getArguments().getInt(ProfileSelectFragment.EXTRA_PROFILE);
 
         mController = use(RecentLocationRequestSeeAllPreferenceController.class);
         mController.init(this);
+        mController.setProfileType(profileType);
     }
 
     @Override
diff --git a/src/com/android/settings/location/RecentLocationRequestSeeAllPreferenceController.java b/src/com/android/settings/location/RecentLocationRequestSeeAllPreferenceController.java
index 4ed9d13..df0fa40 100644
--- a/src/com/android/settings/location/RecentLocationRequestSeeAllPreferenceController.java
+++ b/src/com/android/settings/location/RecentLocationRequestSeeAllPreferenceController.java
@@ -15,16 +15,21 @@
  */
 package com.android.settings.location;
 
-import android.content.Context;
+import static com.android.settings.location.RecentLocationRequestPreferenceController.createAppPreference;
+import static com.android.settings.location.RecentLocationRequestPreferenceController.isRequestMatchesProfileType;
 
-import androidx.annotation.VisibleForTesting;
+import android.content.Context;
+import android.os.UserManager;
+
 import androidx.preference.Preference;
 import androidx.preference.PreferenceScreen;
 
 import com.android.settings.R;
+import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
 import com.android.settingslib.location.RecentLocationApps;
 import com.android.settingslib.widget.apppreference.AppPreference;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /** Preference controller for preference category displaying all recent location requests. */
@@ -35,6 +40,7 @@
     private RecentLocationApps mRecentLocationApps;
     private boolean mShowSystem = false;
     private Preference mPreference;
+    private int mType = ProfileSelectFragment.ProfileType.ALL;
 
     public RecentLocationRequestSeeAllPreferenceController(Context context, String key) {
         super(context, key);
@@ -56,33 +62,39 @@
     public void updateState(Preference preference) {
         mCategoryAllRecentLocationRequests.removeAll();
         mPreference = preference;
-        List<RecentLocationApps.Request> requests = mRecentLocationApps.getAppListSorted(
-                mShowSystem);
-        if (requests.isEmpty()) {
+
+        final UserManager userManager = UserManager.get(mContext);
+        final List<RecentLocationApps.Request> recentLocationRequests = new ArrayList<>();
+        for (RecentLocationApps.Request request : mRecentLocationApps.getAppListSorted(
+                mShowSystem)) {
+            if (isRequestMatchesProfileType(userManager, request, mType)) {
+                recentLocationRequests.add(request);
+            }
+        }
+
+        if (recentLocationRequests.isEmpty()) {
             // If there's no item to display, add a "No recent apps" item.
             final Preference banner = new AppPreference(mContext);
             banner.setTitle(R.string.location_no_recent_apps);
             banner.setSelectable(false);
             mCategoryAllRecentLocationRequests.addPreference(banner);
         } else {
-            for (RecentLocationApps.Request request : requests) {
-                Preference appPreference = createAppPreference(preference.getContext(), request);
+            for (RecentLocationApps.Request request : recentLocationRequests) {
+                final Preference appPreference = createAppPreference(
+                        preference.getContext(),
+                        request, mFragment);
                 mCategoryAllRecentLocationRequests.addPreference(appPreference);
             }
         }
     }
 
-    @VisibleForTesting
-    AppPreference createAppPreference(
-            Context prefContext, RecentLocationApps.Request request) {
-        final AppPreference pref = new AppPreference(prefContext);
-        pref.setSummary(request.contentDescription);
-        pref.setIcon(request.icon);
-        pref.setTitle(request.label);
-        pref.setOnPreferenceClickListener(
-                new RecentLocationRequestPreferenceController.PackageEntryClickedListener(
-                        mFragment, request.packageName, request.userHandle));
-        return pref;
+    /**
+     * Initialize {@link ProfileSelectFragment.ProfileType} of the controller
+     *
+     * @param type {@link ProfileSelectFragment.ProfileType} of the controller.
+     */
+    public void setProfileType(@ProfileSelectFragment.ProfileType int type) {
+        mType = type;
     }
 
     public void setShowSystem(boolean showSystem) {
diff --git a/src/com/android/settings/network/ApnEditor.java b/src/com/android/settings/network/ApnEditor.java
index 455a4da..fa0d6a4 100644
--- a/src/com/android/settings/network/ApnEditor.java
+++ b/src/com/android/settings/network/ApnEditor.java
@@ -27,7 +27,6 @@
 import android.os.PersistableBundle;
 import android.provider.Telephony;
 import android.telephony.CarrierConfigManager;
-import android.telephony.ServiceState;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
@@ -1025,7 +1024,7 @@
                 bearerBitmask = 0;
                 break;
             } else {
-                bearerBitmask |= ServiceState.getBitmaskForTech(Integer.parseInt(bearer));
+                bearerBitmask |= getBitmaskForTech(Integer.parseInt(bearer));
             }
         }
         callUpdate = setIntValueAndCheckIfDiff(values,
@@ -1037,7 +1036,7 @@
         int bearerVal;
         if (bearerBitmask == 0 || mBearerInitialVal == 0) {
             bearerVal = 0;
-        } else if (ServiceState.bitmaskHasTech(bearerBitmask, mBearerInitialVal)) {
+        } else if (bitmaskHasTech(bearerBitmask, mBearerInitialVal)) {
             bearerVal = mBearerInitialVal;
         } else {
             // bearer field was being used but bitmask has changed now and does not include the
@@ -1329,4 +1328,20 @@
             return (String) mData[index];
         }
     }
+
+    private static int getBitmaskForTech(int radioTech) {
+        if (radioTech >= 1) {
+            return (1 << (radioTech - 1));
+        }
+        return 0;
+    }
+
+    private static boolean bitmaskHasTech(int bearerBitmask, int radioTech) {
+        if (bearerBitmask == 0) {
+            return true;
+        } else if (radioTech >= 1) {
+            return ((bearerBitmask & (1 << (radioTech - 1))) != 0);
+        }
+        return false;
+    }
 }
diff --git a/src/com/android/settings/network/ApnSettings.java b/src/com/android/settings/network/ApnSettings.java
index 137abadf..b34c28d 100755
--- a/src/com/android/settings/network/ApnSettings.java
+++ b/src/com/android/settings/network/ApnSettings.java
@@ -152,9 +152,9 @@
                 if (!mRestoreDefaultApnMode) {
                     int extraSubId = intent.getIntExtra(TelephonyManager.EXTRA_SUBSCRIPTION_ID,
                             SubscriptionManager.INVALID_SUBSCRIPTION_ID);
-                    if (SubscriptionManager.isValidSubscriptionId(extraSubId) &&
-                            mPhoneId == SubscriptionManager.getPhoneId(extraSubId) &&
-                            extraSubId != mSubId) {
+                    if (SubscriptionManager.isValidSubscriptionId(extraSubId)
+                            && mPhoneId == SubscriptionUtil.getPhoneId(context, extraSubId)
+                            && extraSubId != mSubId) {
                         // subscription has changed
                         mSubId = extraSubId;
                         mSubscriptionInfo = getSubscriptionInfo(mSubId);
@@ -185,7 +185,7 @@
         final Activity activity = getActivity();
         mSubId = activity.getIntent().getIntExtra(SUB_ID,
                 SubscriptionManager.INVALID_SUBSCRIPTION_ID);
-        mPhoneId = SubscriptionManager.getPhoneId(mSubId);
+        mPhoneId = SubscriptionUtil.getPhoneId(activity, mSubId);
         mIntentFilter = new IntentFilter(
                 TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED);
         mIntentFilter.addAction(TelephonyManager.ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED);
diff --git a/src/com/android/settings/network/SubscriptionUtil.java b/src/com/android/settings/network/SubscriptionUtil.java
index 8c6ac4e..7e355c4 100644
--- a/src/com/android/settings/network/SubscriptionUtil.java
+++ b/src/com/android/settings/network/SubscriptionUtil.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.network;
 
+import static android.telephony.SubscriptionManager.INVALID_SIM_SLOT_INDEX;
 import static android.telephony.UiccSlotInfo.CARD_STATE_INFO_PRESENT;
 
 import static com.android.internal.util.CollectionUtils.emptyIfNull;
@@ -120,4 +121,20 @@
     public static boolean showToggleForPhysicalSim(SubscriptionManager subMgr) {
         return subMgr.canDisablePhysicalSubscription();
     }
+
+    /**
+     * Get phoneId or logical slot index for a subId if active, or INVALID_PHONE_INDEX if inactive.
+     */
+    public static int getPhoneId(Context context, int subId) {
+        SubscriptionManager subManager = (SubscriptionManager)
+                context.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
+        if (subManager == null) {
+            return INVALID_SIM_SLOT_INDEX;
+        }
+        SubscriptionInfo info = subManager.getActiveSubscriptionInfo(subId);
+        if (info == null) {
+            return INVALID_SIM_SLOT_INDEX;
+        }
+        return info.getSimSlotIndex();
+    }
 }
diff --git a/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java b/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java
index 668f763..eabebd1 100644
--- a/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java
+++ b/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java
@@ -32,6 +32,7 @@
 import androidx.preference.SwitchPreference;
 
 import com.android.ims.ImsManager;
+import com.android.settings.network.SubscriptionUtil;
 import com.android.settingslib.core.lifecycle.LifecycleObserver;
 import com.android.settingslib.core.lifecycle.events.OnStart;
 import com.android.settingslib.core.lifecycle.events.OnStop;
@@ -75,7 +76,8 @@
         mSubId = subId;
         mCarrierConfig = mCarrierConfigManager.getConfigForSubId(mSubId);
         if (mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
-            mImsManager = ImsManager.getInstance(mContext, SubscriptionManager.getPhoneId(mSubId));
+            mImsManager = ImsManager.getInstance(mContext, SubscriptionUtil.getPhoneId(
+                    mContext, mSubId));
         }
 
         final boolean show4GForLTE = mCarrierConfig.getBoolean(
diff --git a/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java b/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java
index c03f942..9c5069b 100644
--- a/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java
+++ b/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java
@@ -42,6 +42,7 @@
 import com.android.ims.ImsManager;
 import com.android.settings.R;
 import com.android.settings.Utils;
+import com.android.settings.network.SubscriptionUtil;
 import com.android.settings.slices.CustomSliceRegistry;
 import com.android.settings.slices.SliceBroadcastReceiver;
 
@@ -188,7 +189,7 @@
     }
 
     protected ImsManager getImsManager(int subId) {
-        return ImsManager.getInstance(mContext, SubscriptionManager.getPhoneId(subId));
+        return ImsManager.getInstance(mContext, SubscriptionUtil.getPhoneId(mContext, subId));
     }
 
     @VisibleForTesting
diff --git a/src/com/android/settings/network/telephony/VideoCallingPreferenceController.java b/src/com/android/settings/network/telephony/VideoCallingPreferenceController.java
index 9aa390c..37cfc07 100644
--- a/src/com/android/settings/network/telephony/VideoCallingPreferenceController.java
+++ b/src/com/android/settings/network/telephony/VideoCallingPreferenceController.java
@@ -33,6 +33,7 @@
 
 import com.android.ims.ImsManager;
 import com.android.settings.network.MobileDataEnabledListener;
+import com.android.settings.network.SubscriptionUtil;
 import com.android.settingslib.core.lifecycle.LifecycleObserver;
 import com.android.settingslib.core.lifecycle.events.OnStart;
 import com.android.settingslib.core.lifecycle.events.OnStop;
@@ -119,7 +120,8 @@
     public VideoCallingPreferenceController init(int subId) {
         mSubId = subId;
         if (mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
-            mImsManager = ImsManager.getInstance(mContext, SubscriptionManager.getPhoneId(mSubId));
+            mImsManager = ImsManager.getInstance(mContext,
+                    SubscriptionUtil.getPhoneId(mContext, mSubId));
         }
 
         return this;
@@ -127,7 +129,7 @@
 
     private boolean isVideoCallEnabled(int subId) {
         final ImsManager imsManager = subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID
-                ? ImsManager.getInstance(mContext, SubscriptionManager.getPhoneId(subId))
+                ? ImsManager.getInstance(mContext, SubscriptionUtil.getPhoneId(mContext, subId))
                 : null;
         return isVideoCallEnabled(subId, imsManager);
     }
diff --git a/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java b/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java
index 3f77059..9c9bf2f 100644
--- a/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java
+++ b/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java
@@ -36,6 +36,7 @@
 
 import com.android.ims.ImsManager;
 import com.android.settings.R;
+import com.android.settings.network.SubscriptionUtil;
 import com.android.settingslib.core.lifecycle.LifecycleObserver;
 import com.android.settingslib.core.lifecycle.events.OnStart;
 import com.android.settingslib.core.lifecycle.events.OnStop;
@@ -156,7 +157,8 @@
 
     public WifiCallingPreferenceController init(int subId) {
         mSubId = subId;
-        mImsManager = ImsManager.getInstance(mContext, SubscriptionManager.getPhoneId(mSubId));
+        mImsManager = ImsManager.getInstance(mContext,
+                SubscriptionUtil.getPhoneId(mContext, mSubId));
         mImsMmTelManager = getImsMmTelManager(mSubId);
         mSimCallManager = mContext.getSystemService(TelecomManager.class)
                 .getSimCallManagerForSubscription(mSubId);
diff --git a/src/com/android/settings/overlay/FeatureFactory.java b/src/com/android/settings/overlay/FeatureFactory.java
index d9af345..afbce09 100644
--- a/src/com/android/settings/overlay/FeatureFactory.java
+++ b/src/com/android/settings/overlay/FeatureFactory.java
@@ -26,6 +26,7 @@
 import com.android.settings.accounts.AccountFeatureProvider;
 import com.android.settings.applications.ApplicationFeatureProvider;
 import com.android.settings.aware.AwareFeatureProvider;
+import com.android.settings.biometrics.face.FaceFeatureProvider;
 import com.android.settings.bluetooth.BluetoothFeatureProvider;
 import com.android.settings.dashboard.DashboardFeatureProvider;
 import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
@@ -133,6 +134,8 @@
 
     public abstract AwareFeatureProvider getAwareFeatureProvider();
 
+    public abstract FaceFeatureProvider getFaceFeatureProvider();
+
     public static final class FactoryNotFoundException extends RuntimeException {
         public FactoryNotFoundException(Throwable throwable) {
             super("Unable to create factory. Did you misconfigure Proguard?", throwable);
diff --git a/src/com/android/settings/overlay/FeatureFactoryImpl.java b/src/com/android/settings/overlay/FeatureFactoryImpl.java
index 2f9626d..29beb5b 100644
--- a/src/com/android/settings/overlay/FeatureFactoryImpl.java
+++ b/src/com/android/settings/overlay/FeatureFactoryImpl.java
@@ -30,6 +30,8 @@
 import com.android.settings.applications.ApplicationFeatureProviderImpl;
 import com.android.settings.aware.AwareFeatureProvider;
 import com.android.settings.aware.AwareFeatureProviderImpl;
+import com.android.settings.biometrics.face.FaceFeatureProvider;
+import com.android.settings.biometrics.face.FaceFeatureProviderImpl;
 import com.android.settings.bluetooth.BluetoothFeatureProvider;
 import com.android.settings.bluetooth.BluetoothFeatureProviderImpl;
 import com.android.settings.connecteddevice.dock.DockUpdaterFeatureProviderImpl;
@@ -84,6 +86,7 @@
     private ContextualCardFeatureProvider mContextualCardFeatureProvider;
     private BluetoothFeatureProvider mBluetoothFeatureProvider;
     private AwareFeatureProvider mAwareFeatureProvider;
+    private FaceFeatureProvider mFaceFeatureProvider;
 
     @Override
     public SupportFeatureProvider getSupportFeatureProvider(Context context) {
@@ -255,4 +258,12 @@
         }
         return mAwareFeatureProvider;
     }
+
+    @Override
+    public FaceFeatureProvider getFaceFeatureProvider() {
+        if (mFaceFeatureProvider == null) {
+            mFaceFeatureProvider = new FaceFeatureProviderImpl();
+        }
+        return mFaceFeatureProvider;
+    }
 }
diff --git a/src/com/android/settings/slices/SliceBuilderUtils.java b/src/com/android/settings/slices/SliceBuilderUtils.java
index 00d7950..59a1768 100644
--- a/src/com/android/settings/slices/SliceBuilderUtils.java
+++ b/src/com/android/settings/slices/SliceBuilderUtils.java
@@ -73,6 +73,8 @@
      * {@param sliceData} is an inline controller.
      */
     public static Slice buildSlice(Context context, SliceData sliceData) {
+        // Reload theme for switching dark mode on/off
+        context.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */);
         Log.d(TAG, "Creating slice for: " + sliceData.getPreferenceController());
         final BasePreferenceController controller = getPreferenceController(context, sliceData);
         FeatureFactory.getFactory(context).getMetricsFeatureProvider()
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java
index 5065ccb..05fcf5e 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -347,18 +347,11 @@
                 showProxyFields();
                 final CheckBox advancedTogglebox =
                         (CheckBox) mView.findViewById(R.id.wifi_advanced_togglebox);
-                mView.findViewById(R.id.wifi_advanced_toggle).setVisibility(
-                        mAccessPoint.isCarrierAp() ? View.GONE : View.VISIBLE);
                 advancedTogglebox.setOnCheckedChangeListener(this);
                 advancedTogglebox.setChecked(showAdvancedFields);
                 setAdvancedOptionAccessibilityString(showAdvancedFields);
                 mView.findViewById(R.id.wifi_advanced_fields)
                         .setVisibility(showAdvancedFields ? View.VISIBLE : View.GONE);
-                if (mAccessPoint.isCarrierAp()) {
-                    addRow(group, R.string.wifi_carrier_connect,
-                            String.format(mContext.getString(R.string.wifi_carrier_content),
-                            mAccessPoint.getCarrierName()));
-                }
             }
 
             if (mMode == WifiConfigUiBase.MODE_MODIFY) {
@@ -1068,12 +1061,6 @@
             }
         }
 
-        if (mAccessPointSecurity != AccessPoint.SECURITY_EAP_SUITE_B
-                && mAccessPoint != null
-                && mAccessPoint.isCarrierAp()) {
-            mEapMethodSpinner.setSelection(mAccessPoint.getCarrierApEapType());
-        }
-
         if (refreshCertificates) {
             loadCertificates(
                     mEapCaCertSpinner,
@@ -1263,9 +1250,6 @@
                 setUserCertInvisible();
                 setPasswordInvisible();
                 setIdentityInvisible();
-                if (mAccessPoint != null && mAccessPoint.isCarrierAp()) {
-                    setEapMethodInvisible();
-                }
                 break;
         }
 
diff --git a/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java b/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java
index 025375c..5f26e2d 100644
--- a/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java
+++ b/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java
@@ -55,6 +55,7 @@
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.Utils;
 import com.android.settings.core.SubSettingLauncher;
+import com.android.settings.network.SubscriptionUtil;
 import com.android.settings.network.telephony.MobileNetworkUtils;
 import com.android.settings.widget.SwitchBar;
 
@@ -246,7 +247,8 @@
 
     @VisibleForTesting
     ImsManager getImsManager() {
-        return ImsManager.getInstance(getActivity(), SubscriptionManager.getPhoneId(mSubId));
+        return ImsManager.getInstance(getActivity(),
+                SubscriptionUtil.getPhoneId(getActivity(), mSubId));
     }
 
     @VisibleForTesting
diff --git a/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java b/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
index 967146c..8ca9d5f 100644
--- a/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
+++ b/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
@@ -46,6 +46,7 @@
 import com.android.ims.ImsManager;
 import com.android.settings.R;
 import com.android.settings.Utils;
+import com.android.settings.network.SubscriptionUtil;
 import com.android.settings.network.telephony.MobileNetworkUtils;
 import com.android.settings.slices.SliceBroadcastReceiver;
 
@@ -364,7 +365,7 @@
     }
 
     protected ImsManager getImsManager(int subId) {
-        return ImsManager.getInstance(mContext, SubscriptionManager.getPhoneId(subId));
+        return ImsManager.getInstance(mContext, SubscriptionUtil.getPhoneId(mContext, subId));
     }
 
     protected ImsMmTelManager getImsMmTelManager(int subId) {
diff --git a/tests/robotests/assets/grandfather_not_implementing_index_provider b/tests/robotests/assets/grandfather_not_implementing_index_provider
index 013e596..f836e64 100644
--- a/tests/robotests/assets/grandfather_not_implementing_index_provider
+++ b/tests/robotests/assets/grandfather_not_implementing_index_provider
@@ -1,5 +1,4 @@
 com.android.settings.accessibility.AccessibilitySettingsForSetupWizard
-com.android.settings.accessibility.CaptionPropertiesFragment
 com.android.settings.accessibility.ToggleAccessibilityServicePreferenceFragment
 com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragment
 com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragmentForSetupWizard
diff --git a/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java b/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java
index 6bade98..9bc3080 100644
--- a/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java
+++ b/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java
@@ -29,6 +29,7 @@
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -62,6 +63,7 @@
     }
 
     @Test
+    @Ignore
     public void testResetNetworkData_resetEsim() {
         mResetNetworkConfirm.mEraseEsim = true;
 
@@ -72,6 +74,7 @@
     }
 
     @Test
+    @Ignore
     public void testResetNetworkData_notResetEsim() {
         mResetNetworkConfirm.mEraseEsim = false;
 
diff --git a/tests/robotests/src/com/android/settings/accessibility/DaltonizerPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/DaltonizerPreferenceControllerTest.java
index 86520a8..62eb074 100644
--- a/tests/robotests/src/com/android/settings/accessibility/DaltonizerPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/DaltonizerPreferenceControllerTest.java
@@ -18,100 +18,57 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.ContentResolver;
 import android.content.Context;
 import android.provider.Settings;
 
-import androidx.preference.Preference;
-import androidx.preference.PreferenceScreen;
-
-import com.android.settingslib.core.lifecycle.Lifecycle;
-import com.android.settingslib.widget.RadioButtonPreference;
+import com.android.settings.R;
 
 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;
 
 @RunWith(RobolectricTestRunner.class)
-public class DaltonizerPreferenceControllerTest implements
-        DaltonizerPreferenceController.OnChangeListener {
-    private static final String PREF_KEY = "daltonizer_mode_protanomaly";
-    private static final String PREF_VALUE = "11";
-    private static final String PREF_FAKE_VALUE = "-1";
+public class DaltonizerPreferenceControllerTest {
+    private static final String PREF_KEY = "daltonizer_preference";
+    private static final int ON = 1;
+    private static final int OFF = 0;
+    private static final String DALTONIZER_VALUE = "11";
 
-    private DaltonizerPreferenceController mController;
-
-    @Mock
-    private RadioButtonPreference mMockPref;
     private Context mContext;
-    private ContentResolver mContentResolver;
-
-    @Mock
-    private PreferenceScreen mScreen;
+    private DaltonizerPreferenceController mController;
 
     @Before
     public void setUp() {
-        MockitoAnnotations.initMocks(this);
         mContext = RuntimeEnvironment.application;
-        mController = new DaltonizerPreferenceController(mContext, mock(Lifecycle.class), PREF_KEY);
-        mController.setOnChangeListener(this);
-        mContentResolver = mContext.getContentResolver();
-
-        when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mMockPref);
-        when(mMockPref.getKey()).thenReturn(PREF_KEY);
-        mController.displayPreference(mScreen);
-    }
-
-    @Override
-    public void onCheckedChanged(Preference preference) {
-        mController.updateState(preference);
+        mController = new DaltonizerPreferenceController(mContext, PREF_KEY);
     }
 
     @Test
-    public void isAvailable() {
-        assertThat(mController.isAvailable()).isTrue();
+    public void getSummary_enabledColorCorrection_shouldReturnOnSummary() {
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, ON);
+
+        assertThat(mController.getSummary().toString().contains(
+                mContext.getText(R.string.accessibility_feature_state_on))).isTrue();
     }
 
     @Test
-    public void updateState_notChecked() {
-        Settings.Secure.putString(mContentResolver,
-                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, PREF_FAKE_VALUE);
+    public void getSummary_disabledColorCorrection_shouldReturnOffSummary() {
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, OFF);
 
-        mController.updateState(mMockPref);
-
-        // the first checked state is set to false by control
-        verify(mMockPref, atLeastOnce()).setChecked(false);
-        verify(mMockPref, never()).setChecked(true);
+        assertThat(mController.getSummary().toString().contains(
+                mContext.getText(R.string.accessibility_feature_state_off))).isTrue();
     }
 
     @Test
-    public void updateState_checked() {
-        Settings.Secure.putString(mContentResolver,
-                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, PREF_VALUE);
+    public void getSummary_selectProtanomaly_shouldReturnProtanomalySummary() {
+        Settings.Secure.putString(mContext.getContentResolver(),
+                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, DALTONIZER_VALUE);
 
-        mController.updateState(mMockPref);
-
-        // the first checked state is set to false by control
-        verify(mMockPref, atLeastOnce()).setChecked(false);
-        verify(mMockPref, atLeastOnce()).setChecked(true);
-    }
-
-    @Test
-    public void onRadioButtonClick_shouldReturnDaltonizerValue() {
-        mController.onRadioButtonClicked(mMockPref);
-        final String accessibilityDaltonizerValue = Settings.Secure.getString(mContentResolver,
-                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER);
-
-        assertThat(accessibilityDaltonizerValue).isEqualTo(PREF_VALUE);
+        assertThat(mController.getSummary().toString().contains(
+                mContext.getText(R.string.daltonizer_mode_protanomaly))).isTrue();
     }
 }
diff --git a/tests/robotests/src/com/android/settings/accessibility/DaltonizerRadioButtonPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/DaltonizerRadioButtonPreferenceControllerTest.java
new file mode 100644
index 0000000..5ec4bf4
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/DaltonizerRadioButtonPreferenceControllerTest.java
@@ -0,0 +1,116 @@
+/*
+ * 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.accessibility;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settingslib.core.lifecycle.Lifecycle;
+import com.android.settingslib.widget.RadioButtonPreference;
+
+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;
+
+@RunWith(RobolectricTestRunner.class)
+public class DaltonizerRadioButtonPreferenceControllerTest implements
+        DaltonizerRadioButtonPreferenceController.OnChangeListener {
+    private static final String PREF_KEY = "daltonizer_mode_protanomaly";
+    private static final String PREF_VALUE = "11";
+    private static final String PREF_FAKE_VALUE = "-1";
+
+    private DaltonizerRadioButtonPreferenceController mController;
+
+    @Mock
+    private RadioButtonPreference mMockPref;
+    private Context mContext;
+
+    @Mock
+    private PreferenceScreen mScreen;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = RuntimeEnvironment.application;
+        mController = new DaltonizerRadioButtonPreferenceController(mContext, mock(Lifecycle.class),
+                PREF_KEY);
+        mController.setOnChangeListener(this);
+
+        when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mMockPref);
+        when(mMockPref.getKey()).thenReturn(PREF_KEY);
+        mController.displayPreference(mScreen);
+    }
+
+    @Override
+    public void onCheckedChanged(Preference preference) {
+        mController.updateState(preference);
+    }
+
+    @Test
+    public void isAvailable() {
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    public void updateState_notChecked() {
+        Settings.Secure.putString(mContext.getContentResolver(),
+                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, PREF_FAKE_VALUE);
+
+        mController.updateState(mMockPref);
+
+        // the first checked state is set to false by control
+        verify(mMockPref, atLeastOnce()).setChecked(false);
+        verify(mMockPref, never()).setChecked(true);
+    }
+
+    @Test
+    public void updateState_checked() {
+        Settings.Secure.putString(mContext.getContentResolver(),
+                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, PREF_VALUE);
+
+        mController.updateState(mMockPref);
+
+        // the first checked state is set to false by control
+        verify(mMockPref, atLeastOnce()).setChecked(false);
+        verify(mMockPref, atLeastOnce()).setChecked(true);
+    }
+
+    @Test
+    public void onRadioButtonClick_shouldReturnDaltonizerValue() {
+        mController.onRadioButtonClicked(mMockPref);
+        final String accessibilityDaltonizerValue = Settings.Secure.getString(
+                mContext.getContentResolver(),
+                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER);
+
+        assertThat(accessibilityDaltonizerValue).isEqualTo(PREF_VALUE);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/bugreporthandler/BugReportHandlerPickerTest.java b/tests/robotests/src/com/android/settings/bugreporthandler/BugReportHandlerPickerTest.java
new file mode 100644
index 0000000..fb48ad1
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/bugreporthandler/BugReportHandlerPickerTest.java
@@ -0,0 +1,177 @@
+/*
+ * 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.bugreporthandler;
+
+import static android.provider.Settings.ACTION_BUGREPORT_HANDLER_SETTINGS;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.graphics.drawable.ColorDrawable;
+import android.util.Pair;
+
+import androidx.fragment.app.FragmentActivity;
+
+import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
+import com.android.settingslib.widget.RadioButtonPreference;
+
+import org.junit.After;
+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;
+import org.robolectric.shadows.ShadowPackageManager;
+import org.robolectric.util.ReflectionHelpers;
+
+import java.util.Collections;
+
+@RunWith(RobolectricTestRunner.class)
+public class BugReportHandlerPickerTest {
+    private static final String PACKAGE_NAME = "com.example.test";
+    private static final int USER_ID = 0;
+
+    @Mock
+    private FragmentActivity mActivity;
+
+    private Context mContext;
+    private ShadowPackageManager mPackageManager;
+    private BugReportHandlerPicker mPicker;
+    private BugReportHandlerUtil mBugReportHandlerUtil;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application);
+        mPackageManager = Shadows.shadowOf(mContext.getPackageManager());
+
+        final ApplicationInfo applicationInfo = new ApplicationInfo();
+        applicationInfo.name = PACKAGE_NAME;
+        applicationInfo.uid = 0;
+        applicationInfo.flags = 0;
+        applicationInfo.packageName = PACKAGE_NAME;
+
+        final PackageInfo packageInfo = new PackageInfo();
+        packageInfo.packageName = PACKAGE_NAME;
+        packageInfo.applicationInfo = applicationInfo;
+        mPackageManager.addPackage(packageInfo);
+        mPackageManager.setUnbadgedApplicationIcon(PACKAGE_NAME, new ColorDrawable());
+
+        mPicker = spy(new BugReportHandlerPicker());
+        doNothing().when(mPicker).updateCandidates();
+        doNothing().when(mPicker).updateCheckedState(any());
+        doReturn(mActivity).when(mPicker).getActivity();
+
+        ReflectionHelpers.setField(mPicker, "mMetricsFeatureProvider",
+                mock(MetricsFeatureProvider.class));
+        mBugReportHandlerUtil = mock(BugReportHandlerUtil.class);
+        mPicker.setBugReportHandlerUtil(mBugReportHandlerUtil);
+    }
+
+    @After
+    public void tearDown() {
+        mPackageManager.removePackage(PACKAGE_NAME);
+    }
+
+    @Test
+    public void clickItem_success() {
+        testClickingItemSuccess();
+    }
+
+    @Test
+    public void clickItem_fail() {
+        testClickingItemFail();
+    }
+
+    @Test
+    public void clickItem_usingBugReportHandlerSettingIntent_success() {
+        useBugReportHandlerSettingIntent();
+        testClickingItemSuccess();
+        verify(mActivity, times(1)).finish();
+    }
+
+    @Test
+    public void clickItem_fromBugReportHandlerSettingIntent_fail() {
+        useBugReportHandlerSettingIntent();
+        testClickingItemFail();
+    }
+
+    private static ApplicationInfo createApplicationInfo(String packageName) {
+        ApplicationInfo applicationInfo = new ApplicationInfo();
+        applicationInfo.packageName = packageName;
+        return applicationInfo;
+    }
+
+    private void testClickingItemSuccess() {
+        when(mBugReportHandlerUtil.getValidBugReportHandlerInfos(any()))
+                .thenReturn(Collections.singletonList(Pair.create(
+                        createApplicationInfo(PACKAGE_NAME), USER_ID)));
+        when(mBugReportHandlerUtil.setCurrentBugReportHandlerAppAndUser(any(), eq(PACKAGE_NAME),
+                eq(USER_ID))).thenReturn(true);
+
+        RadioButtonPreference defaultPackagePref = mock(RadioButtonPreference.class);
+        when(defaultPackagePref.getKey()).thenReturn(
+                BugReportHandlerPicker.getKey(PACKAGE_NAME, USER_ID));
+        mPicker.onRadioButtonClicked(defaultPackagePref);
+
+        verify(mBugReportHandlerUtil, times(1)).setCurrentBugReportHandlerAppAndUser(any(),
+                eq(PACKAGE_NAME), eq(USER_ID));
+        verify(mPicker, times(1)).updateCheckedState(
+                BugReportHandlerPicker.getKey(PACKAGE_NAME, USER_ID));
+        verify(mBugReportHandlerUtil, never()).showInvalidChoiceToast(any());
+    }
+
+    private void testClickingItemFail() {
+        when(mBugReportHandlerUtil.getValidBugReportHandlerInfos(any()))
+                .thenReturn(Collections.singletonList(Pair.create(
+                        createApplicationInfo(PACKAGE_NAME), USER_ID)));
+        when(mBugReportHandlerUtil.setCurrentBugReportHandlerAppAndUser(any(), eq(PACKAGE_NAME),
+                eq(USER_ID))).thenReturn(false);
+
+        RadioButtonPreference defaultPackagePref = mock(RadioButtonPreference.class);
+        when(defaultPackagePref.getKey()).thenReturn(
+                BugReportHandlerPicker.getKey(PACKAGE_NAME, USER_ID));
+        mPicker.onRadioButtonClicked(defaultPackagePref);
+
+        verify(mBugReportHandlerUtil, times(1)).setCurrentBugReportHandlerAppAndUser(any(),
+                eq(PACKAGE_NAME), eq(USER_ID));
+        // Ensure we update the list of packages when we click a non-valid package - the list must
+        // have changed, otherwise this click wouldn't fail.
+        verify(mPicker, times(1)).updateCandidates();
+        verify(mBugReportHandlerUtil, times(1)).showInvalidChoiceToast(any());
+    }
+
+    private void useBugReportHandlerSettingIntent() {
+        Intent intent = new Intent(ACTION_BUGREPORT_HANDLER_SETTINGS);
+        when(mActivity.getIntent()).thenReturn(intent);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/dashboard/profileselector/ProfileSelectFragmentTest.java b/tests/robotests/src/com/android/settings/dashboard/profileselector/ProfileSelectFragmentTest.java
index 8580b4c..3f6f95a 100644
--- a/tests/robotests/src/com/android/settings/dashboard/profileselector/ProfileSelectFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/profileselector/ProfileSelectFragmentTest.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.dashboard.profileselector;
 
+import static android.content.Intent.EXTRA_USER_ID;
+
 import static com.android.settings.dashboard.profileselector.ProfileSelectFragment.PERSONAL_TAB;
 import static com.android.settings.dashboard.profileselector.ProfileSelectFragment.WORK_TAB;
 
@@ -27,22 +29,13 @@
 import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
 
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentActivity;
-import androidx.preference.PreferenceFragmentCompat;
-import androidx.recyclerview.widget.RecyclerView;
 
-import com.android.settings.R;
 import com.android.settings.SettingsActivity;
 import com.android.settings.SettingsPreferenceFragmentTest;
-
-import com.google.android.material.tabs.TabLayout;
+import com.android.settings.testutils.shadow.ShadowUserManager;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -52,16 +45,18 @@
 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.shadows.androidx.fragment.FragmentController;
+
+import java.util.HashSet;
+import java.util.Set;
 
 @RunWith(RobolectricTestRunner.class)
+@Config(shadows = {ShadowUserManager.class})
 public class ProfileSelectFragmentTest {
 
     private Context mContext;
     private TestProfileSelectFragment mFragment;
     private FragmentActivity mActivity;
+    private ShadowUserManager mUserManager;
 
     @Before
     public void setUp() {
@@ -71,30 +66,51 @@
         mFragment = spy(new TestProfileSelectFragment());
         when(mFragment.getContext()).thenReturn(mContext);
         when(mFragment.getActivity()).thenReturn(mActivity);
+        mUserManager = ShadowUserManager.getShadow();
     }
 
     @Test
-    @Config(shadows = ShadowPreferenceFragmentCompat.class)
-    public void onCreateView_no_setCorrectTab() {
-        FragmentController.of(mFragment, new Intent()).create(0 /* containerViewId*/,
-                null /* bundle */).start().resume().visible().get();
-        final TabLayout tabs = mFragment.getView().findViewById(R.id.tabs);
-
-        assertThat(tabs.getSelectedTabPosition()).isEqualTo(PERSONAL_TAB);
+    public void getTabId_no_setCorrectTab() {
+        assertThat(mFragment.getTabId(mActivity, null)).isEqualTo(PERSONAL_TAB);
     }
 
     @Test
-    @Config(shadows = ShadowPreferenceFragmentCompat.class)
-    public void onCreateView_setArgument_setCorrectTab() {
+    public void getTabId_setArgument_setCorrectTab() {
         final Bundle bundle = new Bundle();
         bundle.putInt(SettingsActivity.EXTRA_SHOW_FRAGMENT_TAB, WORK_TAB);
-        mFragment.setArguments(bundle);
 
-        FragmentController.of(mFragment, new Intent()).create(0 /* containerViewId*/,
-                bundle).start().resume().visible().get();
-        final TabLayout tabs = mFragment.getView().findViewById(R.id.tabs);
+        assertThat(mFragment.getTabId(mActivity, bundle)).isEqualTo(WORK_TAB);
+    }
 
-        assertThat(tabs.getSelectedTabPosition()).isEqualTo(WORK_TAB);
+    @Test
+    public void getTabId_setWorkId_getCorrectTab() {
+        final Bundle bundle = new Bundle();
+        bundle.putInt(EXTRA_USER_ID, 10);
+        final Set<Integer> profileIds = new HashSet<>();
+        profileIds.add(10);
+        mUserManager.setManagedProfiles(profileIds);
+
+        assertThat(mFragment.getTabId(mActivity, bundle)).isEqualTo(WORK_TAB);
+    }
+
+    @Test
+    public void getTabId_setPersonalId_getCorrectTab() {
+        final Bundle bundle = new Bundle();
+        bundle.putInt(EXTRA_USER_ID, 0);
+
+        assertThat(mFragment.getTabId(mActivity, bundle)).isEqualTo(PERSONAL_TAB);
+    }
+
+    @Test
+    public void getTabId_setPersonalIdByIntent_getCorrectTab() {
+        final Set<Integer> profileIds = new HashSet<>();
+        profileIds.add(10);
+        mUserManager.setManagedProfiles(profileIds);
+        final Intent intent = spy(new Intent());
+        when(intent.getContentUserHint()).thenReturn(10);
+        when(mActivity.getIntent()).thenReturn(intent);
+
+        assertThat(mFragment.getTabId(mActivity, null)).isEqualTo(WORK_TAB);
     }
 
     public static class TestProfileSelectFragment extends ProfileSelectFragment {
@@ -107,41 +123,4 @@
             };
         }
     }
-
-    @Implements(PreferenceFragmentCompat.class)
-    public static class ShadowPreferenceFragmentCompat {
-
-        private Context mContext;
-
-        @Implementation
-        protected View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
-                @Nullable Bundle savedInstanceState) {
-            mContext = inflater.getContext();
-            return inflater.inflate(R.layout.preference_list_fragment, container);
-        }
-
-        @Implementation
-        protected RecyclerView getListView() {
-            final RecyclerView recyclerView = new RecyclerView(mContext);
-            recyclerView.setAdapter(new RecyclerView.Adapter() {
-                @NonNull
-                @Override
-                public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup,
-                        int i) {
-                    return null;
-                }
-
-                @Override
-                public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int i) {
-
-                }
-
-                @Override
-                public int getItemCount() {
-                    return 0;
-                }
-            });
-            return recyclerView;
-        }
-    }
 }
diff --git a/tests/robotests/src/com/android/settings/dashboard/profileselector/ProfileSelectLocationFragmentTest.java b/tests/robotests/src/com/android/settings/dashboard/profileselector/ProfileSelectLocationFragmentTest.java
new file mode 100644
index 0000000..f463bec
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/dashboard/profileselector/ProfileSelectLocationFragmentTest.java
@@ -0,0 +1,48 @@
+/*
+ * 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.dashboard.profileselector;
+
+import static com.android.settings.dashboard.profileselector.ProfileSelectFragment.EXTRA_PROFILE;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+
+@RunWith(RobolectricTestRunner.class)
+public class ProfileSelectLocationFragmentTest {
+
+    private ProfileSelectLocationFragment mProfileSelectLocationFragment;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mProfileSelectLocationFragment = new ProfileSelectLocationFragment();
+    }
+
+    @Test
+    public void getFragments_containsCorrectBundle() {
+        assertThat(mProfileSelectLocationFragment.getFragments().length).isEqualTo(2);
+        assertThat(mProfileSelectLocationFragment.getFragments()[0].getArguments().getInt(
+                EXTRA_PROFILE, -1)).isEqualTo(ProfileSelectFragment.ProfileType.PERSONAL);
+        assertThat(mProfileSelectLocationFragment.getFragments()[1].getArguments().getInt(
+                EXTRA_PROFILE, -1)).isEqualTo(ProfileSelectFragment.ProfileType.WORK);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/development/BugReportHandlerPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/BugReportHandlerPreferenceControllerTest.java
new file mode 100644
index 0000000..6b47a80
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/development/BugReportHandlerPreferenceControllerTest.java
@@ -0,0 +1,115 @@
+/*
+ * 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.development;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.os.UserManager;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.bugreporthandler.BugReportHandlerUtil;
+
+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.util.ReflectionHelpers;
+
+@RunWith(RobolectricTestRunner.class)
+public class BugReportHandlerPreferenceControllerTest {
+
+    @Mock
+    private PreferenceScreen mPreferenceScreen;
+    @Mock
+    private UserManager mUserManager;
+    @Mock
+    private BugReportHandlerUtil mBugReportHandlerUtil;
+    @Mock
+    private Preference mPreference;
+
+    private BugReportHandlerPreferenceController mController;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mController = spy(new BugReportHandlerPreferenceController(RuntimeEnvironment.application));
+        ReflectionHelpers.setField(mController, "mUserManager", mUserManager);
+        ReflectionHelpers.setField(mController, "mBugReportHandlerUtil", mBugReportHandlerUtil);
+    }
+
+    @Test
+    public void isAvailable_hasDebugRestriction_notAvailable() {
+        doReturn(true).when(mUserManager).hasUserRestriction(anyString());
+        doReturn(true).when(mBugReportHandlerUtil).isBugReportHandlerEnabled(any(Context.class));
+
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    public void isAvailable_bugReportHandlerDisabled_notAvailable() {
+        doReturn(false).when(mBugReportHandlerUtil).isBugReportHandlerEnabled(any(Context.class));
+        doReturn(false).when(mUserManager).hasUserRestriction(anyString());
+
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    public void isAvailable_noDebugRestrictionAndBugReportHandlerEnabled_available() {
+        doReturn(false).when(mUserManager).hasUserRestriction(anyString());
+        doReturn(true).when(mBugReportHandlerUtil).isBugReportHandlerEnabled(any(Context.class));
+
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    public void updateState_hasCurrentBugReportHandlerAppLabel_setAppLabel() {
+        when(mPreferenceScreen.findPreference(mController.getPreferenceKey()))
+                .thenReturn(mPreference);
+        mController.displayPreference(mPreferenceScreen);
+        doReturn("SomeRandomAppLabel!!!").when(mController).getCurrentBugReportHandlerAppLabel();
+
+        mController.updateState(mPreference);
+
+        verify(mPreference).setSummary("SomeRandomAppLabel!!!");
+    }
+
+    @Test
+    public void updateState_noCurrentBugReportHandlerAppLabel_setAppDefaultLabel() {
+        when(mPreferenceScreen.findPreference(mController.getPreferenceKey()))
+                .thenReturn(mPreference);
+        mController.displayPreference(mPreferenceScreen);
+        doReturn(null).when(mController).getCurrentBugReportHandlerAppLabel();
+
+        mController.updateState(mPreference);
+
+        verify(mPreference).setSummary(R.string.app_list_preference_none);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java
index 5a74804..2c0b4fc 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java
@@ -66,6 +66,7 @@
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -164,6 +165,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateNetworkProviderWithFoobarCarrier_shouldUpdateCarrierWithFoobar() {
         final CharSequence carrierName = "foobar";
         doReturn(carrierName).when(mSubscriptionInfo).getCarrierName();
@@ -174,6 +176,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updatePhoneNumberWith1111111111_shouldUpdatePhoneNumber() {
         ShadowDeviceInfoUtils.setPhoneNumber("1111111111");
 
@@ -186,6 +189,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateLatestAreaInfoWithCdmaPhone_shouldRemoveOperatorInfoSetting() {
         when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_CDMA);
 
@@ -196,6 +200,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateServiceStateWithInService_shouldUpdateTextToBeCInService() {
         when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
 
@@ -206,6 +211,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateServiceStateWithPowerOff_shouldUpdateTextAndResetSignalStrength() {
         when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF);
         when(mPersistableBundle.getBoolean(
@@ -219,6 +225,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateVoiceDataOutOfService_shouldUpdateSettingAndResetSignalStrength() {
         when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
@@ -233,6 +240,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateVoiceOutOfServiceDataInService_shouldUpdateTextToBeInService() {
         when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
@@ -246,6 +254,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateSignalStrengthWithLte50Wcdma40_shouldUpdateSignalStrengthTo50() {
         final int lteDbm = 50;
         final int lteAsu = 50;
@@ -263,6 +272,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateSignalStrengthWithLte50Cdma30_shouldUpdateSignalStrengthTo50() {
         final int lteDbm = 50;
         final int lteAsu = 50;
@@ -280,6 +290,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateVoiceOutOfServiceDataInService_shouldUpdateSignalStrengthTo50() {
         when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
@@ -300,6 +311,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateVoiceNetworkTypeWithEdge_shouldUpdateSettingToEdge() {
         when(mTelephonyManager.getVoiceNetworkType(anyInt())).thenReturn(
                 TelephonyManager.NETWORK_TYPE_EDGE);
@@ -311,6 +323,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateDataNetworkTypeWithEdge_shouldUpdateSettingToEdge() {
         when(mTelephonyManager.getDataNetworkType(anyInt())).thenReturn(
                 TelephonyManager.NETWORK_TYPE_EDGE);
@@ -322,6 +335,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateRoamingStatusIsRoaming_shouldSetSettingToRoaming() {
         when(mServiceState.getRoaming()).thenReturn(true);
 
@@ -332,6 +346,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_updateRoamingStatusNotRoaming_shouldSetSettingToRoamingOff() {
         when(mServiceState.getRoaming()).thenReturn(false);
 
@@ -342,6 +357,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_doNotShowIccid_shouldRemoveIccidSetting() {
         when(mPersistableBundle.getBoolean(
                 CarrierConfigManager.KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL)).thenReturn(false);
@@ -353,6 +369,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_doNotShowSignalStrength_shouldRemoveSignalStrengthSetting() {
         when(mPersistableBundle.getBoolean(
                 CarrierConfigManager.KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL))
@@ -365,6 +382,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_showSignalStrengthAndIccId_shouldShowSignalStrengthAndIccIdSetting() {
         // getConfigForSubId is nullable, so make sure the default behavior is correct
         when(mCarrierConfigManager.getConfigForSubId(anyInt())).thenReturn(null);
@@ -377,6 +395,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_showIccid_shouldSetIccidToSetting() {
         final String iccid = "12351351231241";
         when(mPersistableBundle.getBoolean(
@@ -389,6 +408,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_showEid_shouldSetEidToSetting() {
         final String eid = "12351351231241";
         when(mEuiccManager.getEid()).thenReturn(eid);
@@ -400,6 +420,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_showEid_euiccManagerIsNotEnabled() {
         when(mEuiccManager.isEnabled()).thenReturn(false);
 
@@ -410,6 +431,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_imsRegistered_shouldSetImsRegistrationStateSummaryToRegisterd() {
         when(mPersistableBundle.getBoolean(
                 CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(true);
@@ -422,6 +444,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_imsNotRegistered_shouldSetImsRegistrationStateSummaryToNotRegisterd() {
         when(mPersistableBundle.getBoolean(
                 CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(true);
@@ -434,6 +457,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_showImsRegistration_shouldNotRemoveImsRegistrationStateSetting() {
         when(mPersistableBundle.getBoolean(
                 CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(true);
@@ -444,6 +468,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_doNotShowImsRegistration_shouldRemoveImsRegistrationStateSetting() {
         when(mPersistableBundle.getBoolean(
                 CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(false);
@@ -455,6 +480,7 @@
     }
 
     @Test
+    @Ignore
     public void initialize_nullSignalStrength_noCrash() {
         doReturn(null).when(mController).getSignalStrength();
         // we should not crash when running the following line
diff --git a/tests/robotests/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorControllerTest.java b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorControllerTest.java
index 53be42c..b1c6738 100644
--- a/tests/robotests/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorControllerTest.java
@@ -14,11 +14,27 @@
 
 package com.android.settings.display.darkmode;
 
+import static junit.framework.TestCase.assertFalse;
+
+import static org.junit.Assert.assertTrue;
+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.doNothing;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
 import android.app.UiModeManager;
 import android.content.Context;
 import android.os.PowerManager;
+
 import androidx.preference.DropDownPreference;
 import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -26,16 +42,6 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
-import com.android.settings.R;
-
-import static junit.framework.TestCase.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 @RunWith(RobolectricTestRunner.class)
 public class DarkModeScheduleSelectorControllerTest {
@@ -60,6 +66,11 @@
         when(mContext.getString(R.string.dark_ui_auto_mode_never)).thenReturn("never");
         when(mContext.getString(R.string.dark_ui_auto_mode_auto)).thenReturn("auto");
         mPreference = spy(new DropDownPreference(mContext));
+        mPreference.setEntryValues(new CharSequence[]{
+                mContext.getString(R.string.dark_ui_auto_mode_never),
+                mContext.getString(R.string.dark_ui_auto_mode_auto)
+        });
+        doNothing().when(mPreference).setValueIndex(anyInt());
         when(mScreen.findPreference(anyString())).thenReturn(mPreference);
         when(mUiService.setNightModeActivated(anyBoolean())).thenReturn(true);
         mController = new DarkModeScheduleSelectorController(mContext, mPreferenceKey);
@@ -81,23 +92,20 @@
     public void nightMode_updateStateNone_dropDownValueChangedToNone() {
         when(mUiService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_YES);
         mController.displayPreference(mScreen);
-        mController.updateState(mPreference);
-        verify(mPreference).setValue(mContext.getString(R.string.dark_ui_auto_mode_never));
+        verify(mPreference).setValueIndex(0);
     }
 
     @Test
     public void nightMode_updateStateNone_dropDownValueChangedToAuto() {
         when(mUiService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_AUTO);
         mController.displayPreference(mScreen);
-        mController.updateState(mPreference);
-        verify(mPreference).setValue(mContext.getString(R.string.dark_ui_auto_mode_auto));
+        verify(mPreference).setValueIndex(1);
     }
 
     @Test
     public void batterySaver_dropDown_disabledSelector() {
         when(mPM.isPowerSaveMode()).thenReturn(true);
         mController.displayPreference(mScreen);
-        mController.updateState(mPreference);
         verify(mPreference).setEnabled(eq(false));
     }
 }
diff --git a/tests/robotests/src/com/android/settings/gestures/SystemNavigationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/SystemNavigationPreferenceControllerTest.java
index 3163f9a..48cf4b3 100644
--- a/tests/robotests/src/com/android/settings/gestures/SystemNavigationPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/gestures/SystemNavigationPreferenceControllerTest.java
@@ -137,30 +137,36 @@
     public void testIsSwipeUpEnabled() {
         SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
                 NAV_BAR_MODE_2BUTTON);
-        assertThat(SystemNavigationPreferenceController.isSwipeUpEnabled(mContext)).isTrue();
+        assertThat(SystemNavigationPreferenceController.is2ButtonNavigationEnabled(
+                mContext)).isTrue();
 
         SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
                 NAV_BAR_MODE_3BUTTON);
-        assertThat(SystemNavigationPreferenceController.isSwipeUpEnabled(mContext)).isFalse();
+        assertThat(SystemNavigationPreferenceController.is2ButtonNavigationEnabled(
+                mContext)).isFalse();
 
         SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
                 NAV_BAR_MODE_GESTURAL);
-        assertThat(SystemNavigationPreferenceController.isSwipeUpEnabled(mContext)).isFalse();
+        assertThat(SystemNavigationPreferenceController.is2ButtonNavigationEnabled(
+                mContext)).isFalse();
     }
 
     @Test
     public void testIsEdgeToEdgeEnabled() {
         SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
                 NAV_BAR_MODE_GESTURAL);
-        assertThat(SystemNavigationPreferenceController.isEdgeToEdgeEnabled(mContext)).isTrue();
+        assertThat(SystemNavigationPreferenceController.isGestureNavigationEnabled(
+                mContext)).isTrue();
 
         SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
                 NAV_BAR_MODE_3BUTTON);
-        assertThat(SystemNavigationPreferenceController.isEdgeToEdgeEnabled(mContext)).isFalse();
+        assertThat(SystemNavigationPreferenceController.isGestureNavigationEnabled(
+                mContext)).isFalse();
 
         SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
                 NAV_BAR_MODE_2BUTTON);
-        assertThat(SystemNavigationPreferenceController.isEdgeToEdgeEnabled(mContext)).isFalse();
+        assertThat(SystemNavigationPreferenceController.isGestureNavigationEnabled(
+                mContext)).isFalse();
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/location/RecentLocationRequestPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/location/RecentLocationRequestPreferenceControllerTest.java
new file mode 100644
index 0000000..545a358
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/location/RecentLocationRequestPreferenceControllerTest.java
@@ -0,0 +1,129 @@
+/*
+ * 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.location;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.os.UserHandle;
+
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
+import com.android.settings.testutils.shadow.ShadowUserManager;
+import com.android.settingslib.location.RecentLocationApps;
+
+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.annotation.Config;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+@RunWith(RobolectricTestRunner.class)
+@Config(shadows = {ShadowUserManager.class})
+public class RecentLocationRequestPreferenceControllerTest {
+    @Mock
+    private PreferenceScreen mScreen;
+    @Mock
+    private PreferenceCategory mCategory;
+    private Context mContext;
+    private RecentLocationRequestPreferenceController mController;
+    private ShadowUserManager mUserManager;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = RuntimeEnvironment.application;
+        mController = spy(
+                new RecentLocationRequestPreferenceController(mContext, "key"));
+        when(mCategory.getContext()).thenReturn(mContext);
+        when(mScreen.findPreference("key")).thenReturn(mCategory);
+        mUserManager = ShadowUserManager.getShadow();
+        mController.mRecentLocationApps = spy(new RecentLocationApps(mContext));
+    }
+
+    @Test
+    public void updateState_whenAppListMoreThanThree_shouldDisplayTopThreeApps() {
+        final List<RecentLocationApps.Request> requests = createMockRequest(6);
+        when(mController.mRecentLocationApps.getAppListSorted(false)).thenReturn(requests);
+
+        mController.displayPreference(mScreen);
+
+        verify(mCategory, times(3)).addPreference(any());
+    }
+
+    @Test
+    public void updateState_workProfile_shouldShowOnlyWorkProfileApps() {
+        final List<RecentLocationApps.Request> requests = createMockRequest(6);
+        when(mController.mRecentLocationApps.getAppListSorted(false)).thenReturn(requests);
+        mController.setProfileType(ProfileSelectFragment.ProfileType.WORK);
+        final Set<Integer> profileIds = new HashSet<>();
+        profileIds.add(4);
+        profileIds.add(5);
+        mUserManager.setManagedProfiles(profileIds);
+
+        mController.displayPreference(mScreen);
+
+        // contains userId 4 and userId 5
+        verify(mCategory, times(2)).addPreference(any());
+    }
+
+    @Test
+    public void updateState_Personal_shouldShowOnlyPersonalApps() {
+        final List<RecentLocationApps.Request> requests = createMockRequest(6);
+        when(mController.mRecentLocationApps.getAppListSorted(false)).thenReturn(requests);
+        mController.setProfileType(ProfileSelectFragment.ProfileType.PERSONAL);
+        final Set<Integer> profileIds = new HashSet<>();
+        for (int i = 0; i < 4; i++) {
+            profileIds.add(i);
+        }
+        mUserManager.setManagedProfiles(profileIds);
+
+        mController.displayPreference(mScreen);
+
+        // contains userId 4 and userId 5
+        verify(mCategory, times(2)).addPreference(any());
+    }
+
+    private List<RecentLocationApps.Request> createMockRequest(int count) {
+        final List<RecentLocationApps.Request> requests = new ArrayList<>();
+        for (int i = 0; i < count; i++) {
+            final Drawable icon = mock(Drawable.class);
+            // Add mock accesses
+            final RecentLocationApps.Request request = new RecentLocationApps.Request(
+                    "packageName", UserHandle.of(i), icon,
+                    "appTitle" + i, false, "appSummary" + i, 1000 - i);
+            requests.add(request);
+        }
+        return requests;
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/network/AirplaneModePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/AirplaneModePreferenceControllerTest.java
index a0524fb..f47c0c5 100644
--- a/tests/robotests/src/com/android/settings/network/AirplaneModePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/network/AirplaneModePreferenceControllerTest.java
@@ -38,6 +38,7 @@
 import com.android.settingslib.core.lifecycle.Lifecycle;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -125,6 +126,7 @@
     }
 
     @Test
+    @Ignore
     public void airplaneModePreference_testSetValue_updatesCorrectly() {
         // Airplane mode default off
         Settings.Global.putInt(mResolver, Settings.Global.AIRPLANE_MODE_ON, OFF);
diff --git a/tests/robotests/src/com/android/settings/network/MobileNetworkListControllerTest.java b/tests/robotests/src/com/android/settings/network/MobileNetworkListControllerTest.java
index bbb1bdd..95d60a4 100644
--- a/tests/robotests/src/com/android/settings/network/MobileNetworkListControllerTest.java
+++ b/tests/robotests/src/com/android/settings/network/MobileNetworkListControllerTest.java
@@ -41,6 +41,7 @@
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
@@ -95,12 +96,14 @@
     }
 
     @Test
+    @Ignore
     public void displayPreference_noSubscriptions_noCrash() {
         mController.displayPreference(mPreferenceScreen);
         mController.onResume();
     }
 
     @Test
+    @Ignore
     public void displayPreference_eSimNotSupported_addMoreLinkNotVisible() {
         when(mEuiccManager.isEnabled()).thenReturn(false);
         mController.displayPreference(mPreferenceScreen);
@@ -109,6 +112,7 @@
     }
 
     @Test
+    @Ignore
     public void displayPreference_eSimSupported_addMoreLinkIsVisible() {
         when(mEuiccManager.isEnabled()).thenReturn(true);
         when(mTelephonyManager.getNetworkCountryIso()).thenReturn("");
@@ -118,6 +122,7 @@
     }
 
     @Test
+    @Ignore
     public void displayPreference_twoSubscriptions_correctlySetup() {
         final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
         final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
@@ -148,6 +153,7 @@
     }
 
     @Test
+    @Ignore
     public void displayPreference_oneActiveESimOneInactivePSim_correctlySetup() {
         final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
         final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
@@ -184,6 +190,7 @@
     }
 
     @Test
+    @Ignore
     public void onSubscriptionsChanged_twoSubscriptionsOneChangesName_preferenceUpdated() {
         final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
         final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
@@ -200,6 +207,7 @@
     }
 
     @Test
+    @Ignore
     public void onSubscriptionsChanged_startWithThreeSubsAndRemoveOne_correctPreferenceRemoved() {
         final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
         final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
diff --git a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
index 2a12680..220209c 100644
--- a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
+++ b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java
@@ -24,6 +24,7 @@
 import com.android.settings.accounts.AccountFeatureProvider;
 import com.android.settings.applications.ApplicationFeatureProvider;
 import com.android.settings.aware.AwareFeatureProvider;
+import com.android.settings.biometrics.face.FaceFeatureProvider;
 import com.android.settings.bluetooth.BluetoothFeatureProvider;
 import com.android.settings.dashboard.DashboardFeatureProvider;
 import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
@@ -68,6 +69,7 @@
     public final ContextualCardFeatureProvider mContextualCardFeatureProvider;
     public final BluetoothFeatureProvider mBluetoothFeatureProvider;
     public final AwareFeatureProvider mAwareFeatureProvider;
+    public final FaceFeatureProvider mFaceFeatureProvider;
 
     public PanelFeatureProvider panelFeatureProvider;
     public SlicesFeatureProvider slicesFeatureProvider;
@@ -114,6 +116,7 @@
         panelFeatureProvider = mock(PanelFeatureProvider.class);
         mBluetoothFeatureProvider = mock(BluetoothFeatureProvider.class);
         mAwareFeatureProvider = mock(AwareFeatureProvider.class);
+        mFaceFeatureProvider = mock(FaceFeatureProvider.class);
     }
 
     @Override
@@ -215,4 +218,9 @@
     public AwareFeatureProvider getAwareFeatureProvider() {
         return mAwareFeatureProvider;
     }
+
+    @Override
+    public FaceFeatureProvider getFaceFeatureProvider() {
+        return mFaceFeatureProvider;
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowUserManager.java b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowUserManager.java
index a85fe10..659c5de 100644
--- a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowUserManager.java
+++ b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowUserManager.java
@@ -27,8 +27,8 @@
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
-import org.robolectric.shadow.api.Shadow;
 import org.robolectric.annotation.Resetter;
+import org.robolectric.shadow.api.Shadow;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -132,6 +132,16 @@
         return mUserSwitchEnabled;
     }
 
+    @Implementation
+    protected boolean isManagedProfile(int userId) {
+        return mManagedProfiles.contains(userId);
+    }
+
+    public void setManagedProfiles(Set<Integer> profileIds) {
+        mManagedProfiles.clear();
+        mManagedProfiles.addAll(profileIds);
+    }
+
     public void setUserSwitcherEnabled(boolean userSwitchEnabled) {
         mUserSwitchEnabled = userSwitchEnabled;
     }
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java b/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java
index 82d76b3..e1202ae 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java
@@ -18,12 +18,8 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyBoolean;
-import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.anyString;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import android.content.Context;
@@ -37,7 +33,6 @@
 import android.security.KeyStore;
 import android.view.LayoutInflater;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.ArrayAdapter;
 import android.widget.CheckBox;
@@ -230,34 +225,6 @@
     }
 
     @Test
-    public void showForCarrierAp() {
-        // Setup the mock view for wifi dialog.
-        View view = mock(View.class);
-        TextView nameText = mock(TextView.class);
-        TextView valueText = mock(TextView.class);
-        when(view.findViewById(R.id.name)).thenReturn(nameText);
-        when(view.findViewById(R.id.value)).thenReturn(valueText);
-        LayoutInflater inflater = mock(LayoutInflater.class);
-        when(inflater.inflate(anyInt(), any(ViewGroup.class), anyBoolean())).thenReturn(view);
-        when(mConfigUiBase.getLayoutInflater()).thenReturn(inflater);
-
-        String carrierName = "Test Carrier";
-        when(mAccessPoint.isCarrierAp()).thenReturn(true);
-        when(mAccessPoint.getCarrierName()).thenReturn(carrierName);
-        mController = new TestWifiConfigController(mConfigUiBase, mView, mAccessPoint,
-                WifiConfigUiBase.MODE_CONNECT);
-        // Verify the content of the text fields.
-        verify(nameText).setText(R.string.wifi_carrier_connect);
-        verify(valueText).setText(
-                String.format(mContext.getString(R.string.wifi_carrier_content), carrierName));
-        // Verify that the advance toggle is not visible.
-        assertThat(mView.findViewById(R.id.wifi_advanced_toggle).getVisibility())
-                .isEqualTo(View.GONE);
-        // Verify that the EAP method menu is not visible.
-        assertThat(mView.findViewById(R.id.eap).getVisibility()).isEqualTo(View.GONE);
-    }
-
-    @Test
     public void loadCertificates_keyStoreListFail_shouldNotCrash() {
         // Set up
         when(mAccessPoint.getSecurity()).thenReturn(AccessPoint.SECURITY_EAP);