diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 199fe5a..476d487 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -178,6 +178,7 @@
                   android:exported="true"
                   android:enabled="false"
                   android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize"
+                  android:knownActivityEmbeddingCerts="@array/config_known_host_certs"
                   android:permission="android.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK">
             <intent-filter>
                 <action android:name="android.settings.SETTINGS_EMBED_DEEP_LINK_ACTIVITY" />
@@ -224,6 +225,7 @@
         <activity android:name=".SubSettings"
                   android:exported="false"
                   android:theme="@style/Theme.SubSettings"
+                  android:knownActivityEmbeddingCerts="@array/config_known_host_certs"
                   android:taskAffinity="com.android.settings.root" />
 
         <activity android:name=".Settings$CreateShortcutActivity"
@@ -333,6 +335,7 @@
         <activity android:name=".search.SearchResultTrampoline"
                   android:theme="@android:style/Theme.NoDisplay"
                   android:excludeFromRecents="true"
+                  android:knownActivityEmbeddingCerts="@array/config_known_host_certs"
                   android:exported="true">
             <intent-filter>
                 <action android:name="com.android.settings.SEARCH_RESULT_TRAMPOLINE" />
@@ -1628,6 +1631,7 @@
             android:excludeFromRecents="true"
             android:theme="@android:style/Theme.NoDisplay"
             android:exported="true"
+            android:knownActivityEmbeddingCerts="@array/config_known_host_certs"
             android:permission="android.permission.MODIFY_PHONE_STATE">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
diff --git a/res/drawable/ic_event.xml b/res/drawable/ic_event.xml
index a82d754..1bc8f2c 100644
--- a/res/drawable/ic_event.xml
+++ b/res/drawable/ic_event.xml
@@ -30,5 +30,5 @@
         android:height="@dimen/dashboard_tile_foreground_image_size"
         android:start="@dimen/dashboard_tile_foreground_image_inset"
         android:top="@dimen/dashboard_tile_foreground_image_inset"
-        android:drawable="@drawable/ic_event_white" />
+        android:drawable="@drawable/ic_event_shape" />
 </layer-list>
diff --git a/res/drawable/ic_event_white.xml b/res/drawable/ic_event_shape.xml
similarity index 94%
rename from res/drawable/ic_event_white.xml
rename to res/drawable/ic_event_shape.xml
index d80429b..25a8ded 100644
--- a/res/drawable/ic_event_white.xml
+++ b/res/drawable/ic_event_shape.xml
@@ -20,6 +20,6 @@
         android:viewportHeight="24.0">
 
     <path
-        android:fillColor="#FFFFFFFF"
+        android:fillColor="@color/settingslib_colorSurface"
         android:pathData="M17.0,12.0l-5.0,0.0l0.0,5.0l5.0,0.0l0.0,-5.0zM16.0,1.0l0.0,2.0L8.0,3.0L8.0,1.0L6.0,1.0l0.0,2.0L5.0,3.0c-1.11,0.0 -1.9,0.9 -1.99,2.0L3.0,19.0c0.0,1.0 0.89,2.0 2.0,2.0l14.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L21.0,5.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0l-1.0,0.0L18.0,1.0l-2.0,0.0zm3.0,18.0L5.0,19.0L5.0,8.0l14.0,0.0l0.0,11.0z"/>
 </vector>
diff --git a/res/drawable/ic_timelapse.xml b/res/drawable/ic_timelapse.xml
index ba97bae..8bf1488 100644
--- a/res/drawable/ic_timelapse.xml
+++ b/res/drawable/ic_timelapse.xml
@@ -30,5 +30,5 @@
         android:height="@dimen/dashboard_tile_foreground_image_size"
         android:start="@dimen/dashboard_tile_foreground_image_inset"
         android:top="@dimen/dashboard_tile_foreground_image_inset"
-        android:drawable="@drawable/ic_timelapse_white" />
+        android:drawable="@drawable/ic_timelapse_shape" />
 </layer-list>
diff --git a/res/drawable/ic_timelapse_white.xml b/res/drawable/ic_timelapse_shape.xml
similarity index 94%
rename from res/drawable/ic_timelapse_white.xml
rename to res/drawable/ic_timelapse_shape.xml
index f287747..6475e0b 100644
--- a/res/drawable/ic_timelapse_white.xml
+++ b/res/drawable/ic_timelapse_shape.xml
@@ -20,6 +20,6 @@
         android:viewportHeight="24.0">
 
     <path
-        android:fillColor="#FFFFFFFF"
+        android:fillColor="@color/settingslib_colorSurface"
         android:pathData="M16.24,7.76C15.07,6.59 13.54,6.0 12.0,6.0l0.0,6.0l-4.24,4.24c2.34,2.34 6.14,2.34 8.49,0.0 2.34,-2.34 2.34,-6.14 -0.01,-8.48zM12.0,2.0C6.48,2.0 2.0,6.48 2.0,12.0s4.48,10.0 10.0,10.0 10.0,-4.48 10.0,-10.0S17.52,2.0 12.0,2.0zm0.0,18.0c-4.42,0.0 -8.0,-3.58 -8.0,-8.0s3.58,-8.0 8.0,-8.0 8.0,3.58 8.0,8.0 -3.58,8.0 -8.0,8.0z"/>
 </vector>
diff --git a/res/layout/setup_choose_lock_generic_biometrics_header.xml b/res/layout/setup_choose_lock_generic_biometrics_header.xml
deleted file mode 100644
index daeeedd..0000000
--- a/res/layout/setup_choose_lock_generic_biometrics_header.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2016 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    style="@style/SudDescription.Glif"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingTop="@dimen/sud_description_glif_margin_top"
-    android:paddingBottom="@dimen/sud_description_glif_margin_bottom_lists"
-    android:text="@string/lock_settings_picker_biometrics_added_security_message" />
diff --git a/res/layout/setup_choose_lock_generic_header.xml b/res/layout/setup_choose_lock_generic_header.xml
deleted file mode 100644
index 7ec16d2..0000000
--- a/res/layout/setup_choose_lock_generic_header.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2016 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    style="@style/SudDescription.Glif"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingTop="@dimen/sud_description_glif_margin_top"
-    android:paddingBottom="@dimen/sud_description_glif_margin_bottom_lists"
-    android:text="@string/setup_lock_settings_picker_message" />
diff --git a/res/values/config.xml b/res/values/config.xml
index ef786be..ee727bc 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -704,4 +704,10 @@
 
     <!-- Whether to display Cloned Apps page in Settings (Settings > Apps > Cloned Apps).-->
     <bool name="config_cloned_apps_page_enabled">false</bool>
+
+    <!-- Certificates of apps which are allowed to use activity embedding with Settings.-->
+    <string-array name="config_known_host_certs" translatable="false">
+        <item></item>
+    </string-array>
+
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0216d28..c9bd044 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -147,7 +147,7 @@
     <string name="bluetooth_call_title">Audio during calls</string>
     <!-- Bluetooth audio output settings. Title of the option managing media audio path. [CHAR LIMIT=30] -->
     <string name="bluetooth_media_title">Media</string>
-    <!-- Bluetooth audio output settings. Title of the option managing system sounds related audio path. [CHAR LIMIT=30] -->
+    <!-- Bluetooth audio output settings. Title of the option managing system sounds related audio path. [CHAR LIMIT=60] -->
     <string name="bluetooth_system_sounds_title">Notifications and other system sounds</string>
     <!-- Description for text in accessibility hearing aids footer. [CHAR LIMIT=NONE] -->
     <string name="bluetooth_audio_routing_footer_summary">By default, audio output is determined by individual apps</string>
@@ -5272,7 +5272,7 @@
     <!-- Title for usage time that full charge lasts. [CHAR LIMIT=60] -->
     <string name="battery_full_charge_last">Full charge lasts about</string>
     <!-- Description for text in battery footer. [CHAR LIMIT=NONE] -->
-    <string name="battery_footer_summary">Battery usage data is approximate and can change based on usage.</string>
+    <string name="battery_footer_summary">Remaining battery life is approximate and can change based on usage</string>
     <!-- Title for battery usage amount by this app. [CHAR LIMIT=80] -->
     <string name="battery_detail_power_usage">Battery usage</string>
 
@@ -7611,8 +7611,8 @@
     <!-- Configure lock screen: Title for the option of unlocking directly to home. [CHAR LIMIT=30] -->
     <string name="lockscreen_bypass_title">Skip lock screen</string>
 
-    <!-- Configure lock screen: Summary for the option of unlocking directly to home. [CHAR LIMIT=100] -->
-    <string name="lockscreen_bypass_summary">After unlocking, go directly to last used screen</string>
+    <!-- Configure lock screen: Summary for the option of unlocking directly to home. [CHAR LIMIT=150] -->
+    <string name="lockscreen_bypass_summary">After unlocking, go directly to last used screen. Notifications won’t show on lock screen. Swipe down from top to see them.</string>
 
     <!-- Configure lock screen: Search keywords for the option of unlocking directly to home. [CHAR LIMIT=100] -->
     <string name="keywords_lockscreen_bypass">Lock screen, Lockscreen, Skip, Bypass</string>
diff --git a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
index 8626c52..57047f9 100644
--- a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
+++ b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
@@ -30,7 +30,6 @@
 import com.android.settings.search.actionbar.SearchMenuController;
 import com.android.settings.support.actionbar.HelpResourceProvider;
 import com.android.settingslib.core.instrumentation.Instrumentable;
-import com.android.settingslib.transition.SettingsTransitionHelper;
 
 import com.google.android.setupcompat.util.WizardManagerHelper;
 import com.google.android.setupdesign.util.ThemeHelper;
@@ -84,7 +83,6 @@
                         : Instrumentable.METRICS_CATEGORY_UNKNOWN)
                 .setExtras(SetupWizardUtils.copyLifecycleExtra(getIntent().getExtras(),
                         new Bundle()))
-                .setTransitionType(SettingsTransitionHelper.TransitionType.TRANSITION_FADE)
                 .launch();
         return true;
     }
diff --git a/src/com/android/settings/applications/AppStoreUtil.java b/src/com/android/settings/applications/AppStoreUtil.java
index b18a68f..b73b14a 100644
--- a/src/com/android/settings/applications/AppStoreUtil.java
+++ b/src/com/android/settings/applications/AppStoreUtil.java
@@ -53,7 +53,8 @@
             // so we choose to ignore this when supplied by a non-system app.
             String originatingPackageName = source.getOriginatingPackageName();
             String initiatingPackageName = source.getInitiatingPackageName();
-            if (originatingPackageName != null && initiatingPackageName != null) {
+            if (originatingPackageName != null && initiatingPackageName != null
+                    && !initiatingPackageName.equals("com.android.shell")) {
                 ApplicationInfo ai = context.getPackageManager().getApplicationInfo(
                         initiatingPackageName, 0);
                 if ((ai.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
diff --git a/src/com/android/settings/applications/credentials/CredentialManagerPreferenceController.java b/src/com/android/settings/applications/credentials/CredentialManagerPreferenceController.java
index 3ec7782..4c80f54 100644
--- a/src/com/android/settings/applications/credentials/CredentialManagerPreferenceController.java
+++ b/src/com/android/settings/applications/credentials/CredentialManagerPreferenceController.java
@@ -325,9 +325,9 @@
             icon = mIconFactory.getBadgedIcon(appInfo, getUser());
         }
 
-        // If there is no title then don't show anything.
+        // If there is no title then show the package manager.
         if (TextUtils.isEmpty(title)) {
-            return null;
+            title = firstServiceInfo.packageName;
         }
 
         return addProviderPreference(
diff --git a/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceController.java b/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceController.java
index 84412da..e93863a 100644
--- a/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceController.java
+++ b/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceController.java
@@ -20,24 +20,20 @@
 import android.content.Context;
 import android.media.AudioAttributes;
 import android.media.AudioDeviceAttributes;
-import android.media.AudioDeviceInfo;
-import android.media.AudioManager;
 import android.media.audiopolicy.AudioProductStrategy;
 import android.util.Log;
 
-import androidx.annotation.IntDef;
-import androidx.annotation.VisibleForTesting;
 import androidx.preference.ListPreference;
 import androidx.preference.Preference;
 
 import com.android.settings.core.BasePreferenceController;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingConstants;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingHelper;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.primitives.Ints;
 
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -49,16 +45,21 @@
         BasePreferenceController implements Preference.OnPreferenceChangeListener {
 
     private static final String TAG = "HARoutingBasePreferenceController";
+    private static final boolean DEBUG = false;
 
-    private static final AudioDeviceAttributes DEVICE_SPEAKER_OUT = new AudioDeviceAttributes(
-            AudioDeviceAttributes.ROLE_OUTPUT, AudioDeviceInfo.TYPE_BUILTIN_SPEAKER, "");
-
-    private final AudioManager mAudioManager;
+    private final HearingAidAudioRoutingHelper mHelper;
 
     public HearingDeviceAudioRoutingBasePreferenceController(Context context,
             String preferenceKey) {
         super(context, preferenceKey);
-        mAudioManager = mContext.getSystemService(AudioManager.class);
+        mHelper = new HearingAidAudioRoutingHelper(context);
+    }
+
+    @VisibleForTesting
+    public HearingDeviceAudioRoutingBasePreferenceController(Context context,
+            String preferenceKey, HearingAidAudioRoutingHelper helper) {
+        super(context, preferenceKey);
+        mHelper = helper;
     }
 
     @Override
@@ -77,48 +78,46 @@
 
     @Override
     public boolean onPreferenceChange(Preference preference, Object newValue) {
-        final ListPreference listPreference = (ListPreference) preference;
         final Integer routingValue = Ints.tryParse((String) newValue);
-        final AudioDeviceAttributes hearingDeviceAttribute = new AudioDeviceAttributes(
-                AudioDeviceAttributes.ROLE_OUTPUT,
-                AudioDeviceInfo.TYPE_HEARING_AID,
-                getHearingDevice().getAddress());
-        final List<AudioProductStrategy> supportedStrategies = getSupportedStrategies(
-                getSupportedAttributeList());
-
-        boolean status = false;
-        if (routingValue != null) {
-            switch (routingValue) {
-                case RoutingValue.AUTO:
-                    status = removePreferredDeviceForStrategies(supportedStrategies);
-                    break;
-                case RoutingValue.HEARING_DEVICE:
-                    removePreferredDeviceForStrategies(supportedStrategies);
-                    status = setPreferredDeviceForStrategies(supportedStrategies,
-                            hearingDeviceAttribute);
-                    break;
-                case RoutingValue.DEVICE_SPEAKER:
-                    removePreferredDeviceForStrategies(supportedStrategies);
-                    status = setPreferredDeviceForStrategies(supportedStrategies,
-                            DEVICE_SPEAKER_OUT);
-                    break;
-                default:
-                    throw new IllegalArgumentException("Unexpected routingValue: " + routingValue);
-            }
-        }
-        if (!status) {
-            Log.w(TAG, "routingMode: " + listPreference.getKey() + "routingValue: " + routingValue
-                    + " fail to configure AudioProductStrategy");
-        }
 
         saveRoutingValue(mContext, routingValue);
-        updateState(listPreference);
+        trySetAudioRoutingConfig(getSupportedAttributeList(), getHearingDevice(), routingValue);
+
         return true;
     }
 
+    private void trySetAudioRoutingConfig(int[] audioAttributes,
+            CachedBluetoothDevice hearingDevice,
+            @HearingAidAudioRoutingConstants.RoutingValue int routingValue) {
+        final List<AudioProductStrategy> supportedStrategies = mHelper.getSupportedStrategies(
+                audioAttributes);
+        final AudioDeviceAttributes hearingDeviceAttributes =
+                mHelper.getMatchedHearingDeviceAttributes(hearingDevice);
+        if (hearingDeviceAttributes == null) {
+            if (DEBUG) {
+                Log.d(TAG,
+                        "Can not find expected AudioDeviceAttributes to config audio routing "
+                                + "maybe device is offline: "
+                                + hearingDevice.getDevice().getAnonymizedAddress());
+            }
+            return;
+        }
+
+        final boolean status = mHelper.setPreferredDeviceRoutingStrategies(supportedStrategies,
+                hearingDeviceAttributes, routingValue);
+
+        if (!status) {
+            final List<String> strategiesName = supportedStrategies.stream()
+                    .map(AudioProductStrategy::getName)
+                    .collect(Collectors.toList());
+            Log.w(TAG, "routingMode: " + strategiesName + " routingValue: " + routingValue
+                    + " fail to configure AudioProductStrategy");
+        }
+    }
+
     /**
-     * Gets a list of usage value defined in {@link AudioAttributes} that is used to configure
-     * audio routing via {@link AudioProductStrategy}.
+     * Gets a list of usage values defined in {@link AudioAttributes} that are used to identify
+     * {@link AudioProductStrategy} to configure audio routing.
      */
     protected abstract int[] getSupportedAttributeList();
 
@@ -129,77 +128,19 @@
     protected abstract CachedBluetoothDevice getHearingDevice();
 
     /**
-     * Saves the {@link RoutingValue}.
+     * Saves the routing value.
      *
      * @param context the valid context used to get the {@link ContentResolver}
-     * @param routingValue the value defined in {@link RoutingValue}
+     * @param routingValue one of the value defined in
+     *                     {@link HearingAidAudioRoutingConstants.RoutingValue}
      */
     protected abstract void saveRoutingValue(Context context, int routingValue);
 
     /**
-     * Restores the {@link RoutingValue} and used to reflect status on ListPreference.
+     * Restores the routing value and used to reflect status on ListPreference.
      *
      * @param context the valid context used to get the {@link ContentResolver}
-     * @return one of {@link RoutingValue}
+     * @return one of the value defined in {@link HearingAidAudioRoutingConstants.RoutingValue}
      */
     protected abstract int restoreRoutingValue(Context context);
-
-    private List<AudioProductStrategy> getSupportedStrategies(int[] attributeSdkUsageList) {
-        final List<AudioAttributes> audioAttrList = new ArrayList<>(attributeSdkUsageList.length);
-        for (int attributeSdkUsage : attributeSdkUsageList) {
-            audioAttrList.add(new AudioAttributes.Builder().setUsage(attributeSdkUsage).build());
-        }
-
-        final List<AudioProductStrategy> allStrategies = getAudioProductStrategies();
-        final List<AudioProductStrategy> supportedStrategies = new ArrayList<>();
-        for (AudioProductStrategy strategy : allStrategies) {
-            for (AudioAttributes audioAttr : audioAttrList) {
-                if (strategy.supportsAudioAttributes(audioAttr)) {
-                    supportedStrategies.add(strategy);
-                }
-            }
-        }
-
-        return supportedStrategies.stream().distinct().collect(Collectors.toList());
-    }
-
-    @VisibleForTesting
-    List<AudioProductStrategy> getAudioProductStrategies() {
-        return AudioManager.getAudioProductStrategies();
-    }
-
-    @VisibleForTesting
-    boolean setPreferredDeviceForStrategies(List<AudioProductStrategy> strategies,
-            AudioDeviceAttributes audioDevice) {
-        boolean status = true;
-        for (AudioProductStrategy strategy : strategies) {
-            status &= mAudioManager.setPreferredDeviceForStrategy(strategy, audioDevice);
-        }
-
-        return status;
-    }
-
-    @VisibleForTesting
-    boolean removePreferredDeviceForStrategies(List<AudioProductStrategy> strategies) {
-        boolean status = true;
-        for (AudioProductStrategy strategy : strategies) {
-            status &= mAudioManager.removePreferredDeviceForStrategy(strategy);
-        }
-
-        return status;
-    }
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({
-            RoutingValue.AUTO,
-            RoutingValue.HEARING_DEVICE,
-            RoutingValue.DEVICE_SPEAKER,
-    })
-
-    @VisibleForTesting
-    protected @interface RoutingValue {
-        int AUTO = 0;
-        int HEARING_DEVICE = 1;
-        int DEVICE_SPEAKER = 2;
-    }
 }
diff --git a/src/com/android/settings/bluetooth/HearingDeviceCallRoutingPreferenceController.java b/src/com/android/settings/bluetooth/HearingDeviceCallRoutingPreferenceController.java
index 8daa738..ea5ba8b 100644
--- a/src/com/android/settings/bluetooth/HearingDeviceCallRoutingPreferenceController.java
+++ b/src/com/android/settings/bluetooth/HearingDeviceCallRoutingPreferenceController.java
@@ -17,10 +17,10 @@
 package com.android.settings.bluetooth;
 
 import android.content.Context;
-import android.media.AudioAttributes;
 import android.provider.Settings;
 
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingConstants;
 
 /**
  * The controller of the hearing device call routing list preference.
@@ -45,9 +45,7 @@
 
     @Override
     protected int[] getSupportedAttributeList() {
-        return new int[]{
-                AudioAttributes.USAGE_VOICE_COMMUNICATION,
-                AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING};
+        return HearingAidAudioRoutingConstants.CALL_ROUTING_ATTRIBUTES;
     }
 
     @Override
@@ -64,6 +62,7 @@
     @Override
     protected int restoreRoutingValue(Context context) {
         return Settings.Secure.getInt(context.getContentResolver(),
-                Settings.Secure.HEARING_AID_CALL_ROUTING, RoutingValue.AUTO);
+                Settings.Secure.HEARING_AID_CALL_ROUTING,
+                HearingAidAudioRoutingConstants.RoutingValue.AUTO);
     }
 }
diff --git a/src/com/android/settings/bluetooth/HearingDeviceMediaRoutingPreferenceController.java b/src/com/android/settings/bluetooth/HearingDeviceMediaRoutingPreferenceController.java
index 4e61346..1ea36c7 100644
--- a/src/com/android/settings/bluetooth/HearingDeviceMediaRoutingPreferenceController.java
+++ b/src/com/android/settings/bluetooth/HearingDeviceMediaRoutingPreferenceController.java
@@ -17,10 +17,10 @@
 package com.android.settings.bluetooth;
 
 import android.content.Context;
-import android.media.AudioAttributes;
 import android.provider.Settings;
 
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingConstants;
 
 /**
  * The controller of the hearing device media routing list preference.
@@ -45,9 +45,8 @@
 
     @Override
     protected int[] getSupportedAttributeList() {
-        return new int[]{
-                AudioAttributes.USAGE_MEDIA,
-                AudioAttributes.USAGE_GAME};
+        return HearingAidAudioRoutingConstants.MEDIA_ROUTING_ATTRIBUTES;
+
     }
 
     @Override
@@ -64,6 +63,7 @@
     @Override
     protected int restoreRoutingValue(Context context) {
         return Settings.Secure.getInt(context.getContentResolver(),
-                Settings.Secure.HEARING_AID_MEDIA_ROUTING, RoutingValue.AUTO);
+                Settings.Secure.HEARING_AID_MEDIA_ROUTING,
+                HearingAidAudioRoutingConstants.RoutingValue.AUTO);
     }
 }
diff --git a/src/com/android/settings/bluetooth/HearingDeviceRingtoneRoutingPreferenceController.java b/src/com/android/settings/bluetooth/HearingDeviceRingtoneRoutingPreferenceController.java
index 325d394..006cb6b 100644
--- a/src/com/android/settings/bluetooth/HearingDeviceRingtoneRoutingPreferenceController.java
+++ b/src/com/android/settings/bluetooth/HearingDeviceRingtoneRoutingPreferenceController.java
@@ -17,10 +17,10 @@
 package com.android.settings.bluetooth;
 
 import android.content.Context;
-import android.media.AudioAttributes;
 import android.provider.Settings;
 
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingConstants;
 
 /**
  * The controller of the hearing device ringtone routing list preference.
@@ -45,7 +45,8 @@
 
     @Override
     protected int[] getSupportedAttributeList() {
-        return new int[] {AudioAttributes.USAGE_NOTIFICATION_RINGTONE};
+        return HearingAidAudioRoutingConstants.RINGTONE_ROUTING_ATTRIBUTE;
+
     }
 
     @Override
@@ -62,6 +63,7 @@
     @Override
     protected int restoreRoutingValue(Context context) {
         return Settings.Secure.getInt(context.getContentResolver(),
-                Settings.Secure.HEARING_AID_RINGTONE_ROUTING, RoutingValue.AUTO);
+                Settings.Secure.HEARING_AID_RINGTONE_ROUTING,
+                HearingAidAudioRoutingConstants.RoutingValue.AUTO);
     }
 }
diff --git a/src/com/android/settings/bluetooth/HearingDeviceSystemSoundsRoutingPreferenceController.java b/src/com/android/settings/bluetooth/HearingDeviceSystemSoundsRoutingPreferenceController.java
index 19de713..a66cfab 100644
--- a/src/com/android/settings/bluetooth/HearingDeviceSystemSoundsRoutingPreferenceController.java
+++ b/src/com/android/settings/bluetooth/HearingDeviceSystemSoundsRoutingPreferenceController.java
@@ -17,10 +17,10 @@
 package com.android.settings.bluetooth;
 
 import android.content.Context;
-import android.media.AudioAttributes;
 import android.provider.Settings;
 
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingConstants;
 
 /**
  * The controller of the hearing device system sounds routing list preference.
@@ -46,14 +46,8 @@
 
     @Override
     protected int[] getSupportedAttributeList() {
-        return new int[]{
-                AudioAttributes.USAGE_ALARM,
-                AudioAttributes.USAGE_NOTIFICATION,
-                AudioAttributes.USAGE_NOTIFICATION_EVENT,
-                AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY,
-                AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE,
-                AudioAttributes.USAGE_ASSISTANCE_SONIFICATION,
-                AudioAttributes.USAGE_ASSISTANT};
+        return HearingAidAudioRoutingConstants.SYSTEM_SOUNDS_ROUTING_ATTRIBUTES;
+
     }
 
     @Override
@@ -71,6 +65,7 @@
     @Override
     protected int restoreRoutingValue(Context context) {
         return Settings.Secure.getInt(context.getContentResolver(),
-                Settings.Secure.HEARING_AID_SYSTEM_SOUNDS_ROUTING, RoutingValue.AUTO);
+                Settings.Secure.HEARING_AID_SYSTEM_SOUNDS_ROUTING,
+                HearingAidAudioRoutingConstants.RoutingValue.AUTO);
     }
 }
diff --git a/src/com/android/settings/core/SettingsBaseActivity.java b/src/com/android/settings/core/SettingsBaseActivity.java
index b4380ab..ff84a3f 100644
--- a/src/com/android/settings/core/SettingsBaseActivity.java
+++ b/src/com/android/settings/core/SettingsBaseActivity.java
@@ -50,6 +50,7 @@
 import com.google.android.material.appbar.CollapsingToolbarLayout;
 import com.google.android.material.resources.TextAppearanceConfig;
 import com.google.android.setupcompat.util.WizardManagerHelper;
+import com.google.android.setupdesign.transition.TransitionHelper;
 import com.google.android.setupdesign.util.ThemeHelper;
 
 /** Base activity for Settings pages */
@@ -77,6 +78,11 @@
 
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
+        final boolean isAnySetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
+        if (isAnySetupWizard) {
+            TransitionHelper.applyForwardTransition(this);
+            TransitionHelper.applyBackwardTransition(this);
+        }
         super.onCreate(savedInstanceState);
         if (isFinishing()) {
             return;
@@ -97,7 +103,6 @@
             requestWindowFeature(Window.FEATURE_NO_TITLE);
         }
         // Apply SetupWizard light theme during setup flow. This is for SubSettings pages.
-        final boolean isAnySetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
         if (isAnySetupWizard && this instanceof SubSettings) {
             setTheme(SetupWizardUtils.getTheme(this, getIntent()));
             setTheme(R.style.SettingsPreferenceTheme_SetupWizard);
diff --git a/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceController.java b/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceController.java
index 2c06a51..96ca4e5 100644
--- a/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceController.java
+++ b/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceController.java
@@ -50,7 +50,7 @@
         final Preference preference = screen.findPreference(getPreferenceKey());
         if (preference != null) {
             preference.setOnPreferenceClickListener(preference1 -> {
-                final Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER);
+                final Intent intent = CustomizableLockScreenUtils.newIntent();
                 final String packageName =
                         mContext.getString(R.string.config_wallpaper_picker_package);
                 if (!TextUtils.isEmpty(packageName)) {
diff --git a/src/com/android/settings/display/CustomizableLockScreenUtils.java b/src/com/android/settings/display/CustomizableLockScreenUtils.java
index 2e9f53d..d945652 100644
--- a/src/com/android/settings/display/CustomizableLockScreenUtils.java
+++ b/src/com/android/settings/display/CustomizableLockScreenUtils.java
@@ -18,6 +18,8 @@
 
 import android.content.ContentResolver;
 import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
 import android.database.Cursor;
 import android.net.Uri;
 import android.text.TextUtils;
@@ -67,6 +69,10 @@
      * <p>This is a slow, blocking call that shouldn't be made on the main thread.
      */
     public static boolean isFeatureEnabled(Context context) {
+        if (!isWallpaperPickerInstalled(context)) {
+            return false;
+        }
+
         try (Cursor cursor = context.getContentResolver().query(
                 FLAGS_URI,
                 null,
@@ -151,4 +157,17 @@
             return null;
         }
     }
+
+    /**
+     * Returns a new {@link Intent} that can be used to start the wallpaper picker
+     * activity.
+     */
+    public static Intent newIntent() {
+        return new Intent(Intent.ACTION_SET_WALLPAPER);
+    }
+
+    private static boolean isWallpaperPickerInstalled(Context context) {
+        final PackageManager packageManager = context.getPackageManager();
+        return newIntent().resolveActivity(packageManager) != null;
+    }
 }
diff --git a/src/com/android/settings/localepicker/LocaleFeatureProviderImpl.java b/src/com/android/settings/localepicker/LocaleFeatureProviderImpl.java
index b6c21db..0af9d2f 100644
--- a/src/com/android/settings/localepicker/LocaleFeatureProviderImpl.java
+++ b/src/com/android/settings/localepicker/LocaleFeatureProviderImpl.java
@@ -27,9 +27,19 @@
     @Override
     public String getLocaleNames() {
         final LocaleList locales = LocalePicker.getLocales();
-        Locale[] arrLocalesWithoutExtension = new Locale[locales.size()];
-        for (int i = 0; i < locales.size(); i++) {
-            arrLocalesWithoutExtension[i] = locales.get(i).stripExtensions();
+        return getLocaleNames(locales);
+    }
+
+    /**
+     * Returns displayable string of inputted locales.
+     */
+    public String getLocaleNames(LocaleList inputLocales) {
+        if (inputLocales.isEmpty()) {
+            return "";
+        }
+        Locale[] arrLocalesWithoutExtension = new Locale[inputLocales.size()];
+        for (int i = 0; i < inputLocales.size(); i++) {
+            arrLocalesWithoutExtension[i] = inputLocales.get(i).stripExtensions();
         }
         final Locale displayLocale = Locale.getDefault();
         return LocaleHelper.toSentenceCase(
diff --git a/src/com/android/settings/network/MobileNetworkRepository.java b/src/com/android/settings/network/MobileNetworkRepository.java
index 1e57c48..bec65e2 100644
--- a/src/com/android/settings/network/MobileNetworkRepository.java
+++ b/src/com/android/settings/network/MobileNetworkRepository.java
@@ -111,8 +111,12 @@
     private Map<Integer, SubscriptionInfo> mSubscriptionInfoMap = new ArrayMap<>();
     private Map<Integer, TelephonyManager> mTelephonyManagerMap = new HashMap<>();
     private Map<Integer, PhoneCallStateTelephonyCallback> mTelephonyCallbackMap = new HashMap<>();
-    private BroadcastReceiver mDataSubscriptionChangedReceiver = null;
-
+    private BroadcastReceiver mDataSubscriptionChangedReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            onSubscriptionsChanged();
+        }
+    };
     @NonNull
     public static MobileNetworkRepository getInstance(Context context) {
         synchronized (sInstanceLock) {
@@ -142,8 +146,6 @@
         mFilter.addAction(SubscriptionManager.ACTION_DEFAULT_SUBSCRIPTION_CHANGED);
         mFilter.addAction(ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED);
         mFilter.addAction(SubscriptionManager.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED);
-        mDataSubscriptionChangedReceiver = new DataSubscriptionChangedReceiver();
-        mContext.registerReceiver(mDataSubscriptionChangedReceiver, mFilter);
     }
 
     private class AirplaneModeObserver extends ContentObserver {
@@ -171,13 +173,6 @@
         }
     }
 
-    private class DataSubscriptionChangedReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            onSubscriptionsChanged();
-        }
-    }
-
     /**
      * Register all callbacks and listener.
      *
@@ -188,9 +183,16 @@
      */
     public void addRegister(LifecycleOwner lifecycleOwner,
             MobileNetworkCallback mobileNetworkCallback, int subId) {
+        if (sCallbacks.isEmpty()) {
+            mSubscriptionManager.addOnSubscriptionsChangedListener(mContext.getMainExecutor(),
+                    this);
+            mAirplaneModeObserver.register(mContext);
+            mContext.registerReceiver(mDataSubscriptionChangedReceiver, mFilter);
+            if (DEBUG) {
+                Log.d(TAG, "addRegister done");
+            }
+        }
         sCallbacks.add(mobileNetworkCallback);
-        mSubscriptionManager.addOnSubscriptionsChangedListener(mContext.getMainExecutor(), this);
-        mAirplaneModeObserver.register(mContext);
         observeAllSubInfo(lifecycleOwner);
         observeAllUiccInfo(lifecycleOwner);
         observeAllMobileNetworkInfo(lifecycleOwner);
@@ -200,7 +202,7 @@
         }
     }
 
-    private void addRegisterBySubId(int subId) {
+    public void addRegisterBySubId(int subId) {
         MobileDataContentObserver dataContentObserver = new MobileDataContentObserver(
                 new Handler(Looper.getMainLooper()));
         dataContentObserver.setOnMobileDataChangedListener(() -> {
@@ -268,10 +270,7 @@
         if (sCallbacks.isEmpty()) {
             mSubscriptionManager.removeOnSubscriptionsChangedListener(this);
             mAirplaneModeObserver.unRegister(mContext);
-            if (mDataSubscriptionChangedReceiver != null) {
-                mContext.unregisterReceiver(mDataSubscriptionChangedReceiver);
-                mDataSubscriptionChangedReceiver = null;
-            }
+            mContext.unregisterReceiver(mDataSubscriptionChangedReceiver);
             mDataContentObserverMap.forEach((id, observer) -> {
                 observer.unRegister(mContext);
             });
@@ -285,6 +284,9 @@
             });
             mTelephonyCallbackMap.clear();
             mTelephonyManagerMap.clear();
+            if (DEBUG) {
+                Log.d(TAG, "removeRegister done");
+            }
         }
     }
 
diff --git a/src/com/android/settings/network/telephony/DefaultSubscriptionController.java b/src/com/android/settings/network/telephony/DefaultSubscriptionController.java
index 01ec5df..c8f7acf 100644
--- a/src/com/android/settings/network/telephony/DefaultSubscriptionController.java
+++ b/src/com/android/settings/network/telephony/DefaultSubscriptionController.java
@@ -104,8 +104,13 @@
 
     @OnLifecycleEvent(ON_RESUME)
     public void onResume() {
-        mMobileNetworkRepository.addRegister(mLifecycleOwner, this, getDefaultSubscriptionId());
+        mMobileNetworkRepository.addRegister(mLifecycleOwner, this,
+                SubscriptionManager.INVALID_SUBSCRIPTION_ID);
         mMobileNetworkRepository.updateEntity();
+        // Can not get default subId from database until get the callback, add register by subId
+        // later.
+        mMobileNetworkRepository.addRegisterBySubId(getDefaultSubscriptionId());
+
     }
 
     @OnLifecycleEvent(ON_PAUSE)
diff --git a/src/com/android/settings/password/SetupChooseLockGeneric.java b/src/com/android/settings/password/SetupChooseLockGeneric.java
index 797f1eb..17d83b3 100644
--- a/src/com/android/settings/password/SetupChooseLockGeneric.java
+++ b/src/com/android/settings/password/SetupChooseLockGeneric.java
@@ -108,6 +108,7 @@
             super.onViewCreated(view, savedInstanceState);
 
             GlifPreferenceLayout layout = (GlifPreferenceLayout) view;
+            layout.setDescriptionText(loadDescriptionText());
             layout.setDividerItemDecoration(new SettingsDividerItemDecoration(getContext()));
             layout.setDividerInset(getContext().getResources().getDimensionPixelSize(
                     R.dimen.sud_items_glif_text_divider_inset));
@@ -128,11 +129,9 @@
 
         @Override
         protected void addHeaderView() {
-            if (isForBiometric()) {
-                setHeaderView(R.layout.setup_choose_lock_generic_biometrics_header);
-            } else {
-                setHeaderView(R.layout.setup_choose_lock_generic_header);
-            }
+            // The original logic has been moved to onViewCreated and
+            // uses GlifLayout#setDescriptionText instead,
+            // keep empty body here since we won't call super method.
         }
 
         @Override
@@ -229,6 +228,12 @@
         private boolean isForBiometric() {
             return mForFingerprint || mForFace || mForBiometrics;
         }
+
+        String loadDescriptionText() {
+            return getString(isForBiometric()
+                    ? R.string.lock_settings_picker_biometrics_added_security_message
+                    : R.string.setup_lock_settings_picker_message);
+        }
     }
 
     public static class InternalActivity extends ChooseLockGeneric.InternalActivity {
diff --git a/src/com/android/settings/regionalpreferences/NumberingSystemController.java b/src/com/android/settings/regionalpreferences/NumberingSystemController.java
index d9feba4..d936fbf 100644
--- a/src/com/android/settings/regionalpreferences/NumberingSystemController.java
+++ b/src/com/android/settings/regionalpreferences/NumberingSystemController.java
@@ -17,16 +17,26 @@
 package com.android.settings.regionalpreferences;
 
 import android.content.Context;
+import android.os.LocaleList;
 
+import com.android.internal.app.LocaleStore;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.localepicker.LocaleFeatureProviderImpl;
 
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Set;
+
 /** A controller for the entry of Numbering System's page */
 public class NumberingSystemController extends BasePreferenceController {
     private static final String TAG = NumberingSystemController.class.getSimpleName();
 
+    private LocaleList mLocaleList;
     public NumberingSystemController(Context context, String preferenceKey) {
         super(context, preferenceKey);
+        // Initialize the supported languages to LocaleInfos
+        LocaleStore.fillCache(context);
+        mLocaleList = getNumberingSystemLocale();
     }
 
     /**
@@ -42,11 +52,31 @@
      */
     @Override
     public int getAvailabilityStatus() {
-        return AVAILABLE;
+        return mLocaleList.isEmpty() ? CONDITIONALLY_UNAVAILABLE : AVAILABLE;
+    }
+
+    private static LocaleList getNumberingSystemLocale() {
+        LocaleList localeList = LocaleList.getDefault();
+        Set<Locale> localesHasNumberingSystems = new HashSet<>();
+        for (int i = 0; i < localeList.size(); i++) {
+            Locale locale = localeList.get(i);
+            LocaleStore.LocaleInfo localeInfo = LocaleStore.getLocaleInfo(locale);
+            if (localeInfo.hasNumberingSystems()) {
+                localesHasNumberingSystems.add(locale);
+            }
+        }
+        return convertToLocaleList(localesHasNumberingSystems);
+    }
+
+    private static LocaleList convertToLocaleList(Set<Locale> locales) {
+        if (locales.isEmpty()) {
+            return LocaleList.getEmptyLocaleList();
+        }
+        return new LocaleList(locales.stream().toArray(Locale[]::new));
     }
 
     @Override
     public CharSequence getSummary() {
-        return new LocaleFeatureProviderImpl().getLocaleNames();
+        return new LocaleFeatureProviderImpl().getLocaleNames(getNumberingSystemLocale());
     }
 }
diff --git a/src/com/android/settings/regionalpreferences/NumberingSystemItemController.java b/src/com/android/settings/regionalpreferences/NumberingSystemItemController.java
index fc26b53..8e2d735 100644
--- a/src/com/android/settings/regionalpreferences/NumberingSystemItemController.java
+++ b/src/com/android/settings/regionalpreferences/NumberingSystemItemController.java
@@ -30,6 +30,7 @@
 
 import com.android.internal.app.LocaleHelper;
 import com.android.internal.app.LocalePicker;
+import com.android.internal.app.LocaleStore;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.core.SubSettingLauncher;
 import com.android.settings.dashboard.DashboardFragment;
@@ -52,6 +53,8 @@
 
     public NumberingSystemItemController(Context context, Bundle argument) {
         super(context, "no_key");
+        // Initialize the supported languages to LocaleInfos
+        LocaleStore.fillCache(context);
         mOption = argument.getString(
                 RegionalPreferencesEntriesFragment.ARG_KEY_REGIONAL_PREFERENCE, "");
         mSelectedLanguage = argument.getString(
@@ -111,8 +114,12 @@
         // Get current system language list to show on screen.
         LocaleList localeList = LocaleList.getDefault();
         for (int i = 0; i < localeList.size(); i++) {
-            Preference pref = new Preference(mContext);
             Locale locale = localeList.get(i);
+            LocaleStore.LocaleInfo localeInfo = LocaleStore.getLocaleInfo(locale);
+            if (!localeInfo.hasNumberingSystems()) {
+                continue;
+            }
+            Preference pref = new Preference(mContext);
             pref.setTitle(LocaleHelper.getDisplayName(locale.stripExtensions(), locale, true));
             pref.setKey(locale.toLanguageTag());
             pref.setSummary(getNumberingSystem(locale));
diff --git a/src/com/android/settings/tts/TextToSpeechSettings.java b/src/com/android/settings/tts/TextToSpeechSettings.java
index 621b222..9f1d2f3 100644
--- a/src/com/android/settings/tts/TextToSpeechSettings.java
+++ b/src/com/android/settings/tts/TextToSpeechSettings.java
@@ -811,6 +811,14 @@
     }
 
     public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
-            new BaseSearchIndexProvider(R.xml.tts_settings);
+            new BaseSearchIndexProvider(R.xml.tts_settings) {
+                @Override
+                protected boolean isPageSearchEnabled(Context context) {
+                    TtsEngines ttsEngines = new TtsEngines(context);
+                    return !ttsEngines.getEngines().isEmpty() &&
+                            context.getResources().getBoolean(
+                                    R.bool.config_show_tts_settings_summary);
+                }
+            };
 
 }
diff --git a/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java b/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java
index 63ab173..60031b0 100644
--- a/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java
+++ b/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java
@@ -655,6 +655,10 @@
             try {
                 mWifiManager.addOrUpdatePasspointConfiguration(passpointConfig);
                 mAnyNetworkSavedSuccess = true;
+
+                // (force) enable MAC randomization on new credentials
+                mWifiManager.setMacRandomizationSettingPasspointEnabled(
+                        passpointConfig.getHomeSp().getFqdn(), true);
             } catch (IllegalArgumentException e) {
                 mResultCodeArrayList.set(mUiToRequestedList.get(index).mIndex,
                         RESULT_NETWORK_ADD_ERROR);
@@ -669,6 +673,10 @@
             final WifiConfiguration wifiConfiguration =
                     mUiToRequestedList.get(index).mWifiNetworkSuggestion.getWifiConfiguration();
             wifiConfiguration.SSID = addQuotationIfNeeded(wifiConfiguration.SSID);
+
+            // (force) enable MAC randomization on new credentials
+            wifiConfiguration.setMacRandomizationSetting(
+                    WifiConfiguration.RANDOMIZATION_PERSISTENT);
             mWifiManager.save(wifiConfiguration, mSaveListener);
         }
     }
diff --git a/tests/robotests/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceControllerTest.java
index 5be36c8..105da65 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/HearingDeviceAudioRoutingBasePreferenceControllerTest.java
@@ -20,15 +20,13 @@
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.spy;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.bluetooth.BluetoothDevice;
 import android.content.Context;
-import android.content.SharedPreferences;
 import android.media.AudioAttributes;
 import android.media.AudioDeviceAttributes;
 import android.media.AudioDeviceInfo;
@@ -38,7 +36,10 @@
 import androidx.preference.ListPreference;
 import androidx.test.core.app.ApplicationProvider;
 
+import com.android.settings.R;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingConstants;
+import com.android.settingslib.bluetooth.HearingAidAudioRoutingHelper;
 
 import org.junit.Before;
 import org.junit.Rule;
@@ -63,71 +64,67 @@
     private final Context mContext = ApplicationProvider.getApplicationContext();
     private static final String TEST_DEVICE_ADDRESS = "00:A1:A1:A1:A1:A1";
     private static final String FAKE_KEY = "fake_key";
-    private static final String TEST_SHARED_PREFERENCE = "test_bluetooth_settings";
 
     @Mock
+    private AudioProductStrategy mAudioProductStrategyMedia;
+    @Mock
     private CachedBluetoothDevice mCachedBluetoothDevice;
     @Mock
-    private AudioProductStrategy mAudioProductStrategyMedia;
-    private AudioDeviceAttributes mHearingDeviceAttribute;
-    private ListPreference mListPreference;
+    private BluetoothDevice mBluetoothDevice;
+    @Spy
+    private HearingAidAudioRoutingHelper mHelper = new HearingAidAudioRoutingHelper(mContext);
+    private final ListPreference mListPreference = new ListPreference(mContext);
     private TestHearingDeviceAudioRoutingBasePreferenceController mController;
 
     @Before
     public void setUp() {
-        mListPreference = new ListPreference(mContext);
-        when(mCachedBluetoothDevice.getAddress()).thenReturn(TEST_DEVICE_ADDRESS);
-        mHearingDeviceAttribute = new AudioDeviceAttributes(
+        final AudioDeviceAttributes hearingDeviceAttribute = new AudioDeviceAttributes(
                 AudioDeviceAttributes.ROLE_OUTPUT,
                 AudioDeviceInfo.TYPE_HEARING_AID,
                 TEST_DEVICE_ADDRESS);
+
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getAnonymizedAddress()).thenReturn(TEST_DEVICE_ADDRESS);
+        when(mCachedBluetoothDevice.getAddress()).thenReturn(TEST_DEVICE_ADDRESS);
+        when(mHelper.getMatchedHearingDeviceAttributes(any())).thenReturn(hearingDeviceAttribute);
         when(mAudioProductStrategyMedia.getAudioAttributesForLegacyStreamType(
                 AudioManager.STREAM_MUSIC))
                 .thenReturn((new AudioAttributes.Builder()).build());
-        doReturn(getSharedPreferences()).when(mContext).getSharedPreferences(anyString(), anyInt());
+        when(mHelper.getAudioProductStrategies()).thenReturn(List.of(mAudioProductStrategyMedia));
 
-        mController = spy(
-                new TestHearingDeviceAudioRoutingBasePreferenceController(mContext, FAKE_KEY));
-        mController.setupForTesting(mCachedBluetoothDevice);
-        doReturn(List.of(mAudioProductStrategyMedia)).when(mController).getAudioProductStrategies();
+        mController = new TestHearingDeviceAudioRoutingBasePreferenceController(mContext, FAKE_KEY,
+                mHelper);
+        TestHearingDeviceAudioRoutingBasePreferenceController.setupForTesting(
+                mCachedBluetoothDevice);
+        mListPreference.setEntries(R.array.bluetooth_audio_routing_titles);
+        mListPreference.setEntryValues(R.array.bluetooth_audio_routing_values);
+        mListPreference.setSummary("%s");
     }
 
     @Test
-    public void onPreferenceChange_routingValueAuto_expectedListValue() {
-        mController.onPreferenceChange(mListPreference, String.valueOf(
-                HearingDeviceAudioRoutingBasePreferenceController.RoutingValue.AUTO));
+    public void updateState_routingValueAuto_expectedSummary() {
+        mController.saveRoutingValue(mContext, HearingAidAudioRoutingConstants.RoutingValue.AUTO);
 
-        verify(mController).removePreferredDeviceForStrategies(any());
-        assertThat(mListPreference.getValue()).isEqualTo(String.valueOf(
-                HearingDeviceAudioRoutingBasePreferenceController.RoutingValue.AUTO));
+        mController.updateState(mListPreference);
+
+        assertThat(mListPreference.getSummary().toString()).isEqualTo(
+                mListPreference.getEntries()[0].toString());
     }
 
     @Test
-    public void onPreferenceChange_routingValueHearingDevice_expectedListValue() {
+    public void onPreferenceChange_routingValueHearingDevice_restoreSameValue() {
         mController.onPreferenceChange(mListPreference, String.valueOf(
-                HearingDeviceAudioRoutingBasePreferenceController.RoutingValue.HEARING_DEVICE));
+                HearingAidAudioRoutingConstants.RoutingValue.HEARING_DEVICE));
 
-        verify(mController).setPreferredDeviceForStrategies(any(), eq(mHearingDeviceAttribute));
-        assertThat(mListPreference.getValue()).isEqualTo(String.valueOf(
-                HearingDeviceAudioRoutingBasePreferenceController.RoutingValue.HEARING_DEVICE));
+        assertThat(mController.restoreRoutingValue(mContext)).isEqualTo(
+                HearingAidAudioRoutingConstants.RoutingValue.HEARING_DEVICE);
     }
 
     @Test
-    public void onPreferenceChange_routingValueDeviceSpeaker_expectedListValue() {
-        final AudioDeviceAttributes deviceSpeakerOut = new AudioDeviceAttributes(
-                AudioDeviceAttributes.ROLE_OUTPUT, AudioDeviceInfo.TYPE_BUILTIN_SPEAKER, "");
+    public void onPreferenceChange_noMatchedDeviceAttributes_notCallSetStrategies() {
+        when(mHelper.getMatchedHearingDeviceAttributes(any())).thenReturn(null);
 
-        mController.onPreferenceChange(mListPreference, String.valueOf(
-                HearingDeviceAudioRoutingBasePreferenceController.RoutingValue.DEVICE_SPEAKER));
-
-        verify(mController).setPreferredDeviceForStrategies(any(), eq(deviceSpeakerOut));
-        assertThat(mListPreference.getValue()).isEqualTo(String.valueOf(
-                HearingDeviceAudioRoutingBasePreferenceController.RoutingValue.DEVICE_SPEAKER));
-
-    }
-
-    private SharedPreferences getSharedPreferences() {
-        return mContext.getSharedPreferences(TEST_SHARED_PREFERENCE, Context.MODE_PRIVATE);
+        verify(mHelper, never()).setPreferredDeviceRoutingStrategies(any(), isNull(), anyInt());
     }
 
     private static class TestHearingDeviceAudioRoutingBasePreferenceController extends
@@ -137,8 +134,8 @@
         private static int sSavedRoutingValue;
 
         TestHearingDeviceAudioRoutingBasePreferenceController(Context context,
-                String preferenceKey) {
-            super(context, preferenceKey);
+                String preferenceKey, HearingAidAudioRoutingHelper helper) {
+            super(context, preferenceKey, helper);
         }
 
         @Override
diff --git a/tests/robotests/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceControllerTest.java
index 4ad5c22..78a9e99 100644
--- a/tests/robotests/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/CustomizableLockScreenQuickAffordancesPreferenceControllerTest.java
@@ -21,6 +21,8 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -28,6 +30,10 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
 import android.database.MatrixCursor;
 import android.text.TextUtils;
 
@@ -54,6 +60,7 @@
 
     @Mock private Context mContext;
     @Mock private ContentResolver mContentResolver;
+    @Mock private PackageManager mPackageManager;
 
     private CustomizableLockScreenQuickAffordancesPreferenceController mUnderTest;
 
@@ -63,20 +70,28 @@
         when(mContext.getContentResolver()).thenReturn(mContentResolver);
         when(mContext.getResources())
                 .thenReturn(ApplicationProvider.getApplicationContext().getResources());
+        when(mContext.getPackageManager()).thenReturn(mPackageManager);
 
         mUnderTest = new CustomizableLockScreenQuickAffordancesPreferenceController(mContext, KEY);
     }
 
     @Test
-    public void getAvailabilityStatus_whenEnabled() {
-        setEnabled(true);
+    public void getAvailabilityStatus_whenFeatureEnabled() {
+        setEnabled(/* isWallpaperPickerInstalled= */ true, /* isFeatureEnabled = */ true);
 
         assertThat(mUnderTest.getAvailabilityStatus()).isEqualTo(AVAILABLE);
     }
 
     @Test
-    public void getAvailabilityStatus_whenNotEnabled() {
-        setEnabled(false);
+    public void getAvailabilityStatus_whenWallpaperPickerNotInstalledEnabled() {
+        setEnabled(/* isWallpaperPickerInstalled= */ false, /* isFeatureEnabled = */ true);
+
+        assertThat(mUnderTest.getAvailabilityStatus()).isEqualTo(UNSUPPORTED_ON_DEVICE);
+    }
+
+    @Test
+    public void getAvailabilityStatus_whenFeatureNotEnabled() {
+        setEnabled(/* isWallpaperPickerInstalled= */ true, /* isFeatureEnabled = */ false);
 
         assertThat(mUnderTest.getAvailabilityStatus()).isEqualTo(UNSUPPORTED_ON_DEVICE);
     }
@@ -127,13 +142,29 @@
         assertThat(TextUtils.equals(mUnderTest.getSummary(), "one, two")).isTrue();
     }
 
-    private void setEnabled(boolean isEnabled) {
+    private void setEnabled(boolean isWallpaperPickerInstalled, boolean isFeatureEnabled) {
+        if (isWallpaperPickerInstalled) {
+            final ResolveInfo resolveInfo = new ResolveInfo();
+            final ActivityInfo activityInfo = new ActivityInfo();
+            final ApplicationInfo applicationInfo = new ApplicationInfo();
+            applicationInfo.packageName = "com.fake.name";
+            activityInfo.applicationInfo = applicationInfo;
+            activityInfo.name = "someName";
+            resolveInfo.activityInfo = activityInfo;
+            when(mPackageManager.resolveActivity(any(), anyInt())).thenReturn(resolveInfo);
+        } else {
+            when(mPackageManager.resolveActivity(any(), anyInt())).thenReturn(null);
+        }
+
         final MatrixCursor cursor = new MatrixCursor(
                 new String[] {
                         CustomizableLockScreenUtils.NAME,
                         CustomizableLockScreenUtils.VALUE
                 });
-        cursor.addRow(new Object[] { CustomizableLockScreenUtils.ENABLED_FLAG, isEnabled ? 1 : 0 });
+        cursor.addRow(
+                new Object[] {
+                    CustomizableLockScreenUtils.ENABLED_FLAG, isFeatureEnabled ? 1 : 0
+                });
         when(
                 mContentResolver.query(
                         CustomizableLockScreenUtils.FLAGS_URI, null, null, null))
diff --git a/tests/robotests/src/com/android/settings/password/SetupChooseLockGenericTest.java b/tests/robotests/src/com/android/settings/password/SetupChooseLockGenericTest.java
index cd79f58..494d3f0 100644
--- a/tests/robotests/src/com/android/settings/password/SetupChooseLockGenericTest.java
+++ b/tests/robotests/src/com/android/settings/password/SetupChooseLockGenericTest.java
@@ -23,15 +23,20 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import static org.robolectric.Shadows.shadowOf;
-
 import android.content.Intent;
+import android.text.TextUtils;
 
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+
+import com.android.settings.password.SetupChooseLockGeneric.SetupChooseLockGenericFragment;
 import com.android.settings.testutils.shadow.ShadowLockPatternUtils;
 import com.android.settings.testutils.shadow.ShadowPasswordUtils;
 import com.android.settings.testutils.shadow.ShadowUserManager;
 import com.android.settings.testutils.shadow.ShadowUtils;
 
+import com.google.android.setupdesign.GlifPreferenceLayout;
+
 import org.junit.After;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -41,6 +46,8 @@
 import org.robolectric.annotation.Config;
 import org.robolectric.shadows.ShadowActivity;
 
+import java.util.List;
+
 @RunWith(RobolectricTestRunner.class)
 @Config(shadows = {
         ShadowUserManager.class,
@@ -78,4 +85,43 @@
         ShadowActivity shadowActivity = Shadows.shadowOf(activity);
         assertThat(shadowActivity.isFinishing()).isFalse();
     }
+
+    @Test
+    public void setupChooseLockGenericUsingDescriptionTextOfGlifLayout() {
+        SetupChooseLockGenericFragment fragment = getFragmentOfSetupChooseLockGeneric(false);
+        GlifPreferenceLayout view = getViewOfSetupChooseLockGenericFragment(fragment);
+        assertThat(TextUtils.isEmpty(view.getDescriptionText())).isFalse();
+        assertThat(view.getDescriptionText().toString()).isEqualTo(fragment.loadDescriptionText());
+    }
+
+    @Test
+    public void setupChooseLockGenericUsingDescriptionTextOfGlifLayoutForBiometric() {
+        SetupChooseLockGenericFragment fragment = getFragmentOfSetupChooseLockGeneric(true);
+        GlifPreferenceLayout view = getViewOfSetupChooseLockGenericFragment(fragment);
+        assertThat(TextUtils.isEmpty(view.getDescriptionText())).isFalse();
+        assertThat(view.getDescriptionText().toString()).isEqualTo(fragment.loadDescriptionText());
+    }
+
+    private SetupChooseLockGenericFragment getFragmentOfSetupChooseLockGeneric(boolean biometric) {
+        ShadowPasswordUtils.addGrantedPermission(REQUEST_PASSWORD_COMPLEXITY);
+        Intent intent = new Intent("com.android.settings.SETUP_LOCK_SCREEN");
+        intent.putExtra(EXTRA_KEY_REQUESTED_MIN_COMPLEXITY, PASSWORD_COMPLEXITY_HIGH);
+        intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_FOR_FINGERPRINT, biometric);
+        SetupChooseLockGeneric activity =
+                Robolectric.buildActivity(SetupChooseLockGeneric.class, intent).setup().get();
+
+        List<Fragment> fragments = activity.getSupportFragmentManager().getFragments();
+        assertThat(fragments).isNotNull();
+        assertThat(fragments.size()).isEqualTo(1);
+        assertThat(fragments.get(0)).isInstanceOf(SetupChooseLockGenericFragment.class);
+
+        return (SetupChooseLockGenericFragment) fragments.get(0);
+    }
+    private GlifPreferenceLayout getViewOfSetupChooseLockGenericFragment(
+            @NonNull SetupChooseLockGenericFragment fragment) {
+        assertThat(fragment.getView()).isNotNull();
+        assertThat(fragment.getView()).isInstanceOf(GlifPreferenceLayout.class);
+
+        return (GlifPreferenceLayout) fragment.getView();
+    }
 }
diff --git a/tests/unit/src/com/android/settings/applications/credentials/CredentialManagerPreferenceControllerTest.java b/tests/unit/src/com/android/settings/applications/credentials/CredentialManagerPreferenceControllerTest.java
index cba3101..2109f12 100644
--- a/tests/unit/src/com/android/settings/applications/credentials/CredentialManagerPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/applications/credentials/CredentialManagerPreferenceControllerTest.java
@@ -318,11 +318,11 @@
         Map<String, SwitchPreference> prefs =
                 controller.buildPreferenceList(mContext, mCredentialsPreferenceCategory);
         assertThat(prefs.size()).isEqualTo(3);
-        SwitchPreference pref1 = prefs.get(TEST_PACKAGE_NAME_C);
+        SwitchPreference pref1 = prefs.get(TEST_PACKAGE_NAME_A);
         assertThat(pref1).isNotNull();
         assertThat(pref1.getTitle()).isEqualTo(TEST_TITLE_APP_A);
         assertThat(pref1.isChecked()).isFalse();
-        SwitchPreference pref2 = prefs.get(TEST_PACKAGE_NAME_C);
+        SwitchPreference pref2 = prefs.get(TEST_PACKAGE_NAME_B);
         assertThat(pref2).isNotNull();
         assertThat(pref2.getTitle()).isEqualTo(TEST_TITLE_APP_B);
         assertThat(pref2.isChecked()).isFalse();
diff --git a/tests/unit/src/com/android/settings/regionalpreferences/NumberingPreferencesFragmentTest.java b/tests/unit/src/com/android/settings/regionalpreferences/NumberingPreferencesFragmentTest.java
index 92cfb69..5a579a3 100644
--- a/tests/unit/src/com/android/settings/regionalpreferences/NumberingPreferencesFragmentTest.java
+++ b/tests/unit/src/com/android/settings/regionalpreferences/NumberingPreferencesFragmentTest.java
@@ -19,18 +19,15 @@
 import static org.junit.Assert.assertEquals;
 
 import android.app.settings.SettingsEnums;
-import android.content.Context;
 import android.os.Bundle;
 import android.os.Looper;
 
 import androidx.test.annotation.UiThreadTest;
-import androidx.test.core.app.ApplicationProvider;
 
 import org.junit.Before;
 import org.junit.Test;
 
 public class NumberingPreferencesFragmentTest {
-    private Context mApplicationContext;
     private NumberingPreferencesFragment mFragment;
 
     @Before
@@ -39,7 +36,6 @@
         if (Looper.myLooper() == null) {
             Looper.prepare();
         }
-        mApplicationContext = ApplicationProvider.getApplicationContext();
         mFragment = new NumberingPreferencesFragment();
     }
 
diff --git a/tests/unit/src/com/android/settings/regionalpreferences/NumberingSystemControllerTest.java b/tests/unit/src/com/android/settings/regionalpreferences/NumberingSystemControllerTest.java
new file mode 100644
index 0000000..6a95bb9
--- /dev/null
+++ b/tests/unit/src/com/android/settings/regionalpreferences/NumberingSystemControllerTest.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2023 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.regionalpreferences;
+
+import static com.android.settings.core.BasePreferenceController.AVAILABLE;
+import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE;
+
+import static org.junit.Assert.assertEquals;
+
+import android.content.Context;
+import android.os.LocaleList;
+
+import androidx.test.core.app.ApplicationProvider;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class NumberingSystemControllerTest {
+    private Context mApplicationContext;
+    private NumberingSystemController mController;
+
+    @Before
+    public void setUp() throws Exception {
+        mApplicationContext = ApplicationProvider.getApplicationContext();
+    }
+
+    @Test
+    public void getAvailabilityStatus_noLocale_unavailable() {
+        LocaleList.setDefault(LocaleList.forLanguageTags("en-US,zh-Hant-TW"));
+        mController = new NumberingSystemController(mApplicationContext, "key");
+
+        int result = mController.getAvailabilityStatus();
+
+        assertEquals(CONDITIONALLY_UNAVAILABLE, result);
+    }
+
+    @Test
+    public void getAvailabilityStatus_hasLocaleWithNumberingSystems_available() {
+        // ar-JO has different numbering system.
+        LocaleList.setDefault(LocaleList.forLanguageTags("en-US,zh-Hant-TW,ar-JO"));
+        mController = new NumberingSystemController(mApplicationContext, "key");
+
+        int result = mController.getAvailabilityStatus();
+
+        assertEquals(AVAILABLE, result);
+    }
+}
diff --git a/tests/unit/src/com/android/settings/regionalpreferences/NumberingSystemItemControllerTest.java b/tests/unit/src/com/android/settings/regionalpreferences/NumberingSystemItemControllerTest.java
index 0d9a334..5ec33db 100644
--- a/tests/unit/src/com/android/settings/regionalpreferences/NumberingSystemItemControllerTest.java
+++ b/tests/unit/src/com/android/settings/regionalpreferences/NumberingSystemItemControllerTest.java
@@ -111,8 +111,8 @@
 
     @Test
     @UiThreadTest
-    public void displayPreference_languageOptAndHas2Locale_show2Options() {
-        LocaleList.setDefault(LocaleList.forLanguageTags("en-US, zh-TW"));
+    public void displayPreference_languageOptAndHas2LocaleWithSingleNu_showNothing() {
+        LocaleList.setDefault(LocaleList.forLanguageTags("en-US,zh-TW"));
         Bundle bundle = new Bundle();
         bundle.putString(RegionalPreferencesEntriesFragment.ARG_KEY_REGIONAL_PREFERENCE,
                 NumberingSystemItemController.ARG_VALUE_LANGUAGE_SELECT);
@@ -123,13 +123,31 @@
 
         mController.displayPreference(mPreferenceScreen);
 
-        assertEquals(LocaleList.getDefault().size(), mPreferenceScreen.getPreferenceCount());
+        assertEquals(0, mPreferenceScreen.getPreferenceCount());
+    }
+
+    @Test
+    @UiThreadTest
+    public void displayPreference_languageOptAndHas2LocaleWithMultiNu_showLocaleWithMultiNuOnly() {
+        // ar-JO and dz-BT have multiple numbering systems.
+        LocaleList.setDefault(LocaleList.forLanguageTags("en-US,zh-TW,ar-JO,dz-BT"));
+        Bundle bundle = new Bundle();
+        bundle.putString(RegionalPreferencesEntriesFragment.ARG_KEY_REGIONAL_PREFERENCE,
+                NumberingSystemItemController.ARG_VALUE_LANGUAGE_SELECT);
+        bundle.putString(
+                NumberingSystemItemController.KEY_SELECTED_LANGUAGE, Locale.US.toLanguageTag());
+        mController = new NumberingSystemItemController(mApplicationContext, bundle);
+        mController.setParentFragment(mFragment);
+
+        mController.displayPreference(mPreferenceScreen);
+
+        assertEquals(2, mPreferenceScreen.getPreferenceCount());
     }
 
     @Test
     @UiThreadTest
     public void displayPreference_enUsNumbersOpt_show1Option() {
-        LocaleList.setDefault(LocaleList.forLanguageTags("en-US, zh-TW"));
+        LocaleList.setDefault(LocaleList.forLanguageTags("en-US,zh-TW"));
         Bundle bundle = new Bundle();
         bundle.putString(RegionalPreferencesEntriesFragment.ARG_KEY_REGIONAL_PREFERENCE,
                 NumberingSystemItemController.ARG_VALUE_NUMBERING_SYSTEM_SELECT);
