Merge "[Catalyst] Add multiple flags for 25Q3" into main
diff --git a/res/layout/accessibility_text_reading_preview.xml b/res/layout/accessibility_text_reading_preview.xml
index 2532a79..252736e 100644
--- a/res/layout/accessibility_text_reading_preview.xml
+++ b/res/layout/accessibility_text_reading_preview.xml
@@ -46,7 +46,6 @@
                 android:id="@+id/preview_pager"
                 android:layout_width="wrap_content"
                 android:layout_height="217dp"
-                android:contentDescription="@string/preview_pager_content_description"
                 android:nestedScrollingEnabled="true" />
             <LinearLayout
                 android:layout_width="match_parent"
diff --git a/res/layout/accessibility_text_reading_preview_app_grid.xml b/res/layout/accessibility_text_reading_preview_app_grid.xml
index 979c053..52fc574 100644
--- a/res/layout/accessibility_text_reading_preview_app_grid.xml
+++ b/res/layout/accessibility_text_reading_preview_app_grid.xml
@@ -14,14 +14,19 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-
-<com.android.settings.display.AppGridView
+<FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:numColumns="3"
-    android:gravity="center"
-    android:nestedScrollingEnabled="true"
-    android:importantForAccessibility="noHideDescendants"
-    app:appCount="6"/>
+    android:contentDescription="@string/preview_pager_home_content_description" >
+    <com.android.settings.display.AppGridView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:app="http://schemas.android.com/apk/res-auto"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:numColumns="3"
+        android:gravity="center"
+        android:nestedScrollingEnabled="true"
+        android:importantForAccessibility="noHideDescendants"
+        app:appCount="6"/>
+</FrameLayout>
diff --git a/res/layout/accessibility_text_reading_preview_mail_content.xml b/res/layout/accessibility_text_reading_preview_mail_content.xml
index e55d389..db5ee7d 100644
--- a/res/layout/accessibility_text_reading_preview_mail_content.xml
+++ b/res/layout/accessibility_text_reading_preview_mail_content.xml
@@ -14,18 +14,18 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-
 <androidx.core.widget.NestedScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:fillViewport="true"
-    android:importantForAccessibility="noHideDescendants">
+    android:contentDescription="@string/preview_pager_email_content_description">
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="vertical">
+        android:orientation="vertical"
+        android:importantForAccessibility="noHideDescendants">
 
         <TextView
             android:id="@+id/subject"
diff --git a/res/layout/screen_zoom_preview_1.xml b/res/layout/screen_zoom_preview_1.xml
index 97e0863..6e5bff9 100644
--- a/res/layout/screen_zoom_preview_1.xml
+++ b/res/layout/screen_zoom_preview_1.xml
@@ -19,12 +19,13 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:fillViewport="true"
-    android:importantForAccessibility="noHideDescendants">
+    android:contentDescription="@string/preview_pager_message_content_description">
 
     <view class="com.android.settings.TouchBlockingFrameLayout"
         android:id="@+id/frame"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:importantForAccessibility="noHideDescendants">
 
         <LinearLayout
             android:layout_width="match_parent"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 9c9a29c..af7b132 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -84,8 +84,6 @@
     <color name="homepage_location_background">@color/homepage_cyan_bg</color>
     <color name="homepage_accounts_foreground">@color/homepage_cyan_fg</color>
     <color name="homepage_accounts_background">@color/homepage_cyan_bg</color>
-    <color name="homepage_wellbeing_foreground">@color/homepage_cyan_fg</color>
-    <color name="homepage_wellbeing_background">@color/homepage_cyan_bg</color>
     <color name="homepage_supervision_foreground">@color/homepage_cyan_fg</color>
     <color name="homepage_supervision_background">@color/homepage_cyan_bg</color>
     <color name="homepage_safety_foreground">@color/homepage_red_fg</color>
diff --git a/res/values/config.xml b/res/values/config.xml
index ea16af4..4b38044 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -810,23 +810,13 @@
     <!-- Allowed packages to show the confirmation dialog for a system locale suggestion  -->
     <string-array name="allowed_packages_for_locale_confirmation_diallog" translatable="false"/>
 
-    <!-- Array of text reading preview layouts. Must contain at least 1 layout.
-        Add content descriptions in the config_text_reading_preview_content_descriptions together
-        if adding more sample layouts here -->
+    <!-- Array of text reading preview layouts. Must contain at least 1 layout -->
     <array name="config_text_reading_preview_samples">
         <item>@layout/accessibility_text_reading_preview_app_grid</item>
         <item>@layout/screen_zoom_preview_1</item>
         <item>@layout/accessibility_text_reading_preview_mail_content</item>
     </array>
 
-    <!-- Array of text reading preview layouts' content descriptions.
-        The order should be the same as the layouts in config_text_reading_preview_samples -->
-    <array name="config_text_reading_preview_content_descriptions">
-        <item>@string/preview_pager_home_content_description</item>
-        <item>@string/preview_pager_message_content_description</item>
-        <item>@string/preview_pager_email_content_description</item>
-    </array>
-
     <!-- Package responsible for updating Mainline Modules -->
     <string name="config_mainline_module_update_package" translatable="false">com.android.vending</string>
 
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 28e3ba6..6d865c2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3695,10 +3695,6 @@
     <!-- Summary for when to automatically show hub mode (widgets on lockscreen): docked  [CHAR LIMIT=100] -->
     <string name="when_to_show_hubmode_docked">While docked</string>
 
-    <!-- _satellite_setting_preference_layout -->
-    <!-- _satellite_setting_preference_layout screen title-->
-    <string name="satellite_setting">Satellite messaging</string>
-
     <!-- APN Settings -->
     <!-- APN settings screen title -->
     <string name="apn_settings">APNs</string>
@@ -10914,7 +10910,7 @@
     <string name="apps_summary"><xliff:g id="count" example="24">%1$d</xliff:g> apps installed</string>
 
     <!-- Summary of storage usage [CHAR LIMIT=NONE] -->
-    <string name="storage_summary"><xliff:g id="percentage" example="54%">%1$s</xliff:g> used - <xliff:g id="free_space" example="32GB">%2$s</xliff:g> free</string>
+    <string name="storage_toplevel_summary"><xliff:g id="percentage" example="54%">%1$s</xliff:g> used - <xliff:g id="free_space" example="32GB">%2$s</xliff:g> free</string>
 
     <!-- Summary for Display settings, explaining a few important settings under it [CHAR LIMIT=NONE]-->
     <string name="display_dashboard_summary">Dark theme, font size, brightness</string>
@@ -12687,8 +12683,10 @@
 
     <!-- Summary to show the current network mode is invalid. [CHAR LIMIT=NONE]-->
     <string name="mobile_network_mode_error">Invalid Network Mode <xliff:g id="networkModeId" example="0">%1$d</xliff:g>. Ignore.</string>
-    <!-- Title for satellite setting preference in mobile network settings [CHAR LIMIT=60] -->
-    <string name="satellite_setting_title">Satellite messaging</string>
+
+    <!-- _satellite_setting_preference_layout -->
+    <!-- _satellite_setting_preference_layout screen title-->
+    <string name="satellite_setting">Satellite connectivity</string>
     <!-- Summary for satellite setting preference. [CHAR LIMIT=NONE]-->
     <string name="satellite_setting_enabled_summary">Send and receive text messages by satellite. Included with your account.</string>
     <!-- Summary for satellite setting preference. [CHAR LIMIT=NONE]-->
@@ -12731,14 +12729,14 @@
     <string name="satellite_setting_summary_more_information">A satellite connection may be slower and is available only in some areas. Weather and certain structures may affect the connection. Calling by satellite isn\u2019t available. Emergency calls may still connect.\n\nIt may take some time for account changes to show in Settings. Contact <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> for details.</string>
     <!-- learn more text - more about satellite messaging without emergency messaging support. [CHAR_LIMIT=NONE] -->
     <string name="satellite_setting_summary_more_information_no_emergency_messaging">A satellite connection may be slower and is available only in some areas. Weather and certain structures may affect the connection. Calling by satellite isn\u2019t available. Emergency calls may still connect. Texting with emergency services may not be available in all areas.\n\nIt may take some time for account changes to show in Settings. Contact <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> for details.</string>
-    <!-- more about satellite messaging [CHAR_LIMIT=NONE] -->
-    <string name="more_about_satellite_messaging">More about <xliff:g id="subject" example="satellite messaging">%1$s</xliff:g></string>
+    <!-- more about satellite connectivity [CHAR_LIMIT=NONE] -->
+    <string name="more_about_satellite_messaging">More about satellite connectivity</string>
     <!-- Title for satellite warning dialog to avoid user using wifi/bluetooth/airplane mode [CHAR_LIMIT=NONE] -->
     <string name="satellite_warning_dialog_title">Can’t turn on <xliff:g id="function" example="bluetooth">%1$s</xliff:g></string>
     <!-- Content for satellite warning dialog to avoid user using wifi/bluetooth/airplane mode [CHAR_LIMIT=NONE] -->
     <string name="satellite_warning_dialog_content">To turn on <xliff:g id="function" example="bluetooth">%1$s</xliff:g>, first end the satellite connection</string>
     <!-- Category title for satellite functions with data transmission in mobile network settings [CHAR LIMIT=60] -->
-    <string name="category_title_satellite_connectivity">Satellite connectivity</string>
+    <string name="category_title_satellite_connectivity">Satellite</string>
     <!-- Title for satellite functions with data transmission in mobile network settings [CHAR LIMIT=60] -->
     <string name="title_satellite_setting_connectivity">Satellite connectivity</string>
     <!-- Description of satellite function with data transmission [CHAR LIMIT=60] -->
@@ -14362,6 +14360,16 @@
     <string name="supervision_web_content_filters_browser_block_explicit_sites_summary">No filter is perfect, but this should help hide sexually explicit sites</string>
     <!-- Title for web content filters browser category allow all sites option [CHAR LIMIT=60] -->
     <string name="supervision_web_content_filters_browser_allow_all_sites_title">Allow all sites</string>
+    <!-- Title for web content filters search category [CHAR LIMIT=60] -->
+    <string name="supervision_web_content_filters_search_title">Google Search</string>
+    <!-- Title for web content filters search category filter on option [CHAR LIMIT=60] -->
+    <string name="supervision_web_content_filters_search_filter_on_title">SafeSearch filtering ON</string>
+    <!-- Summary for web content filters search category filter on option [CHAR LIMIT=None] -->
+    <string name="supervision_web_content_filters_search_filter_on_summary">Helps filter out explicit images, text, and links from search results on this device</string>
+    <!-- Title for web content filters search category filter off option [CHAR LIMIT=60] -->
+    <string name="supervision_web_content_filters_search_filter_off_title">SafeSearch filtering OFF</string>
+    <!-- Summary for web content filters search category filter off option [CHAR LIMIT=None] -->
+    <string name="supervision_web_content_filters_search_filter_off_summary">Account settings may still filter or blur explicit results</string>
     <!-- Generic content description that is attached to the preview illustration at the top of an Accessibility feature toggle page. [CHAR LIMIT=NONE] -->
     <!-- Title for supervision PIN verification screen [CHAR LIMIT=60] -->
     <string name="supervision_full_screen_pin_verification_title">Enter supervision PIN</string>
diff --git a/res/xml/mobile_network_settings.xml b/res/xml/mobile_network_settings.xml
index a0da440..12f3beb 100644
--- a/res/xml/mobile_network_settings.xml
+++ b/res/xml/mobile_network_settings.xml
@@ -210,7 +210,7 @@
             <com.android.settingslib.RestrictedPreference
                 android:key="telephony_satellite_setting_key"
                 android:persistent="false"
-                android:title="@string/satellite_setting_title"
+                android:title="@string/title_satellite_setting_connectivity"
                 settings:keywords="@string/keywords_satellite_setting"
                 settings:controller=
                     "com.android.settings.network.telephony.satellite.SatelliteSettingPreferenceController"/>
diff --git a/res/xml/satellite_setting.xml b/res/xml/satellite_setting.xml
index 74bee71..0650970 100644
--- a/res/xml/satellite_setting.xml
+++ b/res/xml/satellite_setting.xml
@@ -32,7 +32,8 @@
 
     <PreferenceCategory
         android:key="key_category_your_satellite_plan"
-        android:title="@string/category_title_your_satellite_plan">
+        android:title="@string/category_title_your_satellite_plan"
+        settings:controller="com.android.settings.network.telephony.satellite.SatelliteSettingAccountInfoController">
 
         <Preference
             android:key="key_your_satellite_plan"
diff --git a/src/com/android/settings/accessibility/TextReadingPreviewController.java b/src/com/android/settings/accessibility/TextReadingPreviewController.java
index e268aaa..99f1f3f 100644
--- a/src/com/android/settings/accessibility/TextReadingPreviewController.java
+++ b/src/com/android/settings/accessibility/TextReadingPreviewController.java
@@ -104,13 +104,11 @@
         final boolean isLayoutRtl =
                 origConfig.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
         final int[] previewSamples = getPreviewSampleLayouts(mContext);
-        final int[] previewContentDescriptions = getPreviewSampleContentDescriptions(mContext);
         final PreviewPagerAdapter pagerAdapter = new PreviewPagerAdapter(mContext, isLayoutRtl,
                 previewSamples, createConfig(origConfig));
         mPreviewPreference.setPreviewAdapter(pagerAdapter);
         mPreviewPreference.setCurrentItem(
                 isLayoutRtl ? previewSamples.length - 1 : FRAME_INITIAL_INDEX);
-        mPreviewPreference.setContentDescription(previewContentDescriptions);
 
         final int initialPagerIndex =
                 mLastFontProgress * mDisplaySizeData.getValues().size() + mLastDisplayProgress;
@@ -190,20 +188,6 @@
         return previewSamples;
     }
 
-    @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
-    static int[] getPreviewSampleContentDescriptions(Context context) {
-        TypedArray typedArray = context.getResources().obtainTypedArray(
-                R.array.config_text_reading_preview_content_descriptions);
-        int previewCount = typedArray.length();
-        int[] previewContentDescriptions = new int[previewCount];
-        for (int i = 0; i < previewCount; i++) {
-            previewContentDescriptions[i] =
-                    typedArray.getResourceId(i, R.string.preview_pager_content_description);
-        }
-        typedArray.recycle();
-        return previewContentDescriptions;
-    }
-
     private int getPagerIndex() {
         final int displayDataSize = mDisplaySizeData.getValues().size();
         final int fontSizeProgress = mFontSizePreference.getProgress();
diff --git a/src/com/android/settings/accessibility/TextReadingPreviewPreference.java b/src/com/android/settings/accessibility/TextReadingPreviewPreference.java
index a4676ba..6d60736 100644
--- a/src/com/android/settings/accessibility/TextReadingPreviewPreference.java
+++ b/src/com/android/settings/accessibility/TextReadingPreviewPreference.java
@@ -43,10 +43,26 @@
     private int mCurrentItem;
     private int mLastLayerIndex;
     private PreviewPagerAdapter mPreviewAdapter;
-    private int[] mContentDescriptions;
 
     private int mLayoutMinHorizontalPadding = 0;
     private int mBackgroundMinHorizontalPadding = 0;
+    private final ViewPager.OnPageChangeListener mPageChangeListener =
+            new ViewPager.OnPageChangeListener() {
+                @Override
+                public void onPageScrolled(int i, float v, int i1) {
+                    // Do nothing
+                }
+
+                @Override
+                public void onPageSelected(int i) {
+                    mCurrentItem = i;
+                }
+
+                @Override
+                public void onPageScrollStateChanged(int i) {
+                    // Do nothing
+                }
+            };
 
     TextReadingPreviewPreference(Context context) {
         super(context);
@@ -78,23 +94,7 @@
         adjustPaddings(previewLayout, backgroundView);
 
         final ViewPager viewPager = (ViewPager) holder.findViewById(R.id.preview_pager);
-        viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
-            @Override
-            public void onPageScrolled(int i, float v, int i1) {
-                // Do nothing
-            }
-
-            @Override
-            public void onPageSelected(int i) {
-                mCurrentItem = i;
-                viewPager.setContentDescription(getContext().getString(mContentDescriptions[i]));
-            }
-
-            @Override
-            public void onPageScrollStateChanged(int i) {
-                // Do nothing
-            }
-        });
+        viewPager.addOnPageChangeListener(mPageChangeListener);
         final DotsPageIndicator pageIndicator =
                 (DotsPageIndicator) holder.findViewById(R.id.page_indicator);
         updateAdapterIfNeeded(viewPager, pageIndicator, mPreviewAdapter);
@@ -121,10 +121,6 @@
                 viewPager.setCurrentItem(getCurrentItem() + 1));
         nextButton.setContentDescription(getContext().getString(
                 R.string.preview_pager_next_button));
-
-        // Initialize the content description since the OnPageChangeListener#onPageSelected won't
-        // be called during setup.
-        viewPager.setContentDescription(getContext().getString(mContentDescriptions[0]));
     }
 
     @Override
@@ -173,10 +169,6 @@
         );
     }
 
-    void setContentDescription(int[] stringIds) {
-        mContentDescriptions = stringIds;
-    }
-
     void setPreviewAdapter(PreviewPagerAdapter previewAdapter) {
         if (previewAdapter != mPreviewAdapter) {
             mPreviewAdapter = previewAdapter;
diff --git a/src/com/android/settings/bluetooth/AlwaysDiscoverable.java b/src/com/android/settings/bluetooth/AlwaysDiscoverable.java
index 2ac4a18..5ea99ae 100644
--- a/src/com/android/settings/bluetooth/AlwaysDiscoverable.java
+++ b/src/com/android/settings/bluetooth/AlwaysDiscoverable.java
@@ -24,6 +24,8 @@
 
 import androidx.annotation.VisibleForTesting;
 
+import com.android.settingslib.utils.ThreadUtils;
+
 /** Helper class, intended to be used by an Activity, to keep the local Bluetooth adapter in
  *  discoverable mode indefinitely. By default setting the scan mode to
  *  BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE will time out after some time, but some
@@ -55,10 +57,12 @@
         mContext.registerReceiver(this, mIntentFilter,
                 Context.RECEIVER_EXPORTED_UNAUDITED);
         mStarted = true;
-        if (mBluetoothAdapter.getScanMode()
-                != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
-            mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
-        }
+        ThreadUtils.postOnBackgroundThread(() -> {
+            if (mBluetoothAdapter.getScanMode()
+                    != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
+                mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
+            }
+        });
     }
 
     public void stop() {
@@ -67,7 +71,8 @@
         }
         mContext.unregisterReceiver(this);
         mStarted = false;
-        mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE);
+        ThreadUtils.postOnBackgroundThread(
+                () -> mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE));
     }
 
     @Override
@@ -76,9 +81,11 @@
         if (action != BluetoothAdapter.ACTION_SCAN_MODE_CHANGED) {
             return;
         }
-        if (mBluetoothAdapter.getScanMode()
-                != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
-            mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
-        }
+        ThreadUtils.postOnBackgroundThread(() -> {
+            if (mBluetoothAdapter.getScanMode()
+                    != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
+                mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
+            }
+        });
     }
 }
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
index 58d2787..d7f53ca 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
@@ -419,32 +419,7 @@
                 mContext,
                 SettingsEnums.ACTION_BLUETOOTH_PROFILE_LE_AUDIO_OFF,
                 isCurrentDeviceInOrByPassAllowList());
-
-        LocalBluetoothProfile asha = mProfileManager.getHearingAidProfile();
-        LocalBluetoothProfile broadcastAssistant =
-                mProfileManager.getLeAudioBroadcastAssistantProfile();
-
-        for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) {
-            Log.d(TAG,
-                    "device:" + leAudioDevice.getDevice().getAnonymizedAddress()
-                            + " disable LE profile");
-            profile.setEnabled(leAudioDevice.getDevice(), false);
-            if (asha != null) {
-                asha.setEnabled(leAudioDevice.getDevice(), true);
-            }
-            if (broadcastAssistant != null) {
-                Log.d(TAG,
-                        "device:" + leAudioDevice.getDevice().getAnonymizedAddress()
-                                + " disable LE broadcast assistant profile");
-                broadcastAssistant.setEnabled(leAudioDevice.getDevice(), false);
-            }
-        }
-
-        if (!SystemProperties.getBoolean(ENABLE_DUAL_MODE_AUDIO, false)) {
-            Log.i(TAG, "Enabling classic audio profiles because dual mode is disabled");
-            enableProfileAfterUserDisablesLeAudio(mProfileManager.getA2dpProfile());
-            enableProfileAfterUserDisablesLeAudio(mProfileManager.getHeadsetProfile());
-        }
+        Utils.setLeAudioEnabled(mManager, List.copyOf(mCachedDeviceGroup), false);
     }
 
     /**
@@ -462,75 +437,7 @@
                 mContext,
                 SettingsEnums.ACTION_BLUETOOTH_PROFILE_LE_AUDIO_ON,
                 isCurrentDeviceInOrByPassAllowList());
-
-        if (!SystemProperties.getBoolean(ENABLE_DUAL_MODE_AUDIO, false)) {
-            Log.i(TAG, "Disabling classic audio profiles because dual mode is disabled");
-            disableProfileBeforeUserEnablesLeAudio(mProfileManager.getA2dpProfile());
-            disableProfileBeforeUserEnablesLeAudio(mProfileManager.getHeadsetProfile());
-        }
-        LocalBluetoothProfile asha = mProfileManager.getHearingAidProfile();
-        LocalBluetoothProfile broadcastAssistant =
-                mProfileManager.getLeAudioBroadcastAssistantProfile();
-
-        for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) {
-            Log.d(TAG,
-                    "device:" + leAudioDevice.getDevice().getAnonymizedAddress()
-                            + " enable LE profile");
-            profile.setEnabled(leAudioDevice.getDevice(), true);
-            if (asha != null) {
-                asha.setEnabled(leAudioDevice.getDevice(), false);
-            }
-            if (broadcastAssistant != null) {
-                Log.d(TAG,
-                        "device:" + leAudioDevice.getDevice().getAnonymizedAddress()
-                                + " enable LE broadcast assistant profile");
-                broadcastAssistant.setEnabled(leAudioDevice.getDevice(), true);
-            }
-        }
-    }
-
-    private void disableProfileBeforeUserEnablesLeAudio(LocalBluetoothProfile profile) {
-        if (profile != null && mProfileDeviceMap.get(profile.toString()) != null) {
-            Log.d(TAG, "Disable " + profile.toString() + " before user enables LE");
-            for (CachedBluetoothDevice profileDevice : mProfileDeviceMap.get(profile.toString())) {
-                if (profile.isEnabled(profileDevice.getDevice())) {
-                    Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":"
-                            + profile.toString() + " set disable");
-                    profile.setEnabled(profileDevice.getDevice(), false);
-                } else {
-                    Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":"
-                            + profile.toString() + " profile is disabled. Do nothing.");
-                }
-            }
-        } else {
-            if (profile == null) {
-                Log.w(TAG, "profile is null");
-            } else {
-                Log.w(TAG, profile.toString() + " is not in " + mProfileDeviceMap);
-            }
-        }
-    }
-
-    private void enableProfileAfterUserDisablesLeAudio(LocalBluetoothProfile profile) {
-        if (profile != null && mProfileDeviceMap.get(profile.toString()) != null) {
-            Log.d(TAG, "enable " + profile.toString() + "after user disables LE");
-            for (CachedBluetoothDevice profileDevice : mProfileDeviceMap.get(profile.toString())) {
-                if (!profile.isEnabled(profileDevice.getDevice())) {
-                    Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":"
-                            + profile.toString() + " set enable");
-                    profile.setEnabled(profileDevice.getDevice(), true);
-                } else {
-                    Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":"
-                            + profile.toString() + " profile is enabled. Do nothing.");
-                }
-            }
-        } else {
-            if (profile == null) {
-                Log.w(TAG, "profile is null");
-            } else {
-                Log.w(TAG, profile.toString() + " is not in " + mProfileDeviceMap);
-            }
-        }
+        Utils.setLeAudioEnabled(mManager, List.copyOf(mCachedDeviceGroup), true);
     }
 
     /**
diff --git a/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiver.java b/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiver.java
index e7e0b4a..cfe9c05 100644
--- a/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiver.java
+++ b/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiver.java
@@ -55,9 +55,18 @@
         }
 
         BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+        if (device == null) {
+            return;
+        }
         PowerManager powerManager = context.getSystemService(PowerManager.class);
         if (TextUtils.equals(action, BluetoothDevice.ACTION_KEY_MISSING)) {
             Log.d(TAG, "Receive ACTION_KEY_MISSING");
+            if (device.getBondState() == BluetoothDevice.BOND_NONE) {
+                Log.d(
+                        TAG,
+                        "Device " + device.getAnonymizedAddress() + " is already unbonded, skip.");
+                return;
+            }
             Integer keyMissingCount = BluetoothUtils.getKeyMissingCount(device);
             if (keyMissingCount != null && keyMissingCount != 1) {
                 Log.d(TAG, "Key missing count is " + keyMissingCount  + ", skip.");
diff --git a/src/com/android/settings/bluetooth/HearingDeviceInputRoutingPreference.java b/src/com/android/settings/bluetooth/HearingDeviceInputRoutingPreference.java
index 2d09f61..e1e1294 100644
--- a/src/com/android/settings/bluetooth/HearingDeviceInputRoutingPreference.java
+++ b/src/com/android/settings/bluetooth/HearingDeviceInputRoutingPreference.java
@@ -80,7 +80,7 @@
         setDialogTitle(R.string.bluetooth_hearing_device_input_routing_dialog_title);
         setDialogLayoutResource(R.layout.hearing_device_input_routing_dialog);
         setNegativeButtonText(R.string.cancel);
-        setPositiveButtonText(R.string.done_button);
+        setPositiveButtonText(R.string.done);
     }
 
     /**
diff --git a/src/com/android/settings/bluetooth/Utils.java b/src/com/android/settings/bluetooth/Utils.java
index 9f4bb13..76c3ed0 100644
--- a/src/com/android/settings/bluetooth/Utils.java
+++ b/src/com/android/settings/bluetooth/Utils.java
@@ -28,6 +28,7 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
+import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.util.Log;
@@ -45,15 +46,20 @@
 import com.android.settingslib.bluetooth.BluetoothUtils.ErrorListener;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
 import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
+import com.android.settingslib.bluetooth.HearingAidProfile;
+import com.android.settingslib.bluetooth.LeAudioProfile;
 import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
 import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcastAssistant;
 import com.android.settingslib.bluetooth.LocalBluetoothManager;
 import com.android.settingslib.bluetooth.LocalBluetoothManager.BluetoothManagerCallback;
+import com.android.settingslib.bluetooth.LocalBluetoothProfile;
+import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
 import com.android.settingslib.utils.ThreadUtils;
 
 import com.google.common.base.Supplier;
 import com.google.common.collect.ImmutableList;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
@@ -70,6 +76,7 @@
 public final class Utils {
 
     private static final String TAG = "BluetoothUtils";
+    private static final String ENABLE_DUAL_MODE_AUDIO = "persist.bluetooth.enable_dual_mode_audio";
 
     static final boolean V = BluetoothUtils.V; // verbose logging
     static final boolean D = BluetoothUtils.D;  // regular logging
@@ -360,4 +367,119 @@
         dialog.show();
         return dialog;
     }
+
+    /** Enables/disables LE Audio profile for the device. */
+    public static void setLeAudioEnabled(
+            @NonNull LocalBluetoothManager manager,
+            @NonNull CachedBluetoothDevice cachedDevice,
+            boolean enable) {
+        List<CachedBluetoothDevice> devices =
+                List.copyOf(findAllCachedBluetoothDevicesByGroupId(manager, cachedDevice));
+        setLeAudioEnabled(manager, devices, enable);
+    }
+
+    /** Enables/disables LE Audio profile for the devices in the same csip group. */
+    public static void setLeAudioEnabled(
+            @NonNull LocalBluetoothManager manager,
+            @NonNull List<CachedBluetoothDevice> devicesWithSameGroupId,
+            boolean enable) {
+        LocalBluetoothProfileManager profileManager = manager.getProfileManager();
+        LeAudioProfile leAudioProfile = profileManager.getLeAudioProfile();
+        List<CachedBluetoothDevice> leAudioDevices =
+                getDevicesWithProfile(devicesWithSameGroupId, leAudioProfile);
+        if (leAudioDevices.isEmpty()) {
+            Log.i(TAG, "Fail to setLeAudioEnabled, no LE Audio profile found.");
+        }
+        boolean dualModeEnabled = SystemProperties.getBoolean(ENABLE_DUAL_MODE_AUDIO, false);
+
+        if (enable && !dualModeEnabled) {
+            Log.i(TAG, "Disabling classic audio profiles because dual mode is disabled");
+            setProfileEnabledWhenChangingLeAudio(
+                    devicesWithSameGroupId, profileManager.getA2dpProfile(), false);
+            setProfileEnabledWhenChangingLeAudio(
+                    devicesWithSameGroupId, profileManager.getHeadsetProfile(), false);
+        }
+
+        HearingAidProfile asha = profileManager.getHearingAidProfile();
+        LocalBluetoothLeBroadcastAssistant broadcastAssistant =
+                profileManager.getLeAudioBroadcastAssistantProfile();
+
+        for (CachedBluetoothDevice leAudioDevice : leAudioDevices) {
+            Log.d(
+                    TAG,
+                    "device:"
+                            + leAudioDevice.getDevice().getAnonymizedAddress()
+                            + " set LE profile enabled: "
+                            + enable);
+            leAudioProfile.setEnabled(leAudioDevice.getDevice(), enable);
+            if (asha != null) {
+                asha.setEnabled(leAudioDevice.getDevice(), !enable);
+            }
+            if (broadcastAssistant != null) {
+                Log.d(
+                        TAG,
+                        "device:"
+                                + leAudioDevice.getDevice().getAnonymizedAddress()
+                                + " enable LE broadcast assistant profile: "
+                                + enable);
+                broadcastAssistant.setEnabled(leAudioDevice.getDevice(), enable);
+            }
+        }
+
+        if (!enable && !dualModeEnabled) {
+            Log.i(TAG, "Enabling classic audio profiles because dual mode is disabled");
+            setProfileEnabledWhenChangingLeAudio(
+                    devicesWithSameGroupId, profileManager.getA2dpProfile(), true);
+            setProfileEnabledWhenChangingLeAudio(
+                    devicesWithSameGroupId, profileManager.getHeadsetProfile(), true);
+        }
+    }
+
+    private static List<CachedBluetoothDevice> getDevicesWithProfile(
+            List<CachedBluetoothDevice> devices, LocalBluetoothProfile profile) {
+        List<CachedBluetoothDevice> devicesWithProfile = new ArrayList<>();
+        for (CachedBluetoothDevice device : devices) {
+            for (LocalBluetoothProfile currentProfile : device.getProfiles()) {
+                if (currentProfile.toString().equals(profile.toString())) {
+                    devicesWithProfile.add(device);
+                }
+            }
+        }
+        return devicesWithProfile;
+    }
+
+    private static void setProfileEnabledWhenChangingLeAudio(
+            List<CachedBluetoothDevice> devices,
+            @Nullable LocalBluetoothProfile profile,
+            boolean enable) {
+        if (profile == null) {
+            Log.i(TAG, "profile is null");
+            return;
+        }
+        List<CachedBluetoothDevice> deviceWithProfile = getDevicesWithProfile(devices, profile);
+        Log.d(TAG, "Set " + profile + " enabled:" + enable + " when switching LE Audio");
+        for (CachedBluetoothDevice profileDevice : deviceWithProfile) {
+            if (profile.isEnabled(profileDevice.getDevice()) != enable) {
+                Log.d(
+                        TAG,
+                        "The "
+                                + profileDevice.getDevice().getAnonymizedAddress()
+                                + ":"
+                                + profile
+                                + " set to "
+                                + enable);
+                profile.setEnabled(profileDevice.getDevice(), enable);
+            } else {
+                Log.d(
+                        TAG,
+                        "The "
+                                + profileDevice.getDevice().getAnonymizedAddress()
+                                + ":"
+                                + profile
+                                + " profile is already "
+                                + enable
+                                + ". Do nothing.");
+            }
+        }
+    }
 }
diff --git a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java
index 0c8b16b..be861a6 100644
--- a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java
+++ b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java
@@ -207,7 +207,7 @@
                                     (AudioSharingDeviceItem item) -> {
                                         int currentCallAudioGroupId =
                                                 BluetoothUtils.getPrimaryGroupIdForBroadcast(
-                                                        mContext.getContentResolver());
+                                                        mContext.getContentResolver(), mBtManager);
                                         int clickedGroupId = item.getGroupId();
                                         if (clickedGroupId == currentCallAudioGroupId) {
                                             Log.d(TAG, "Skip set call audio device: unchanged");
@@ -414,7 +414,8 @@
     private Pair<Integer, AudioSharingDeviceItem> getActiveItemWithIndex() {
         List<AudioSharingDeviceItem> deviceItems = new ArrayList<>(mDeviceItemsInSharingSession);
         int fallbackActiveGroupId =
-                BluetoothUtils.getPrimaryGroupIdForBroadcast(mContext.getContentResolver());
+                BluetoothUtils.getPrimaryGroupIdForBroadcast(mContext.getContentResolver(),
+                        mBtManager);
         if (fallbackActiveGroupId != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) {
             for (AudioSharingDeviceItem item : deviceItems) {
                 if (item.getGroupId() == fallbackActiveGroupId) {
diff --git a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupController.java b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupController.java
index 7b670a8..1659d2d 100644
--- a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupController.java
+++ b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupController.java
@@ -418,7 +418,8 @@
         int groupId = BluetoothUtils.getGroupId(cachedDevice);
         // The fallback device rank first among the audio sharing device list.
         return (groupId != BluetoothCsipSetCoordinator.GROUP_ID_INVALID
-                && groupId == BluetoothUtils.getPrimaryGroupIdForBroadcast(mContentResolver))
+                && groupId == BluetoothUtils.getPrimaryGroupIdForBroadcast(mContentResolver,
+                mBtManager))
                 ? 0
                 : 1;
     }
diff --git a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreference.java b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreference.java
index 816ec6e..944ac25 100644
--- a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreference.java
+++ b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreference.java
@@ -46,6 +46,7 @@
 
     private final Context mContext;
     private final CachedBluetoothDevice mCachedDevice;
+    @Nullable private final LocalBluetoothManager mBtManager;
     @Nullable protected SeekBar mSeekBar;
     private Boolean mTrackingTouch = false;
     private MetricsFeatureProvider mMetricsFeatureProvider =
@@ -57,6 +58,7 @@
         setLayoutResource(R.layout.preference_volume_slider);
         mContext = context;
         mCachedDevice = device;
+        mBtManager = Utils.getLocalBtManager(mContext);
     }
 
     @NonNull
@@ -110,7 +112,7 @@
                             if (groupId != BluetoothCsipSetCoordinator.GROUP_ID_INVALID
                                     && groupId
                                             == BluetoothUtils.getPrimaryGroupIdForBroadcast(
-                                                    mContext.getContentResolver())) {
+                                                    mContext.getContentResolver(), mBtManager)) {
                                 // Set media stream volume for primary buds, audio manager will
                                 // update all buds volume in the audio sharing.
                                 setAudioManagerStreamVolume(progress);
@@ -126,9 +128,8 @@
             Log.d(TAG, "Skip set device volume, device is null");
             return;
         }
-        LocalBluetoothManager btManager = Utils.getLocalBtManager(mContext);
-        VolumeControlProfile vc =
-                btManager == null ? null : btManager.getProfileManager().getVolumeControlProfile();
+        VolumeControlProfile vc = mBtManager == null ? null
+                : mBtManager.getProfileManager().getVolumeControlProfile();
         if (vc != null) {
             vc.setDeviceVolume(device, progress, /* isGroupOp= */ true);
             mMetricsFeatureProvider.action(
diff --git a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingSwitchBarController.java b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingSwitchBarController.java
index 92ebc57..f1fcd69 100644
--- a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingSwitchBarController.java
+++ b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingSwitchBarController.java
@@ -192,7 +192,7 @@
                         Log.d(TAG, "Skip handleOnBroadcastReady, not in starting process");
                         return;
                     }
-                    handleOnBroadcastReady();
+                    handleOnBroadcastReady(metadata);
                 }
 
                 @Override
@@ -273,7 +273,7 @@
                             + mSinksInAdding);
                     if (mSinksToWaitFor.contains(sink)) {
                         mSinksToWaitFor.remove(sink);
-                        if (mSinksToWaitFor.isEmpty()) {
+                        if (mSinksToWaitFor.isEmpty() && mBroadcast != null) {
                             // To avoid users advance to share then pair flow before the
                             // primary/active sinks successfully join the audio sharing,
                             // popup dialog till adding source complete for mSinksToWaitFor.
@@ -284,7 +284,8 @@
                                             /* userTriggered= */ false,
                                             /* deviceCountInSharing= */ 1,
                                             /* candidateDeviceCount= */ 0);
-                            showAudioSharingDialog(eventData);
+                            showJoinAudioSharingDialog(eventData,
+                                    mBroadcast.getLatestBluetoothLeBroadcastMetadata());
                         }
                     }
                 }
@@ -501,9 +502,10 @@
                 mBtManager == null ? null : mBtManager.getCachedDeviceManager();
         CachedBluetoothDevice cachedDevice =
                 deviceManager == null ? null : deviceManager.findDevice(device);
-        if (cachedDevice != null) {
+        if (cachedDevice != null && mBroadcast != null) {
             Log.d(TAG, "handleAutoAddSourceAfterPair, device = " + device.getAnonymizedAddress());
-            addSourceToTargetSinks(ImmutableList.of(device), cachedDevice.getName());
+            addSourceToTargetSinks(ImmutableList.of(device), cachedDevice.getName(),
+                    mBroadcast.getLatestBluetoothLeBroadcastMetadata());
         }
     }
 
@@ -642,7 +644,7 @@
         return mAssistant != null && mAssistant.getAllConnectedDevices().isEmpty();
     }
 
-    private void handleOnBroadcastReady() {
+    private void handleOnBroadcastReady(@NonNull BluetoothLeBroadcastMetadata metadata) {
         List<BluetoothDevice> targetActiveSinks = mTargetActiveItem == null ? ImmutableList.of()
                 : mGroupedConnectedDevices.getOrDefault(
                         mTargetActiveItem.getGroupId(), ImmutableList.of());
@@ -656,7 +658,7 @@
         // Auto add primary/active sinks w/o user interactions.
         if (!targetActiveSinks.isEmpty() && mTargetActiveItem != null) {
             Log.d(TAG, "handleOnBroadcastReady: automatically add source to active sinks.");
-            addSourceToTargetSinks(targetActiveSinks, mTargetActiveItem.getName());
+            addSourceToTargetSinks(targetActiveSinks, mTargetActiveItem.getName(), metadata);
             // To avoid users advance to share then pair flow before the primary/active sinks
             // successfully join the audio sharing, save the primary/active sinks in mSinksToWaitFor
             // and popup dialog till adding source complete for these sinks.
@@ -677,7 +679,7 @@
                 AudioSharingDeviceItem target = mDeviceItemsForSharing.get(0);
                 List<BluetoothDevice> targetSinks = mGroupedConnectedDevices.getOrDefault(
                         target.getGroupId(), ImmutableList.of());
-                addSourceToTargetSinks(targetSinks, target.getName());
+                addSourceToTargetSinks(targetSinks, target.getName(), metadata);
                 cleanUpStatesForStartSharing();
                 // TODO: Add metric for auto add by intent
                 return;
@@ -698,20 +700,21 @@
         // successfully join the audio sharing, popup dialog till adding source complete for
         // mSinksToWaitFor.
         if (mSinksToWaitFor.isEmpty() && !mStoppingSharing.get()) {
-            showAudioSharingDialog(eventData);
+            showJoinAudioSharingDialog(eventData, metadata);
         }
     }
 
-    private void showAudioSharingDialog(Pair<Integer, Object>[] eventData) {
+    private void showJoinAudioSharingDialog(Pair<Integer, Object>[] eventData,
+            @Nullable BluetoothLeBroadcastMetadata metadata) {
         if (!BluetoothUtils.isBroadcasting(mBtManager)) {
-            Log.d(TAG, "Skip showAudioSharingDialog, broadcast is stopped");
+            Log.d(TAG, "Skip showJoinAudioSharingDialog, broadcast is stopped");
             return;
         }
         AudioSharingDialogFragment.DialogEventListener listener =
                 new AudioSharingDialogFragment.DialogEventListener() {
                     @Override
                     public void onPositiveClick() {
-                        // Could go to other pages, dismiss the progress dialog.
+                        // Could go to other pages (pair new device), dismiss the progress dialog.
                         dismissProgressDialogIfNeeded();
                         cleanUpStatesForStartSharing();
                     }
@@ -720,19 +723,17 @@
                     public void onItemClick(@NonNull AudioSharingDeviceItem item) {
                         List<BluetoothDevice> targetSinks = mGroupedConnectedDevices.getOrDefault(
                                 item.getGroupId(), ImmutableList.of());
-                        addSourceToTargetSinks(targetSinks, item.getName());
+                        addSourceToTargetSinks(targetSinks, item.getName(), metadata);
                         cleanUpStatesForStartSharing();
                     }
 
                     @Override
                     public void onCancelClick() {
-                        // Could go to other pages, dismiss the progress dialog.
+                        // Could go to other pages (show qr code), dismiss the progress dialog.
                         dismissProgressDialogIfNeeded();
                         cleanUpStatesForStartSharing();
                     }
                 };
-        BluetoothLeBroadcastMetadata metadata = mBroadcast == null ? null
-                : mBroadcast.getLatestBluetoothLeBroadcastMetadata();
         AudioSharingUtils.postOnMainThread(
                 mContext,
                 () -> AudioSharingDialogFragment.show(
@@ -828,13 +829,27 @@
                         });
     }
 
-    private void addSourceToTargetSinks(List<BluetoothDevice> targetActiveSinks,
-            @NonNull String sinkName) {
-        mSinksInAdding.addAll(targetActiveSinks);
+    private void addSourceToTargetSinks(List<BluetoothDevice> targetGroupedSinks,
+            @NonNull String targetSinkName, @Nullable BluetoothLeBroadcastMetadata metadata) {
+        if (targetGroupedSinks.isEmpty()) {
+            Log.d(TAG, "Skip addSourceToTargetSinks, no sinks.");
+            return;
+        }
+        if (metadata == null) {
+            Log.d(TAG, "Skip addSourceToTargetSinks, metadata is null");
+            return;
+        }
+        if (mAssistant == null) {
+            Log.d(TAG, "skip addSourceToTargetDevices, assistant profile is null.");
+            return;
+        }
+        mSinksInAdding.addAll(targetGroupedSinks);
         String progressMessage = mContext.getString(
-                R.string.audio_sharing_progress_dialog_add_source_content, sinkName);
+                R.string.audio_sharing_progress_dialog_add_source_content, targetSinkName);
         showProgressDialog(progressMessage);
-        AudioSharingUtils.addSourceToTargetSinks(targetActiveSinks, mBtManager);
+        for (BluetoothDevice sink : targetGroupedSinks) {
+            mAssistant.addSource(sink, metadata, /* isGroupOp= */ false);
+        }
     }
 
     private void showProgressDialog(@NonNull String progressMessage) {
diff --git a/src/com/android/settings/contract/SettingsContract.kt b/src/com/android/settings/contract/SettingsContract.kt
index 3a35419..20ff0c0 100644
--- a/src/com/android/settings/contract/SettingsContract.kt
+++ b/src/com/android/settings/contract/SettingsContract.kt
@@ -69,6 +69,12 @@
 /** Contract key for the "Use adaptive connectivity" setting. */
 const val KEY_ADAPTIVE_CONNECTIVITY = "adaptive_connectivity"
 
+/** Contract key for the "Auto-switch Wi-Fi to Cellular" setting. */
+const val KEY_ADAPTIVE_WIFI_SCORER = "adaptive_wifi_scorer"
+
+/** Contract key for the " Auto-switch mobile network for battery life" setting. */
+const val KEY_ADAPTIVE_MOBILE_NETWORK = "adaptive_mobile_network"
+
 /** Contract key for the "WiFi hotspot" setting. */
 const val KEY_WIFI_HOTSPOT = "enable_wifi_ap"
 
diff --git a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
index f61fbb6..4fd8a21 100644
--- a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
+++ b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
@@ -507,10 +507,6 @@
                     R.dimen.dashboard_tile_image_size);
             drawable.setLayerSize(0, size, size);
             return drawable;
-        } else if (TextUtils.equals(tile.getPackageName(),
-                mPackageManager.getWellbeingPackageName())) {
-            return getRoundedIcon(iconDrawable,
-                    R.color.homepage_wellbeing_foreground, R.color.homepage_wellbeing_background);
         }
 
         Pair<Integer, Integer> colors = getSchemedColors(tile);
diff --git a/src/com/android/settings/deviceinfo/PhoneNumberPreferenceController.java b/src/com/android/settings/deviceinfo/PhoneNumberPreferenceController.java
index b49d62d..bb39d88 100644
--- a/src/com/android/settings/deviceinfo/PhoneNumberPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/PhoneNumberPreferenceController.java
@@ -65,9 +65,10 @@
     @Override
     public void displayPreference(PreferenceScreen screen) {
         super.displayPreference(screen);
-        if (!SubscriptionUtil.isSimHardwareVisible(mContext)) {
+        if (!isAvailable()) {
             return;
         }
+
         final Preference preference = screen.findPreference(getPreferenceKey());
         final PreferenceCategory category = screen.findPreference(KEY_PREFERENCE_CATEGORY);
         mPreferenceList.add(preference);
diff --git a/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java b/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java
index 1955f36..05e4f25e 100644
--- a/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java
+++ b/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java
@@ -93,7 +93,7 @@
     private String getSummary(long usedBytes, long totalBytes) {
         NumberFormat percentageFormat = NumberFormat.getPercentInstance();
 
-        return mContext.getString(R.string.storage_summary,
+        return mContext.getString(R.string.storage_toplevel_summary,
                 totalBytes == 0L ? "0" : percentageFormat.format(((double) usedBytes) / totalBytes),
                 Formatter.formatFileSize(mContext, totalBytes - usedBytes));
     }
diff --git a/src/com/android/settings/display/DeviceStateAutoRotateSettingController.java b/src/com/android/settings/display/DeviceStateAutoRotateSettingController.java
index d3950ee..5c2dec2 100644
--- a/src/com/android/settings/display/DeviceStateAutoRotateSettingController.java
+++ b/src/com/android/settings/display/DeviceStateAutoRotateSettingController.java
@@ -35,7 +35,6 @@
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
 import com.android.settingslib.devicestate.DeviceStateAutoRotateSettingManager;
-import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
 import com.android.settingslib.search.SearchIndexableRaw;
 
 import java.util.List;
@@ -46,7 +45,7 @@
 
     private TwoStatePreference mPreference;
 
-    private final DeviceStateRotationLockSettingsManager mAutoRotateSettingsManager;
+    private final DeviceStateAutoRotateSettingManager mAutoRotateSettingsManager;
     private final int mOrder;
     private final DeviceStateAutoRotateSettingManager.DeviceStateAutoRotateSettingListener
             mDeviceStateAutoRotateSettingListener = () -> updateState(mPreference);
@@ -62,7 +61,8 @@
         mMetricsFeatureProvider = metricsFeatureProvider;
         mDeviceState = deviceState;
         mDeviceStateDescription = deviceStateDescription;
-        mAutoRotateSettingsManager = DeviceStateRotationLockSettingsManager.getInstance(context);
+        mAutoRotateSettingsManager =
+                DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(context);
         mOrder = order;
     }
 
diff --git a/src/com/android/settings/display/DeviceStateAutoRotateSettingManagerProvider.kt b/src/com/android/settings/display/DeviceStateAutoRotateSettingManagerProvider.kt
new file mode 100644
index 0000000..906ffe4
--- /dev/null
+++ b/src/com/android/settings/display/DeviceStateAutoRotateSettingManagerProvider.kt
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2025 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.display
+
+import android.content.Context
+import android.hardware.devicestate.DeviceStateManager
+import android.os.Build
+import android.os.Handler
+import android.os.Looper
+import com.android.internal.annotations.VisibleForTesting
+import com.android.settingslib.devicestate.AndroidSecureSettings
+import com.android.settingslib.devicestate.DeviceStateAutoRotateSettingManager
+import com.android.settingslib.devicestate.DeviceStateAutoRotateSettingManagerProvider.createInstance
+import com.android.settingslib.devicestate.PosturesHelper
+import com.android.settingslib.utils.ThreadUtils
+import com.android.window.flags.Flags
+
+/**
+ * Provides appropriate instance of [DeviceStateAutoRotateSettingManager], based on the value of
+ * [Flags.FLAG_ENABLE_DEVICE_STATE_AUTO_ROTATE_SETTING_REFACTOR].
+ */
+object DeviceStateAutoRotateSettingManagerProvider {
+    private var nullableSingletonSettingManager: DeviceStateAutoRotateSettingManager? = null
+
+    /**
+     * Provides a singleton instance of [DeviceStateAutoRotateSettingManager], based on the
+     * value of[Flags.FLAG_ENABLE_DEVICE_STATE_AUTO_ROTATE_SETTING_REFACTOR]. It is supposed to
+     * be used by apps that don't support dagger to provide and manager instance.
+     */
+    @JvmStatic
+    fun getSingletonInstance(context: Context) =
+        nullableSingletonSettingManager ?: createInstance(
+            context,
+            ThreadUtils.getBackgroundExecutor(),
+            AndroidSecureSettings(context.contentResolver),
+            Handler(Looper.getMainLooper()),
+            PosturesHelper(context, context.getSystemService(DeviceStateManager::class.java))
+        ).also {
+            nullableSingletonSettingManager = it
+        }
+
+    /** Resets the singleton instance of [DeviceStateAutoRotateSettingManager]. */
+    @JvmStatic
+    @VisibleForTesting
+    fun resetInstance() {
+        nullableSingletonSettingManager = null
+    }
+}
diff --git a/src/com/android/settings/display/DeviceStateAutoRotationHelper.java b/src/com/android/settings/display/DeviceStateAutoRotationHelper.java
index 3bf9def..7b28524 100644
--- a/src/com/android/settings/display/DeviceStateAutoRotationHelper.java
+++ b/src/com/android/settings/display/DeviceStateAutoRotationHelper.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.display;
 
+import static com.android.settingslib.devicestate.DeviceStateAutoRotateSettingUtils.isDeviceStateRotationLockEnabled;
+
 import android.content.Context;
 import android.util.Log;
 
@@ -25,7 +27,6 @@
 import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settingslib.core.AbstractPreferenceController;
-import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
 import com.android.settingslib.devicestate.SettableDeviceState;
 import com.android.settingslib.search.SearchIndexableRaw;
 
@@ -51,8 +52,8 @@
 
     static ImmutableList<AbstractPreferenceController> createPreferenceControllers(
             Context context) {
-        List<SettableDeviceState> settableDeviceStates = DeviceStateRotationLockSettingsManager
-                .getInstance(context).getSettableDeviceStates();
+        List<SettableDeviceState> settableDeviceStates = DeviceStateAutoRotateSettingManagerProvider
+                .getSingletonInstance(context).getSettableDeviceStates();
         int numDeviceStates = settableDeviceStates.size();
         if (numDeviceStates == 0) {
             return ImmutableList.of();
@@ -99,7 +100,7 @@
     /** Returns whether the device state based auto-rotation settings are enabled. */
     public static boolean isDeviceStateRotationEnabled(Context context) {
         return RotationPolicy.isRotationLockToggleVisible(context)
-                && DeviceStateRotationLockSettingsManager.isDeviceStateRotationLockEnabled(context);
+                && isDeviceStateRotationLockEnabled(context);
     }
 
     /**
@@ -108,6 +109,6 @@
      */
     public static boolean isDeviceStateRotationEnabledForA11y(Context context) {
         return RotationPolicy.isRotationSupported(context)
-                && DeviceStateRotationLockSettingsManager.isDeviceStateRotationLockEnabled(context);
+                && isDeviceStateRotationLockEnabled(context);
     }
 }
diff --git a/src/com/android/settings/display/SmartAutoRotateController.java b/src/com/android/settings/display/SmartAutoRotateController.java
index c99b2f8..4bc28ff 100644
--- a/src/com/android/settings/display/SmartAutoRotateController.java
+++ b/src/com/android/settings/display/SmartAutoRotateController.java
@@ -47,7 +47,6 @@
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
 import com.android.settingslib.devicestate.DeviceStateAutoRotateSettingManager;
-import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
 
 /**
  * SmartAutoRotateController controls whether auto rotation is enabled
@@ -75,7 +74,7 @@
                 }
             };
 
-    private final DeviceStateRotationLockSettingsManager mDeviceStateAutoRotateSettingsManager;
+    private final DeviceStateAutoRotateSettingManager mDeviceStateAutoRotateSettingsManager;
     private final DeviceStateAutoRotateSettingManager.DeviceStateAutoRotateSettingListener
             mDeviceStateAutoRotateSettingListener = () -> updateState(mPreference);
     private RotationPolicy.RotationPolicyListener mRotationPolicyListener;
@@ -85,8 +84,9 @@
         mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
         mPrivacyManager = SensorPrivacyManager.getInstance(context);
         mPowerManager = context.getSystemService(PowerManager.class);
-        mDeviceStateAutoRotateSettingsManager = DeviceStateRotationLockSettingsManager.getInstance(
-                context);
+        mDeviceStateAutoRotateSettingsManager =
+                DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(
+                        context);
     }
 
     @Override
diff --git a/src/com/android/settings/homepage/contextualcards/slices/LowStorageSlice.java b/src/com/android/settings/homepage/contextualcards/slices/LowStorageSlice.java
index 22e3431..2a731bf 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/LowStorageSlice.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/LowStorageSlice.java
@@ -73,7 +73,7 @@
         if (usedPercentage < LOW_STORAGE_THRESHOLD) {
             // For clients that ignore error checking, a generic storage slice will be given.
             final CharSequence titleStorage = mContext.getText(R.string.storage_settings);
-            final String summaryStorage = mContext.getString(R.string.storage_summary,
+            final String summaryStorage = mContext.getString(R.string.storage_toplevel_summary,
                     percentageString, freeSizeString);
 
             return listBuilder
diff --git a/src/com/android/settings/localepicker/LocaleListEditor.java b/src/com/android/settings/localepicker/LocaleListEditor.java
index 2f8d203..87deea1 100644
--- a/src/com/android/settings/localepicker/LocaleListEditor.java
+++ b/src/com/android/settings/localepicker/LocaleListEditor.java
@@ -529,7 +529,11 @@
             @Nullable Locale defaultLocaleBeforeRemoval) {
         Locale currentSystemLocale = LocalePicker.getLocales().get(0);
         if (!localeInfo.getLocale().equals(currentSystemLocale)) {
-            displayDialogFragment(localeInfo, true);
+            if (Locale.getDefault().equals(localeInfo.getLocale())) {
+                mAdapter.doTheUpdate();
+            } else {
+                displayDialogFragment(localeInfo, true);
+            }
         } else {
             if (!localeInfo.isTranslated()) {
                 if (defaultLocaleBeforeRemoval == null) {
diff --git a/src/com/android/settings/network/AdaptiveConnectivityScreen.kt b/src/com/android/settings/network/AdaptiveConnectivityScreen.kt
index 829ec8d..8d3878d 100644
--- a/src/com/android/settings/network/AdaptiveConnectivityScreen.kt
+++ b/src/com/android/settings/network/AdaptiveConnectivityScreen.kt
@@ -37,6 +37,10 @@
 
     override fun getPreferenceHierarchy(context: Context) = preferenceHierarchy(context, this) {
         +AdaptiveConnectivityTogglePreference()
+        if (Flags.enableNestedToggleSwitches()) {
+            +WifiScorerTogglePreference()
+            +AdaptiveMobileNetworkTogglePreference()
+        }
     }
 
     override fun hasCompleteHierarchy() = false
@@ -44,4 +48,4 @@
     companion object {
         const val KEY = "adaptive_connectivity"
     }
-}
+}
\ No newline at end of file
diff --git a/src/com/android/settings/network/AdaptiveConnectivitySettings.java b/src/com/android/settings/network/AdaptiveConnectivitySettings.java
index a099d79..20bb73a 100644
--- a/src/com/android/settings/network/AdaptiveConnectivitySettings.java
+++ b/src/com/android/settings/network/AdaptiveConnectivitySettings.java
@@ -15,9 +15,14 @@
  */
 package com.android.settings.network;
 
+import static android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED;
+import static android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED;
+
 import android.app.settings.SettingsEnums;
 import android.content.Context;
+import android.net.wifi.WifiManager;
 import android.os.Bundle;
+import android.provider.Settings;
 import android.util.Log;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
@@ -31,12 +36,7 @@
 /** Adaptive connectivity is a feature which automatically manages network connections. */
 @SearchIndexable
 public class AdaptiveConnectivitySettings extends DashboardFragment {
-
   private static final String TAG = "AdaptiveConnectivitySettings";
-  protected static final String ADAPTIVE_CONNECTIVITY_WIFI_ENABLED =
-      "adaptive_connectivity_wifi_enabled";
-  protected static final String ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED =
-      "adaptive_connectivity_mobile_network_enabled";
 
   @Override
   public int getMetricsCategory() {
@@ -65,16 +65,25 @@
   public void onCreatePreferences(@NonNull Bundle savedInstanceState, @NonNull String rootKey) {
     Log.i("Settings", "onCreatePreferences");
     super.onCreatePreferences(savedInstanceState, rootKey);
-    if (Flags.enableNestedToggleSwitches()) {
-      setSwitchVisibility(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED, true);
-      setSwitchVisibility(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED, true);
+    if (Flags.enableNestedToggleSwitches() && !isCatalystEnabled()) {
+      setupSwitchPreferenceCompat(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED);
+      setupSwitchPreferenceCompat(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED);
     }
   }
 
-  private void setSwitchVisibility(String key, boolean isVisible) {
+  private void setupSwitchPreferenceCompat(String key) {
     SwitchPreferenceCompat switchPreference = findPreference(key);
     if (switchPreference != null) {
-      switchPreference.setVisible(isVisible);
+      switchPreference.setOnPreferenceChangeListener(
+          (preference, newValue) -> {
+            boolean isChecked = (Boolean) newValue;
+            Settings.Secure.putInt(getContentResolver(), key, isChecked ? 1 : 0);
+            if (preference.getKey().equals(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED)) {
+              getSystemService(WifiManager.class).setWifiScoringEnabled(isChecked);
+            }
+            return true;
+          });
+      switchPreference.setVisible(true);
     }
   }
 }
diff --git a/src/com/android/settings/network/AdaptiveMobileNetworkTogglePreference.kt b/src/com/android/settings/network/AdaptiveMobileNetworkTogglePreference.kt
new file mode 100644
index 0000000..2b6ec91
--- /dev/null
+++ b/src/com/android/settings/network/AdaptiveMobileNetworkTogglePreference.kt
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2025 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.network
+
+import android.app.settings.SettingsEnums.ACTION_ADAPTIVE_CONNECTIVITY
+import android.content.Context
+import android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED
+import com.android.settings.R
+import com.android.settings.contract.KEY_ADAPTIVE_CONNECTIVITY
+import com.android.settings.metrics.PreferenceActionMetricsProvider
+import com.android.settingslib.datastore.KeyValueStore
+import com.android.settingslib.datastore.KeyValueStoreDelegate
+import com.android.settingslib.datastore.SettingsSecureStore
+import com.android.settingslib.datastore.SettingsStore
+import com.android.settingslib.metadata.ReadWritePermit
+import com.android.settingslib.metadata.SensitivityLevel
+import com.android.settingslib.metadata.SwitchPreference
+
+class AdaptiveMobileNetworkTogglePreference() :
+    SwitchPreference(
+        KEY,
+        R.string.adaptive_connectivity_mobile_network_switch_title,
+    ),
+    PreferenceActionMetricsProvider {
+
+    override val preferenceActionMetrics: Int
+        get() = ACTION_ADAPTIVE_CONNECTIVITY
+
+    override val key: String
+        get() = KEY
+
+    override fun tags(context: Context) = arrayOf(KEY_ADAPTIVE_CONNECTIVITY)
+
+    override fun storage(context: Context): KeyValueStore =
+        AdaptiveMobileNetworkToggleStorage(context)
+
+    override fun getReadPermissions(context: Context) = SettingsSecureStore.getReadPermissions()
+
+    override fun getWritePermissions(context: Context) = SettingsSecureStore.getWritePermissions()
+
+    override fun getReadPermit(context: Context, callingPid: Int, callingUid: Int) =
+        ReadWritePermit.ALLOW
+
+    override fun getWritePermit(
+        context: Context,
+        value: Boolean?,
+        callingPid: Int,
+        callingUid: Int,
+    ) = ReadWritePermit.ALLOW
+
+    override val sensitivityLevel
+        get() = SensitivityLevel.NO_SENSITIVITY
+
+    @Suppress("UNCHECKED_CAST")
+    private class AdaptiveMobileNetworkToggleStorage(
+        private val context: Context,
+        private val settingsStore: SettingsStore = SettingsSecureStore.get(context),
+    ) : KeyValueStoreDelegate {
+
+        override val keyValueStoreDelegate
+            get() = settingsStore
+
+        override fun <T : Any> getDefaultValue(key: String, valueType: Class<T>) =
+            DEFAULT_VALUE as T
+
+        override fun <T : Any> setValue(key: String, valueType: Class<T>, value: T?) {
+            settingsStore.setValue(key, valueType, value)
+        }
+    }
+
+    companion object {
+        const val KEY = ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED
+        const val DEFAULT_VALUE = true
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/settings/network/WifiScorerTogglePreference.kt b/src/com/android/settings/network/WifiScorerTogglePreference.kt
new file mode 100644
index 0000000..b94f621
--- /dev/null
+++ b/src/com/android/settings/network/WifiScorerTogglePreference.kt
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2025 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.network
+
+import android.Manifest
+import android.app.settings.SettingsEnums.ACTION_ADAPTIVE_CONNECTIVITY
+import android.content.Context
+import android.net.wifi.WifiManager
+import android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED
+import androidx.annotation.RequiresPermission
+import com.android.settings.R
+import com.android.settings.contract.KEY_ADAPTIVE_CONNECTIVITY
+import com.android.settings.metrics.PreferenceActionMetricsProvider
+import com.android.settingslib.datastore.KeyValueStore
+import com.android.settingslib.datastore.KeyValueStoreDelegate
+import com.android.settingslib.datastore.SettingsSecureStore
+import com.android.settingslib.datastore.SettingsStore
+import com.android.settingslib.datastore.and
+import com.android.settingslib.metadata.ReadWritePermit
+import com.android.settingslib.metadata.SensitivityLevel
+import com.android.settingslib.metadata.SwitchPreference
+
+class WifiScorerTogglePreference() :
+    SwitchPreference(
+        KEY,
+        R.string.adaptive_connectivity_wifi_switch_title
+    ),
+    PreferenceActionMetricsProvider {
+
+    override val preferenceActionMetrics: Int
+        get() = ACTION_ADAPTIVE_CONNECTIVITY
+
+    override val key: String
+        get() = KEY
+
+    override fun tags(context: Context) = arrayOf(KEY_ADAPTIVE_CONNECTIVITY)
+
+    override fun storage(context: Context): KeyValueStore =
+        WifiScorerToggleStorage(context)
+
+    override fun getReadPermissions(context: Context) = SettingsSecureStore.getReadPermissions()
+
+    override fun getWritePermissions(context: Context) =
+        SettingsSecureStore.getWritePermissions() and Manifest.permission.NETWORK_SETTINGS
+
+    override fun getReadPermit(context: Context, callingPid: Int, callingUid: Int) =
+        ReadWritePermit.ALLOW
+
+    override fun getWritePermit(
+        context: Context,
+        value: Boolean?,
+        callingPid: Int,
+        callingUid: Int,
+    ) = ReadWritePermit.ALLOW
+
+    override val sensitivityLevel
+        get() = SensitivityLevel.NO_SENSITIVITY
+
+    @Suppress("UNCHECKED_CAST")
+    private class WifiScorerToggleStorage(
+        private val context: Context,
+        private val settingsStore: SettingsStore = SettingsSecureStore.get(context),
+    ) : KeyValueStoreDelegate {
+
+        override val keyValueStoreDelegate
+            get() = settingsStore
+
+        override fun <T : Any> getDefaultValue(key: String, valueType: Class<T>) =
+            DEFAULT_VALUE as T
+
+        @RequiresPermission(Manifest.permission.NETWORK_SETTINGS)
+        override fun <T : Any> setValue(key: String, valueType: Class<T>, value: T?) {
+            settingsStore.setValue(key, valueType, value)
+            context
+                .getSystemService(WifiManager::class.java)
+                ?.setWifiScoringEnabled(
+                    (value as Boolean?)
+                        ?: DEFAULT_VALUE
+                )
+        }
+    }
+
+    companion object {
+        const val KEY = ADAPTIVE_CONNECTIVITY_WIFI_ENABLED
+        const val DEFAULT_VALUE = true
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/settings/network/telephony/satellite/SatelliteSetting.java b/src/com/android/settings/network/telephony/satellite/SatelliteSetting.java
index 851038a..5af2658 100644
--- a/src/com/android/settings/network/telephony/satellite/SatelliteSetting.java
+++ b/src/com/android/settings/network/telephony/satellite/SatelliteSetting.java
@@ -28,9 +28,6 @@
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.Intent;
-import android.graphics.Typeface;
-import android.graphics.drawable.Drawable;
-import android.net.Uri;
 import android.os.Bundle;
 import android.os.PersistableBundle;
 import android.os.UserManager;
@@ -38,10 +35,6 @@
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.telephony.satellite.SatelliteManager;
-import android.text.SpannableString;
-import android.text.Spanned;
-import android.text.style.StyleSpan;
-import android.text.style.UnderlineSpan;
 import android.util.Log;
 import android.view.View;
 
@@ -53,7 +46,6 @@
 import com.android.settings.R;
 import com.android.settings.dashboard.RestrictedDashboardFragment;
 import com.android.settingslib.HelpUtils;
-import com.android.settingslib.Utils;
 import com.android.settingslib.widget.FooterPreference;
 
 import java.util.Set;
@@ -61,12 +53,7 @@
 /** Handle Satellite Setting Preference Layout. */
 public class SatelliteSetting extends RestrictedDashboardFragment {
     private static final String TAG = "SatelliteSetting";
-    private static final String PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN =
-            "key_category_your_satellite_plan";
-    private static final String PREF_KEY_YOUR_SATELLITE_PLAN = "key_your_satellite_plan";
     private static final String PREF_KEY_CATEGORY_HOW_IT_WORKS = "key_category_how_it_works";
-    private static final String PREF_KEY_YOUR_SATELLITE_DATA_PLAN = "key_your_satellite_data_plan";
-    private static final String PREF_KEY_CATEGORY_ABOUT_SATELLITE = "key_category_about_satellite";
     private static final String KEY_FOOTER_PREFERENCE = "satellite_setting_extra_info_footer_pref";
     private static final String KEY_SATELLITE_CONNECTION_GUIDE = "key_satellite_connection_guide";
     private static final String KEY_SUPPORTED_SERVICE = "key_supported_service";
@@ -99,9 +86,15 @@
         mActivity = getActivity();
         mSubId = mActivity.getIntent().getIntExtra(SUB_ID,
                 SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+        mConfigBundle = fetchCarrierConfigData(mSubId);
+        mIsServiceDataType = getIntent().getBooleanExtra(EXTRA_IS_SERVICE_DATA_TYPE, false);
+        mIsSmsAvailableForManualType = getIntent().getBooleanExtra(
+                EXTRA_IS_SMS_AVAILABLE_FOR_MANUAL_TYPE, false);
 
         use(SatelliteAppListCategoryController.class).init();
         use(SatelliteSettingAboutContentController.class).init(mSubId);
+        use(SatelliteSettingAccountInfoController.class).init(mSubId, mConfigBundle,
+                mIsSmsAvailableForManualType, mIsServiceDataType);
     }
 
     @Override
@@ -114,8 +107,6 @@
             return;
         }
 
-        mConfigBundle = fetchCarrierConfigData(mSubId);
-
         if (!isSatelliteAttachSupported(mSubId)) {
             Log.d(TAG, "SatelliteSettings: KEY_SATELLITE_ATTACH_SUPPORTED_BOOL is false, "
                     + "do nothing.");
@@ -123,9 +114,6 @@
             return;
         }
 
-        mIsServiceDataType = getIntent().getBooleanExtra(EXTRA_IS_SERVICE_DATA_TYPE, false);
-        mIsSmsAvailableForManualType = getIntent().getBooleanExtra(
-                EXTRA_IS_SMS_AVAILABLE_FOR_MANUAL_TYPE, false);
         mSimOperatorName = getSystemService(TelephonyManager.class).getSimOperatorName(mSubId);
     }
 
@@ -133,8 +121,6 @@
     public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
         boolean isSatelliteEligible = isSatelliteEligible();
-        updateTitle();
-        updateMobilePlan(isSatelliteEligible);
         updateHowItWorksContent(isSatelliteEligible);
         updateFooterContent();
     }
@@ -149,65 +135,6 @@
         return R.xml.satellite_setting;
     }
 
-    private void updateTitle() {
-        findPreference("satellite_setting").setTitle(getSubjectString());
-    }
-
-    private void updateMobilePlan(boolean isSatelliteEligible) {
-        PreferenceCategory prefCategory = findPreference(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
-        if (prefCategory == null || !mConfigBundle.getBoolean(
-                KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL)) {
-            prefCategory.setVisible(false);
-            return;
-        }
-
-        // Your mobile plan
-        prefCategory.setTitle(getResources().getString(R.string.category_title_your_satellite_plan,
-                mSimOperatorName));
-        Preference messagingPreference = findPreference(PREF_KEY_YOUR_SATELLITE_PLAN);
-
-        Drawable icon = getContext().getDrawable(R.drawable.ic_check_circle_24px);
-        if (isSatelliteEligible) {
-            /* In case satellite is allowed by carrier's entitlement server, the page will show
-               the check icon with guidance that satellite is included in user's mobile plan */
-            messagingPreference.setTitle(R.string.title_have_satellite_plan);
-            if (com.android.settings.flags.Flags.satelliteOemSettingsUxMigration()) {
-                if (mIsServiceDataType) {
-                    Preference connectivityPreference = findPreference(
-                            PREF_KEY_YOUR_SATELLITE_DATA_PLAN);
-                    connectivityPreference.setTitle(R.string.title_have_satellite_data_plan);
-                    connectivityPreference.setIcon(icon);
-                    connectivityPreference.setVisible(true);
-                }
-            }
-        } else {
-            /* Or, it will show the blocked icon with the guidance that satellite is not included
-               in user's mobile plan */
-            messagingPreference.setTitle(R.string.title_no_satellite_plan);
-            /* And, the link url provides more information via web page will be shown */
-            SpannableString spannable = new SpannableString(
-                    getResources().getString(R.string.summary_add_satellite_setting));
-            spannable.setSpan(new UnderlineSpan(), 0, spannable.length(),
-                    Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-            spannable.setSpan(new StyleSpan(Typeface.BOLD), 0, spannable.length(),
-                    Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-            messagingPreference.setSummary(spannable);
-            /* The link will lead users to a guide page */
-            messagingPreference.setOnPreferenceClickListener(pref -> {
-                String url = readSatelliteMoreInfoString();
-                if (!url.isEmpty()) {
-                    Uri uri = Uri.parse(url);
-                    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-                    startActivity(intent);
-                }
-                return true;
-            });
-            icon = getResources().getDrawable(R.drawable.ic_block_24px, null);
-        }
-        icon.setTintList(Utils.getColorAttr(getContext(), android.R.attr.textColorPrimary));
-        messagingPreference.setIcon(icon);
-    }
-
     private void updateHowItWorksContent(boolean isSatelliteEligible) {
         /* Composes "How it works" section, which guides how users can use satellite messaging, when
            satellite messaging is included in user's mobile plan, or it'll will be grey out. */
@@ -250,7 +177,7 @@
                 });
 
                 footerPreference.setLearnMoreText(
-                        getString(R.string.more_about_satellite_messaging, getDescriptionString()));
+                        getString(R.string.more_about_satellite_messaging));
             }
         }
     }
@@ -304,32 +231,6 @@
         return mConfigBundle.getBoolean(KEY_SATELLITE_ATTACH_SUPPORTED_BOOL, false);
     }
 
-    // This is for a word which first letter is uppercase. e.g. Satellite messaging.
-    private String getSubjectString() {
-        int result;
-        if (com.android.settings.flags.Flags.satelliteOemSettingsUxMigration()) {
-            result = mIsServiceDataType
-                    ? R.string.title_satellite_setting_connectivity
-                    : R.string.satellite_setting_title;
-        } else {
-            result = R.string.satellite_setting_title;
-        }
-        return getString(result);
-    }
-
-    // This is for a word without uppercase letter. e.g. satellite messaging.
-    private String getDescriptionString() {
-        int result;
-        if (com.android.settings.flags.Flags.satelliteOemSettingsUxMigration()) {
-            result = mIsServiceDataType
-                    ? R.string.description_satellite_setting_connectivity
-                    : R.string.description_satellite_setting_messaging;
-        } else {
-            result = R.string.satellite_setting_title;
-        }
-        return getString(result);
-    }
-
     private static void loge(String message) {
         Log.e(TAG, message);
     }
diff --git a/src/com/android/settings/network/telephony/satellite/SatelliteSettingAccountInfoController.java b/src/com/android/settings/network/telephony/satellite/SatelliteSettingAccountInfoController.java
new file mode 100644
index 0000000..f688a92
--- /dev/null
+++ b/src/com/android/settings/network/telephony/satellite/SatelliteSettingAccountInfoController.java
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2025 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.network.telephony.satellite;
+
+import static android.telephony.CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_MANUAL;
+import static android.telephony.CarrierConfigManager.KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT;
+import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL;
+import static android.telephony.CarrierConfigManager.KEY_SATELLITE_INFORMATION_REDIRECT_URL_STRING;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.PersistableBundle;
+import android.telephony.TelephonyManager;
+import android.telephony.satellite.SatelliteManager;
+import android.text.SpannableString;
+import android.text.Spanned;
+import android.text.style.StyleSpan;
+import android.text.style.UnderlineSpan;
+import android.util.Log;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.VisibleForTesting;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.network.telephony.TelephonyBasePreferenceController;
+import com.android.settingslib.Utils;
+
+import java.util.Set;
+
+/** A controller to control content of "Your mobile plan". */
+public class SatelliteSettingAccountInfoController extends TelephonyBasePreferenceController {
+    private static final String TAG = "SatelliteSettingAccountInfoController";
+    @VisibleForTesting
+    static final String PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN =
+            "key_category_your_satellite_plan";
+    @VisibleForTesting
+    static final String PREF_KEY_YOUR_SATELLITE_PLAN = "key_your_satellite_plan";
+    @VisibleForTesting
+    static final String PREF_KEY_YOUR_SATELLITE_DATA_PLAN = "key_your_satellite_data_plan";
+
+    private PreferenceScreen mScreen;
+    private String mSimOperatorName;
+    private boolean mIsSmsAvailable;
+    private boolean mIsDataAvailable;
+    private boolean mIsSatelliteEligible;
+    private PersistableBundle mConfigBundle = new PersistableBundle();
+
+    public SatelliteSettingAccountInfoController(@NonNull Context context,
+            @NonNull String preferenceKey) {
+        super(context, preferenceKey);
+    }
+
+    /** Initialize the UI settings. */
+    public void init(int subId, @NonNull PersistableBundle configBundle, boolean isSmsAvailable,
+            boolean isDataAvailable) {
+        mSubId = subId;
+        mConfigBundle = configBundle;
+        mSimOperatorName = mContext.getSystemService(TelephonyManager.class).getSimOperatorName(
+                mSubId);
+        mIsSmsAvailable = isSmsAvailable;
+        mIsDataAvailable = isDataAvailable;
+        mIsSatelliteEligible = isSatelliteEligible();
+    }
+
+    @Override
+    public void displayPreference(@NonNull PreferenceScreen screen) {
+        mScreen = screen;
+        super.displayPreference(screen);
+        PreferenceCategory prefCategory = screen.findPreference(
+                PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
+        // Your mobile plan
+        prefCategory.setTitle(mContext.getString(R.string.category_title_your_satellite_plan,
+                mSimOperatorName));
+
+        if (mIsSatelliteEligible) {
+            handleEligibleUI();
+            return;
+        }
+        handleIneligibleUI();
+    }
+
+    @Override
+    public int getAvailabilityStatus(int subId) {
+        return mConfigBundle.getBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL)
+                ? AVAILABLE
+                : CONDITIONALLY_UNAVAILABLE;
+    }
+
+    private void handleEligibleUI() {
+        Preference messagingPreference = mScreen.findPreference(PREF_KEY_YOUR_SATELLITE_PLAN);
+        Drawable icon = mContext.getDrawable(R.drawable.ic_check_circle_24px);
+        /* In case satellite is allowed by carrier's entitlement server, the page will show
+               the check icon with guidance that satellite is included in user's mobile plan */
+        messagingPreference.setTitle(R.string.title_have_satellite_plan);
+        if (com.android.settings.flags.Flags.satelliteOemSettingsUxMigration()) {
+            if (mIsDataAvailable) {
+                Preference connectivityPreference = mScreen.findPreference(
+                        PREF_KEY_YOUR_SATELLITE_DATA_PLAN);
+                connectivityPreference.setTitle(R.string.title_have_satellite_data_plan);
+                connectivityPreference.setIcon(icon);
+                connectivityPreference.setVisible(true);
+            }
+        }
+        icon.setTintList(Utils.getColorAttr(mContext, android.R.attr.textColorPrimary));
+        messagingPreference.setIcon(icon);
+    }
+
+    private void handleIneligibleUI() {
+        Preference messagingPreference = mScreen.findPreference(PREF_KEY_YOUR_SATELLITE_PLAN);
+        /* Or, it will show the blocked icon with the guidance that satellite is not included
+               in user's mobile plan */
+        messagingPreference.setTitle(R.string.title_no_satellite_plan);
+        String url = mConfigBundle.getString(KEY_SATELLITE_INFORMATION_REDIRECT_URL_STRING, "");
+        if (!url.isEmpty()) {
+            /* And, the link url provides more information via web page will be shown */
+            SpannableString spannable = new SpannableString(
+                    mContext.getString(R.string.summary_add_satellite_setting));
+            spannable.setSpan(new UnderlineSpan(), 0, spannable.length(),
+                    Spanned.SPAN_INCLUSIVE_INCLUSIVE);
+            spannable.setSpan(new StyleSpan(Typeface.BOLD), 0, spannable.length(),
+                    Spanned.SPAN_INCLUSIVE_INCLUSIVE);
+            messagingPreference.setSummary(spannable);
+            /* The link will lead users to a guide page */
+            messagingPreference.setOnPreferenceClickListener(pref -> {
+                Uri uri = Uri.parse(url);
+                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                mContext.startActivity(intent);
+                return true;
+            });
+        }
+
+        Drawable icon = mContext.getDrawable(R.drawable.ic_block_24px);
+        icon.setTintList(Utils.getColorAttr(mContext, android.R.attr.textColorPrimary));
+        messagingPreference.setIcon(icon);
+    }
+
+    @VisibleForTesting
+    protected boolean isSatelliteEligible() {
+        if (mConfigBundle.getInt(KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT)
+                == CARRIER_ROAMING_NTN_CONNECT_MANUAL) {
+            return mIsSmsAvailable;
+        }
+        SatelliteManager satelliteManager = mContext.getSystemService(SatelliteManager.class);
+        if (satelliteManager == null) {
+            Log.d(TAG, "SatelliteManager is null.");
+            return false;
+        }
+        try {
+            Set<Integer> restrictionReason =
+                    satelliteManager.getAttachRestrictionReasonsForCarrier(mSubId);
+            return !restrictionReason.contains(
+                    SatelliteManager.SATELLITE_COMMUNICATION_RESTRICTION_REASON_ENTITLEMENT);
+        } catch (SecurityException | IllegalStateException | IllegalArgumentException ex) {
+            Log.d(TAG, "Error to getAttachRestrictionReasonsForCarrier : " + ex.toString());
+            return false;
+        }
+    }
+}
diff --git a/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java b/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java
index 18217fd..04f2c5f 100644
--- a/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java
+++ b/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java
@@ -145,7 +145,6 @@
     public void updateState(@Nullable Preference preference) {
         super.updateState(preference);
         if (preference != null && preference.getKey().equals(getPreferenceKey())) {
-            updateTitle(preference);
             updateSummary(preference);
         }
     }
@@ -170,12 +169,6 @@
         return false;
     }
 
-    private void updateTitle(Preference preference) {
-        preference.setTitle(mCarrierRoamingNtnModeCallback.isSatelliteServiceDataType()
-                ? R.string.title_satellite_setting_connectivity
-                : R.string.satellite_setting_title);
-    }
-
     private void updateSummary(Preference preference) {
         if (preference == null) {
             logd("updateSummary - no Preference");
@@ -186,17 +179,17 @@
             return;
         }
 
-        if (!mCarrierConfigs.getBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL)) {
-            preference.setSummary(R.string.satellite_setting_summary_without_entitlement);
-            return;
-        }
-
         if (isCarrierRoamingNtnConnectedTypeManual()) {
             preference.setSummary(
                     mCarrierRoamingNtnModeCallback.isSatelliteSmsAvailable()
                             ? R.string.satellite_setting_enabled_summary
                             : R.string.satellite_setting_disabled_summary);
         } else {
+            if (!mCarrierConfigs.getBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL)) {
+                preference.setSummary(R.string.satellite_setting_summary_without_entitlement);
+                return;
+            }
+
             try {
                 Set<Integer> restrictionReason =
                         mSatelliteManager.getAttachRestrictionReasonsForCarrier(mSubId);
diff --git a/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceCategoryController.java b/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceCategoryController.java
index f2fb347..d0cb1bc 100644
--- a/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceCategoryController.java
+++ b/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceCategoryController.java
@@ -159,6 +159,7 @@
                     @Override
                     public void onResult(Boolean result) {
                         mIsSatelliteSupported.set(result);
+                        Log.d(TAG, "Satellite requestIsSupported : " + result);
                         SatelliteSettingsPreferenceCategoryController.this.displayPreference();
                     }
                 });
diff --git a/src/com/android/settings/regionalpreferences/RegionPickerBaseListPreferenceController.java b/src/com/android/settings/regionalpreferences/RegionPickerBaseListPreferenceController.java
index fc12d1b..5768421 100644
--- a/src/com/android/settings/regionalpreferences/RegionPickerBaseListPreferenceController.java
+++ b/src/com/android/settings/regionalpreferences/RegionPickerBaseListPreferenceController.java
@@ -18,7 +18,6 @@
 
 import android.content.Context;
 import android.os.Bundle;
-import android.os.LocaleList;
 import android.util.Log;
 
 import androidx.annotation.NonNull;
@@ -92,7 +91,7 @@
                     ? getSuggestedLocaleList()
                     : getSupportedLocaleList();
         if (getPreferenceCategoryKey().contains(KEY_SUGGESTED)) {
-            Locale systemLocale = LocaleList.getDefault().get(0);
+            Locale systemLocale = Locale.getDefault();
             LocaleStore.LocaleInfo localeInfo = LocaleStore.getLocaleInfo(systemLocale);
             result.add(localeInfo);
         }
@@ -106,7 +105,7 @@
             mPreferenceCategory.addPreference(pref);
             pref.setTitle(locale.getFullCountryNameNative());
             pref.setKey(locale.toString());
-            if (locale.getLocale().equals(LocaleList.getDefault().get(0))) {
+            if (locale.getLocale().equals(Locale.getDefault())) {
                 pref.setChecked(true);
             } else {
                 pref.setChecked(false);
@@ -154,7 +153,7 @@
 
     private List<LocaleStore.LocaleInfo> getSortedLocaleList(
             List<LocaleStore.LocaleInfo> localeInfos) {
-        final Locale sortingLocale = LocaleList.getDefault().get(0);
+        final Locale sortingLocale = Locale.getDefault();
         final LocaleHelper.LocaleInfoComparator comp =
                 new LocaleHelper.LocaleInfoComparator(sortingLocale, true);
         Collections.sort(localeInfos, comp);
@@ -162,7 +161,7 @@
     }
 
     private void switchRegion(LocaleStore.LocaleInfo localeInfo) {
-        if (localeInfo.getLocale().equals(LocaleList.getDefault().get(0))) {
+        if (localeInfo.getLocale().equals(Locale.getDefault())) {
             return;
         }
 
diff --git a/src/com/android/settings/regionalpreferences/RegionPickerFragment.java b/src/com/android/settings/regionalpreferences/RegionPickerFragment.java
index c064565..cf4d9b9 100644
--- a/src/com/android/settings/regionalpreferences/RegionPickerFragment.java
+++ b/src/com/android/settings/regionalpreferences/RegionPickerFragment.java
@@ -19,7 +19,6 @@
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.os.Bundle;
-import android.os.LocaleList;
 import android.provider.Settings;
 
 import androidx.annotation.NonNull;
@@ -84,7 +83,7 @@
 
     private List<AbstractPreferenceController> buildPreferenceControllers(
             @NonNull Context context) {
-        Locale parentLocale = LocaleStore.getLocaleInfo(LocaleList.getDefault().get(0)).getParent();
+        Locale parentLocale = LocaleStore.getLocaleInfo(Locale.getDefault()).getParent();
         LocaleStore.LocaleInfo parentLocaleInfo = LocaleStore.getLocaleInfo(parentLocale);
         SystemRegionSuggestedListPreferenceController mSuggestedListPreferenceController =
                 new SystemRegionSuggestedListPreferenceController(
diff --git a/src/com/android/settings/regionalpreferences/RegionPreferenceController.java b/src/com/android/settings/regionalpreferences/RegionPreferenceController.java
index 345bd75..a9ce120 100644
--- a/src/com/android/settings/regionalpreferences/RegionPreferenceController.java
+++ b/src/com/android/settings/regionalpreferences/RegionPreferenceController.java
@@ -17,7 +17,6 @@
 package com.android.settings.regionalpreferences;
 
 import android.content.Context;
-import android.os.LocaleList;
 
 import androidx.annotation.NonNull;
 import androidx.preference.Preference;
@@ -27,6 +26,8 @@
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.flags.Flags;
 
+import java.util.Locale;
+
 /** A controller for the entry of region picker page */
 public class RegionPreferenceController extends BasePreferenceController {
 
@@ -39,7 +40,7 @@
         super.displayPreference(screen);
         Preference preference = screen.findPreference(getPreferenceKey());
         LocaleStore.LocaleInfo localeInfo = LocaleStore.getLocaleInfo(
-                LocaleList.getDefault().get(0));
+                Locale.getDefault());
         preference.setSummary(localeInfo.getFullCountryNameNative());
     }
 
diff --git a/src/com/android/settings/safetycenter/BiometricSourcesUtils.java b/src/com/android/settings/safetycenter/BiometricSourcesUtils.java
index 786e3cf..9cadbbb 100644
--- a/src/com/android/settings/safetycenter/BiometricSourcesUtils.java
+++ b/src/com/android/settings/safetycenter/BiometricSourcesUtils.java
@@ -19,15 +19,11 @@
 import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
-import android.hardware.face.FaceManager;
-import android.hardware.fingerprint.FingerprintManager;
 import android.safetycenter.SafetyEvent;
 import android.safetycenter.SafetySourceData;
 import android.safetycenter.SafetySourceIssue;
 import android.safetycenter.SafetySourceStatus;
 
-import com.android.settings.Utils;
-
 /** Static helpers for setting SafetyCenter data for biometric safety sources. */
 public final class BiometricSourcesUtils {
 
@@ -93,15 +89,6 @@
                 .setSafetySourceData(context, safetySourceId, safetySourceData, safetyEvent);
     }
 
-    /** Check whether the multiple biometrics enrollment is needed. */
-    public static boolean isMultipleBiometricsEnrollmentNeeded(Context context, int userId) {
-        FaceManager faceManager = Utils.getFaceManagerOrNull(context);
-        FingerprintManager fingerprintManager = Utils.getFingerprintManagerOrNull(context);
-        return Utils.isMultipleBiometricsSupported(context)
-                && !faceManager.hasEnrolledTemplates(userId)
-                && !fingerprintManager.hasEnrolledFingerprints(userId);
-    }
-
     /** Helper method for creating a pending intent. */
     public static PendingIntent createPendingIntent(
             Context context, Intent intent, int requestCode) {
diff --git a/src/com/android/settings/safetycenter/FaceSafetySource.java b/src/com/android/settings/safetycenter/FaceSafetySource.java
index c5bde6e..73b6df5 100644
--- a/src/com/android/settings/safetycenter/FaceSafetySource.java
+++ b/src/com/android/settings/safetycenter/FaceSafetySource.java
@@ -16,7 +16,6 @@
 
 package com.android.settings.safetycenter;
 
-import static com.android.settings.biometrics.BiometricEnrollActivity.EXTRA_LAUNCH_FACE_ENROLL_FIRST;
 import static com.android.settings.safetycenter.BiometricSourcesUtils.REQUEST_CODE_FACE_SETTING;
 
 import android.content.Context;
@@ -28,7 +27,6 @@
 import android.safetycenter.SafetyEvent;
 
 import com.android.settings.Utils;
-import com.android.settings.biometrics.BiometricEnrollActivity;
 import com.android.settings.biometrics.BiometricNavigationUtils;
 import com.android.settings.biometrics.face.FaceStatusUtils;
 import com.android.settings.flags.Flags;
@@ -75,16 +73,6 @@
         Context profileParentContext = context.createContextAsUser(profileParentUserHandle, 0);
 
         if (Utils.hasFaceHardware(context)) {
-            boolean isMultipleBiometricsEnrollmentNeeded =
-                    BiometricSourcesUtils.isMultipleBiometricsEnrollmentNeeded(context, userId);
-            String settingClassName = isMultipleBiometricsEnrollmentNeeded
-                    ? BiometricEnrollActivity.class.getName()
-                    : faceStatusUtils.getSettingsClassName();
-            Bundle bundle = new Bundle();
-            if (isMultipleBiometricsEnrollmentNeeded) {
-                // Launch face enrollment first then fingerprint enrollment.
-                bundle.putBoolean(EXTRA_LAUNCH_FACE_ENROLL_FIRST, true);
-            }
             RestrictedLockUtils.EnforcedAdmin disablingAdmin = faceStatusUtils.getDisablingAdmin();
             BiometricSourcesUtils.setBiometricSafetySourceData(
                     SAFETY_SOURCE_ID,
@@ -96,9 +84,9 @@
                             biometricNavigationUtils
                                     .getBiometricSettingsIntent(
                                             context,
-                                            settingClassName,
+                                            faceStatusUtils.getSettingsClassName(),
                                             disablingAdmin,
-                                            bundle)
+                                            Bundle.EMPTY)
                                     .setIdentifier(Integer.toString(userId)),
                             REQUEST_CODE_FACE_SETTING),
                     disablingAdmin == null /* enabled */,
diff --git a/src/com/android/settings/safetycenter/FingerprintSafetySource.java b/src/com/android/settings/safetycenter/FingerprintSafetySource.java
index 752fa69..62f218b 100644
--- a/src/com/android/settings/safetycenter/FingerprintSafetySource.java
+++ b/src/com/android/settings/safetycenter/FingerprintSafetySource.java
@@ -27,7 +27,6 @@
 import android.safetycenter.SafetyEvent;
 
 import com.android.settings.Utils;
-import com.android.settings.biometrics.BiometricEnrollActivity;
 import com.android.settings.biometrics.BiometricNavigationUtils;
 import com.android.settings.biometrics.fingerprint.FingerprintStatusUtils;
 import com.android.settings.flags.Flags;
@@ -75,11 +74,6 @@
         Context profileParentContext = context.createContextAsUser(profileParentUserHandle, 0);
 
         if (Utils.hasFingerprintHardware(context)) {
-            boolean isMultipleBiometricsEnrollmentNeeded =
-                    BiometricSourcesUtils.isMultipleBiometricsEnrollmentNeeded(context, userId);
-            String settingClassName = isMultipleBiometricsEnrollmentNeeded
-                            ? BiometricEnrollActivity.class.getName()
-                            : fingerprintStatusUtils.getSettingsClassName();
             RestrictedLockUtils.EnforcedAdmin disablingAdmin =
                     fingerprintStatusUtils.getDisablingAdmin();
             BiometricSourcesUtils.setBiometricSafetySourceData(
@@ -92,7 +86,7 @@
                             biometricNavigationUtils
                                     .getBiometricSettingsIntent(
                                             context,
-                                            settingClassName,
+                                            fingerprintStatusUtils.getSettingsClassName(),
                                             disablingAdmin,
                                             Bundle.EMPTY)
                                     .setIdentifier(Integer.toString(userId)),
diff --git a/src/com/android/settings/supervision/SupervisionSafeSearchPreference.kt b/src/com/android/settings/supervision/SupervisionSafeSearchPreference.kt
new file mode 100644
index 0000000..617a345
--- /dev/null
+++ b/src/com/android/settings/supervision/SupervisionSafeSearchPreference.kt
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2025 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.supervision
+
+import android.content.Context
+import androidx.preference.Preference
+import com.android.settings.R
+import com.android.settingslib.datastore.KeyValueStore
+import com.android.settingslib.datastore.Permissions
+import com.android.settingslib.datastore.SettingsSecureStore
+import com.android.settingslib.metadata.BooleanValuePreference
+import com.android.settingslib.metadata.PreferenceMetadata
+import com.android.settingslib.metadata.ReadWritePermit
+import com.android.settingslib.metadata.SensitivityLevel
+import com.android.settingslib.preference.PreferenceBinding
+import com.android.settingslib.preference.forEachRecursively
+import com.android.settingslib.widget.SelectorWithWidgetPreference
+
+/** Base class of web content filters SafeSearch preferences. */
+sealed class SupervisionSafeSearchPreference :
+    BooleanValuePreference, SelectorWithWidgetPreference.OnClickListener, PreferenceBinding {
+    override fun storage(context: Context): KeyValueStore = SettingsSecureStore.get(context)
+
+    override fun getReadPermissions(context: Context) = Permissions.EMPTY
+
+    override fun getWritePermissions(context: Context) = Permissions.EMPTY
+
+    override fun getReadPermit(context: Context, callingPid: Int, callingUid: Int) =
+        ReadWritePermit.ALLOW
+
+    override fun getWritePermit(
+        context: Context,
+        value: Boolean?,
+        callingPid: Int,
+        callingUid: Int,
+    ) = ReadWritePermit.DISALLOW
+
+    override val sensitivityLevel
+        get() = SensitivityLevel.NO_SENSITIVITY
+
+    override fun createWidget(context: Context) = SelectorWithWidgetPreference(context)
+
+    override fun onRadioButtonClicked(emiter: SelectorWithWidgetPreference) {
+        emiter.parent?.forEachRecursively {
+            if (it is SelectorWithWidgetPreference) {
+                it.isChecked = it == emiter
+            }
+        }
+    }
+
+    override fun bind(preference: Preference, metadata: PreferenceMetadata) {
+        super.bind(preference, metadata)
+        (preference as SelectorWithWidgetPreference).also {
+            // TODO(b/401568995): Set the isChecked value using stored values.
+            it.isChecked = (it.key == SupervisionSearchFilterOffPreference.KEY)
+            it.setOnClickListener(this)
+        }
+    }
+}
+
+/** The SafeSearch filter on preference. */
+class SupervisionSearchFilterOnPreference : SupervisionSafeSearchPreference() {
+
+    override val key
+        get() = KEY
+
+    override val title
+        get() = R.string.supervision_web_content_filters_search_filter_on_title
+
+    override val summary
+        get() = R.string.supervision_web_content_filters_search_filter_on_summary
+
+    companion object {
+        const val KEY = "web_content_filters_search_filter_on"
+    }
+}
+
+/** The SafeSearch filter off preference. */
+class SupervisionSearchFilterOffPreference : SupervisionSafeSearchPreference() {
+
+    override val key
+        get() = KEY
+
+    override val title
+        get() = R.string.supervision_web_content_filters_search_filter_off_title
+
+    override val summary
+        get() = R.string.supervision_web_content_filters_search_filter_off_summary
+
+    companion object {
+        const val KEY = "web_content_filters_search_filter_off"
+    }
+}
diff --git a/src/com/android/settings/supervision/SupervisionSafeSitesDataStore.kt b/src/com/android/settings/supervision/SupervisionSafeSitesDataStore.kt
new file mode 100644
index 0000000..4f283b8
--- /dev/null
+++ b/src/com/android/settings/supervision/SupervisionSafeSitesDataStore.kt
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2025 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.supervision
+
+import android.content.Context
+import android.provider.Settings.Secure.BROWSER_CONTENT_FILTERS_ENABLED
+import com.android.settingslib.datastore.AbstractKeyedDataObservable
+import com.android.settingslib.datastore.HandlerExecutor
+import com.android.settingslib.datastore.KeyValueStore
+import com.android.settingslib.datastore.KeyedObserver
+import com.android.settingslib.datastore.SettingsSecureStore
+import com.android.settingslib.datastore.SettingsStore
+
+/** Datastore of the safe sites preference. */
+@Suppress("UNCHECKED_CAST")
+class SupervisionSafeSitesDataStore(
+    private val context: Context,
+    private val settingsStore: SettingsStore = SettingsSecureStore.get(context),
+) : AbstractKeyedDataObservable<String>(), KeyedObserver<String>, KeyValueStore {
+
+    override fun contains(key: String) =
+        key == SupervisionBlockExplicitSitesPreference.KEY ||
+            key == SupervisionAllowAllSitesPreference.KEY
+
+    override fun <T : Any> getValue(key: String, valueType: Class<T>): T? {
+        val settingValue = (settingsStore.getBoolean(BROWSER_CONTENT_FILTERS_ENABLED) == true)
+        return when (key) {
+            SupervisionAllowAllSitesPreference.KEY -> !settingValue
+
+            SupervisionBlockExplicitSitesPreference.KEY -> settingValue
+
+            else -> null
+        }
+            as T?
+    }
+
+    override fun <T : Any> setValue(key: String, valueType: Class<T>, value: T?) {
+        if (value !is Boolean) return
+        when (key) {
+            SupervisionAllowAllSitesPreference.KEY ->
+                settingsStore.setBoolean(BROWSER_CONTENT_FILTERS_ENABLED, !value)
+
+            SupervisionBlockExplicitSitesPreference.KEY ->
+                settingsStore.setBoolean(BROWSER_CONTENT_FILTERS_ENABLED, value)
+        }
+    }
+
+    override fun onFirstObserverAdded() {
+        // observe the underlying storage key
+        settingsStore.addObserver(BROWSER_CONTENT_FILTERS_ENABLED, this, HandlerExecutor.main)
+    }
+
+    override fun onKeyChanged(key: String, reason: Int) {
+        // forward data change to preference hierarchy key
+        notifyChange(SupervisionBlockExplicitSitesPreference.KEY, reason)
+        notifyChange(SupervisionAllowAllSitesPreference.KEY, reason)
+    }
+
+    override fun onLastObserverRemoved() {
+        settingsStore.removeObserver(BROWSER_CONTENT_FILTERS_ENABLED, this)
+    }
+}
diff --git a/src/com/android/settings/supervision/SupervisionSafeSitesPreference.kt b/src/com/android/settings/supervision/SupervisionSafeSitesPreference.kt
index aaa5a33..d78afb2 100644
--- a/src/com/android/settings/supervision/SupervisionSafeSitesPreference.kt
+++ b/src/com/android/settings/supervision/SupervisionSafeSitesPreference.kt
@@ -18,9 +18,7 @@
 import android.content.Context
 import androidx.preference.Preference
 import com.android.settings.R
-import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.Permissions
-import com.android.settingslib.datastore.SettingsSecureStore
 import com.android.settingslib.metadata.BooleanValuePreference
 import com.android.settingslib.metadata.PreferenceMetadata
 import com.android.settingslib.metadata.ReadWritePermit
@@ -30,9 +28,10 @@
 import com.android.settingslib.widget.SelectorWithWidgetPreference
 
 /** Base class of web content filters Safe sites preferences. */
-sealed class SupervisionSafeSitesPreference :
-    BooleanValuePreference, SelectorWithWidgetPreference.OnClickListener, PreferenceBinding {
-    override fun storage(context: Context): KeyValueStore = SettingsSecureStore.get(context)
+sealed class SupervisionSafeSitesPreference(
+    protected val dataStore: SupervisionSafeSitesDataStore
+) : BooleanValuePreference, SelectorWithWidgetPreference.OnClickListener, PreferenceBinding {
+    override fun storage(context: Context) = dataStore
 
     override fun getReadPermissions(context: Context) = Permissions.EMPTY
 
@@ -64,15 +63,15 @@
     override fun bind(preference: Preference, metadata: PreferenceMetadata) {
         super.bind(preference, metadata)
         (preference as SelectorWithWidgetPreference).also {
-            // TODO(b/401568468): Set the isChecked value using stored values.
-            it.isChecked = (it.key == SupervisionAllowAllSitesPreference.KEY)
+            it.isChecked = (dataStore.getBoolean(it.key) == true)
             it.setOnClickListener(this)
         }
     }
 }
 
 /** The "Try to block explicit sites" preference. */
-class SupervisionBlockExplicitSitesPreference : SupervisionSafeSitesPreference() {
+class SupervisionBlockExplicitSitesPreference(dataStore: SupervisionSafeSitesDataStore) :
+    SupervisionSafeSitesPreference(dataStore) {
 
     override val key
         get() = KEY
@@ -89,7 +88,8 @@
 }
 
 /** The "Allow all sites" preference. */
-class SupervisionAllowAllSitesPreference : SupervisionSafeSitesPreference() {
+class SupervisionAllowAllSitesPreference(dataStore: SupervisionSafeSitesDataStore) :
+    SupervisionSafeSitesPreference(dataStore) {
 
     override val key
         get() = KEY
diff --git a/src/com/android/settings/supervision/SupervisionWebContentFiltersScreen.kt b/src/com/android/settings/supervision/SupervisionWebContentFiltersScreen.kt
index 0a2891b..994165a 100644
--- a/src/com/android/settings/supervision/SupervisionWebContentFiltersScreen.kt
+++ b/src/com/android/settings/supervision/SupervisionWebContentFiltersScreen.kt
@@ -47,14 +47,23 @@
                 R.string.supervision_web_content_filters_browser_title,
             ) +=
                 {
-                    +SupervisionBlockExplicitSitesPreference()
-                    +SupervisionAllowAllSitesPreference()
+                    val dataStore = SupervisionSafeSitesDataStore(context)
+                    +SupervisionBlockExplicitSitesPreference(dataStore)
+                    +SupervisionAllowAllSitesPreference(dataStore)
                 }
-            // TODO(b/401569571) implement the SafeSearch group.
+            +PreferenceCategory(
+                SEARCH_RADIO_BUTTON_GROUP,
+                R.string.supervision_web_content_filters_search_title,
+            ) +=
+                {
+                    +SupervisionSearchFilterOnPreference()
+                    +SupervisionSearchFilterOffPreference()
+                }
         }
 
     companion object {
         const val KEY = "supervision_web_content_filters"
         internal const val BROWSER_RADIO_BUTTON_GROUP = "browser_radio_button_group"
+        internal const val SEARCH_RADIO_BUTTON_GROUP = "search_radio_button_group"
     }
 }
diff --git a/tests/robotests/src/com/android/settings/accessibility/LockScreenRotationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/LockScreenRotationPreferenceControllerTest.java
index c98ad3d..88623ac 100644
--- a/tests/robotests/src/com/android/settings/accessibility/LockScreenRotationPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/LockScreenRotationPreferenceControllerTest.java
@@ -16,9 +16,14 @@
 
 package com.android.settings.accessibility;
 
+import static com.android.settings.testutils.DeviceStateAutoRotateSettingTestUtils.setDeviceStateRotationLockEnabled;
+
 import static com.google.common.truth.Truth.assertThat;
 
+import static org.mockito.Mockito.when;
+
 import android.content.Context;
+import android.content.res.Resources;
 import android.os.UserHandle;
 import android.provider.Settings;
 
@@ -26,12 +31,14 @@
 
 import com.android.internal.view.RotationPolicy;
 import com.android.settings.core.BasePreferenceController;
-import com.android.settings.testutils.shadow.ShadowDeviceStateRotationLockSettingsManager;
 import com.android.settings.testutils.shadow.ShadowRotationPolicy;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
@@ -41,48 +48,45 @@
         com.android.settings.testutils.shadow.ShadowSystemSettings.class,
 })
 public class LockScreenRotationPreferenceControllerTest {
-
+    @Mock
+    private Resources mResources;
     private Context mContext;
     private SwitchPreference mPreference;
     private LockScreenRotationPreferenceController mController;
 
     @Before
     public void setUp() {
-        mContext = RuntimeEnvironment.application;
+        MockitoAnnotations.initMocks(this);
+        mContext = Mockito.spy(RuntimeEnvironment.application);
         mPreference = new SwitchPreference(mContext);
+        when(mContext.getResources()).thenReturn(mResources);
+
         mController = new LockScreenRotationPreferenceController(mContext, "lock_screen");
     }
 
     @Test
-    @Config(shadows = {
-            ShadowRotationPolicy.class,
-            ShadowDeviceStateRotationLockSettingsManager.class
-    })
+    @Config(shadows = {ShadowRotationPolicy.class})
     public void getAvailabilityStatus_supportedRotation_shouldReturnAvailable() {
         ShadowRotationPolicy.setRotationSupported(true /* supported */);
+        setDeviceStateRotationLockEnabled(false, mResources);
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
                 BasePreferenceController.AVAILABLE);
     }
 
     @Test
-    @Config(shadows = {
-            ShadowRotationPolicy.class,
-            ShadowDeviceStateRotationLockSettingsManager.class
-    })
+    @Config(shadows = {ShadowRotationPolicy.class})
     public void getAvailabilityStatus_deviceStateRotationEnabled_returnsUnsupported() {
         ShadowRotationPolicy.setRotationSupported(true /* supported */);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
                 BasePreferenceController.UNSUPPORTED_ON_DEVICE);
     }
 
     @Test
-    @Config(shadows = {
-            ShadowRotationPolicy.class,
-            ShadowDeviceStateRotationLockSettingsManager.class
-    })    public void getAvailabilityStatus_unsupportedRotation_shouldReturnUnsupportedOnDevice() {
+    @Config(shadows = {ShadowRotationPolicy.class})
+    public void getAvailabilityStatus_unsupportedRotation_shouldReturnUnsupportedOnDevice() {
         ShadowRotationPolicy.setRotationSupported(false /* supported */);
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
diff --git a/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewControllerTest.java
index 81c869d..375952f 100644
--- a/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewControllerTest.java
@@ -16,8 +16,6 @@
 
 package com.android.settings.accessibility;
 
-import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
@@ -79,15 +77,6 @@
     }
 
     @Test
-    public void numberOfPreviewSamples_numberOfPreviewContentDescription_isEqual() {
-        int[] previewSamples = TextReadingPreviewController.getPreviewSampleLayouts(mContext);
-        int[] previewContentDescriptions =
-                TextReadingPreviewController.getPreviewSampleContentDescriptions(mContext);
-
-        assertThat(previewSamples.length).isEqualTo(previewContentDescriptions.length);
-    }
-
-    @Test
     public void initPreviewerAdapter_verifyAction() {
         when(mPreferenceScreen.findPreference(PREVIEW_KEY)).thenReturn(mPreviewPreference);
         when(mPreferenceScreen.findPreference(FONT_SIZE_KEY)).thenReturn(mFontSizePreference);
diff --git a/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewPreferenceTest.java b/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewPreferenceTest.java
index 9cd8fa2..ac503bd 100644
--- a/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewPreferenceTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/TextReadingPreviewPreferenceTest.java
@@ -49,48 +49,28 @@
  */
 @RunWith(RobolectricTestRunner.class)
 public class TextReadingPreviewPreferenceTest {
-    private Context mContext;
     private TextReadingPreviewPreference mTextReadingPreviewPreference;
     private PreferenceViewHolder mHolder;
     private ViewPager mViewPager;
     private PreviewPagerAdapter mPreviewPagerAdapter;
     private int mPreviewSampleCount;
-    private int[] mPreviewContentDescriptions;
 
     @Before
     public void setUp() {
-        mContext = ApplicationProvider.getApplicationContext();
-        mPreviewContentDescriptions =
-                TextReadingPreviewController.getPreviewSampleContentDescriptions(mContext);
-        final int[] previewSamples = TextReadingPreviewController.getPreviewSampleLayouts(mContext);
+        final Context context = ApplicationProvider.getApplicationContext();
+        final int[] previewSamples = TextReadingPreviewController.getPreviewSampleLayouts(context);
         mPreviewSampleCount = previewSamples.length;
         final Configuration[] configurations = createConfigurations(mPreviewSampleCount);
-        mTextReadingPreviewPreference = new TextReadingPreviewPreference(mContext);
+        mTextReadingPreviewPreference = new TextReadingPreviewPreference(context);
         mPreviewPagerAdapter =
-                spy(new PreviewPagerAdapter(mContext, /* isLayoutRtl= */ false,
+                spy(new PreviewPagerAdapter(context, /* isLayoutRtl= */ false,
                         previewSamples, configurations));
-        final LayoutInflater inflater = LayoutInflater.from(mContext);
+        final LayoutInflater inflater = LayoutInflater.from(context);
         final View view =
                 inflater.inflate(mTextReadingPreviewPreference.getLayoutResource(),
-                        new LinearLayout(mContext), false);
+                        new LinearLayout(context), false);
         mHolder = PreferenceViewHolder.createInstanceForTests(view);
         mViewPager = view.findViewById(R.id.preview_pager);
-        mTextReadingPreviewPreference.setContentDescription(mPreviewContentDescriptions);
-    }
-
-    @Test
-    public void changePreviewPage_getExpectedContentDescription() {
-        mTextReadingPreviewPreference.setPreviewAdapter(mPreviewPagerAdapter);
-        mTextReadingPreviewPreference.onBindViewHolder(mHolder);
-
-        // Verify the initial content description
-        assertThat(mViewPager.getContentDescription().toString())
-                .isEqualTo(mContext.getString(mPreviewContentDescriptions[0]));
-
-        // Change the preview page
-        mViewPager.setCurrentItem(1);
-        assertThat(mViewPager.getContentDescription().toString())
-                .isEqualTo(mContext.getString(mPreviewContentDescriptions[1]));
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiverTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiverTest.java
index a183d8d..42d7105 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiverTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothKeyMissingReceiverTest.java
@@ -127,6 +127,7 @@
     public void broadcastReceiver_background_showNotification() {
         Intent intent = spy(new Intent(BluetoothDevice.ACTION_KEY_MISSING));
         when(intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE)).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
         BluetoothKeyMissingReceiver bluetoothKeyMissingReceiver = getReceiver(intent);
         bluetoothKeyMissingReceiver.onReceive(mContext, intent);
 
@@ -141,6 +142,7 @@
         when(mLocalBtManager.isForegroundActivity()).thenReturn(true);
         Intent intent = spy(new Intent(BluetoothDevice.ACTION_KEY_MISSING));
         when(intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE)).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
         BluetoothKeyMissingReceiver bluetoothKeyMissingReceiver = getReceiver(intent);
         bluetoothKeyMissingReceiver.onReceive(mContext, intent);
 
diff --git a/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java b/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java
index 8859ebd..176bfa8 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java
@@ -18,22 +18,29 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
+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.mock;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.bluetooth.BluetoothCsipSetCoordinator;
 import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothLeBroadcastReceiveState;
 import android.content.Context;
+import android.os.SystemProperties;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.settings.testutils.FakeFeatureFactory;
-import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
+import com.android.settingslib.bluetooth.A2dpProfile;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
 import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
+import com.android.settingslib.bluetooth.HeadsetProfile;
+import com.android.settingslib.bluetooth.HearingAidProfile;
+import com.android.settingslib.bluetooth.LeAudioProfile;
 import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
 import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcastAssistant;
 import com.android.settingslib.bluetooth.LocalBluetoothManager;
@@ -41,8 +48,8 @@
 import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -52,10 +59,8 @@
 import org.mockito.junit.MockitoJUnit;
 import org.mockito.junit.MockitoRule;
 import org.robolectric.RobolectricTestRunner;
-import org.robolectric.annotation.Config;
 
 @RunWith(RobolectricTestRunner.class)
-@Config(shadows = {ShadowBluetoothUtils.class})
 public class UtilsTest {
     private static final int METADATA_FAST_PAIR_CUSTOMIZED_FIELDS = 25;
     private static final String TEMP_BOND_METADATA =
@@ -73,6 +78,14 @@
     @Mock
     private LocalBluetoothLeBroadcastAssistant mAssistant;
     @Mock
+    private A2dpProfile mA2dpProfile;
+    @Mock
+    private HeadsetProfile mHeadsetProfile;
+    @Mock
+    private LeAudioProfile mLeAudioProfile;
+    @Mock
+    private HearingAidProfile mHearingAidProfile;
+    @Mock
     private CachedBluetoothDeviceManager mDeviceManager;
 
     private MetricsFeatureProvider mMetricsFeatureProvider;
@@ -80,17 +93,14 @@
     @Before
     public void setUp() {
         mMetricsFeatureProvider = FakeFeatureFactory.setupForTest().getMetricsFeatureProvider();
-        ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBtManager;
-        mLocalBtManager = Utils.getLocalBtManager(mContext);
         when(mLocalBtManager.getProfileManager()).thenReturn(mProfileManager);
         when(mLocalBtManager.getCachedDeviceManager()).thenReturn(mDeviceManager);
         when(mProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast);
         when(mProfileManager.getLeAudioBroadcastAssistantProfile()).thenReturn(mAssistant);
-    }
-
-    @After
-    public void tearDown() {
-        ShadowBluetoothUtils.reset();
+        when(mProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile);
+        when(mProfileManager.getHeadsetProfile()).thenReturn(mHeadsetProfile);
+        when(mProfileManager.getLeAudioProfile()).thenReturn(mLeAudioProfile);
+        when(mProfileManager.getHearingAidProfile()).thenReturn(mHearingAidProfile);
     }
 
     @Test
@@ -170,4 +180,148 @@
         when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(state));
         assertThat(Utils.shouldBlockPairingInAudioSharing(mLocalBtManager)).isTrue();
     }
+
+    @Test
+    public void enableLeAudioProfile_multipleDeviceInGroup() {
+        CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
+        CachedBluetoothDevice cachedDevice2 = mock(CachedBluetoothDevice.class);
+        CachedBluetoothDevice cachedDevice3 = mock(CachedBluetoothDevice.class);
+        BluetoothDevice device1 = mock(BluetoothDevice.class);
+        BluetoothDevice device2 = mock(BluetoothDevice.class);
+        BluetoothDevice device3 = mock(BluetoothDevice.class);
+        when(cachedDevice1.getDevice()).thenReturn(device1);
+        when(cachedDevice2.getDevice()).thenReturn(device2);
+        when(cachedDevice3.getDevice()).thenReturn(device3);
+        when(cachedDevice1.getMemberDevice()).thenReturn(ImmutableSet.of(cachedDevice2));
+        when(mDeviceManager.getCachedDevicesCopy())
+                .thenReturn(ImmutableList.of(cachedDevice1, cachedDevice3));
+        when(cachedDevice1.getGroupId()).thenReturn(1);
+        when(cachedDevice2.getGroupId()).thenReturn(1);
+        when(cachedDevice3.getGroupId()).thenReturn(2);
+        when(cachedDevice1.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+        when(cachedDevice2.getProfiles()).thenReturn(ImmutableList.of(mLeAudioProfile));
+        when(cachedDevice3.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+
+        Utils.setLeAudioEnabled(mLocalBtManager, cachedDevice2, true);
+
+        verify(mLeAudioProfile).setEnabled(device1, true);
+        verify(mLeAudioProfile).setEnabled(device2, true);
+        verify(mHearingAidProfile).setEnabled(device1, false);
+        verify(mAssistant).setEnabled(device1, true);
+        verify(mLeAudioProfile, never()).setEnabled(eq(device3), anyBoolean());
+        verify(mA2dpProfile, never()).setEnabled(eq(device3), anyBoolean());
+        verify(mHeadsetProfile, never()).setEnabled(eq(device3), anyBoolean());
+    }
+
+    @Test
+    public void enableLeAudioProfile_dualModeEnabled_a2dpAndHfpNotChanged() {
+        SystemProperties.set("persist.bluetooth.enable_dual_mode_audio", "true");
+        CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
+        BluetoothDevice device1 = mock(BluetoothDevice.class);
+        when(cachedDevice1.getDevice()).thenReturn(device1);
+        when(cachedDevice1.getGroupId()).thenReturn(BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(cachedDevice1.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+        when(mA2dpProfile.isEnabled(device1)).thenReturn(true);
+        when(mHeadsetProfile.isEnabled(device1)).thenReturn(true);
+
+        Utils.setLeAudioEnabled(mLocalBtManager, cachedDevice1, true);
+
+        verify(mLeAudioProfile).setEnabled(device1, true);
+        verify(mA2dpProfile, never()).setEnabled(device1, false);
+        verify(mHeadsetProfile, never()).setEnabled(device1, false);
+    }
+
+    @Test
+    public void enableLeAudioProfile_dualModeDisabled_disableA2dpAndHfp() {
+        SystemProperties.set("persist.bluetooth.enable_dual_mode_audio", "false");
+        CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
+        BluetoothDevice device1 = mock(BluetoothDevice.class);
+        when(cachedDevice1.getDevice()).thenReturn(device1);
+        when(cachedDevice1.getGroupId()).thenReturn(BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(cachedDevice1.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+        when(mA2dpProfile.isEnabled(device1)).thenReturn(true);
+        when(mHeadsetProfile.isEnabled(device1)).thenReturn(true);
+
+        Utils.setLeAudioEnabled(mLocalBtManager, cachedDevice1, true);
+
+        verify(mLeAudioProfile).setEnabled(device1, true);
+        verify(mA2dpProfile).setEnabled(device1, false);
+        verify(mHeadsetProfile).setEnabled(device1, false);
+    }
+
+    @Test
+    public void disableLeAudioProfile_multipleDeviceInGroup() {
+        CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
+        CachedBluetoothDevice cachedDevice2 = mock(CachedBluetoothDevice.class);
+        CachedBluetoothDevice cachedDevice3 = mock(CachedBluetoothDevice.class);
+        BluetoothDevice device1 = mock(BluetoothDevice.class);
+        BluetoothDevice device2 = mock(BluetoothDevice.class);
+        BluetoothDevice device3 = mock(BluetoothDevice.class);
+        when(cachedDevice1.getDevice()).thenReturn(device1);
+        when(cachedDevice2.getDevice()).thenReturn(device2);
+        when(cachedDevice3.getDevice()).thenReturn(device3);
+        when(cachedDevice1.getMemberDevice()).thenReturn(ImmutableSet.of(cachedDevice2));
+        when(mDeviceManager.getCachedDevicesCopy())
+                .thenReturn(ImmutableList.of(cachedDevice1, cachedDevice3));
+        when(cachedDevice1.getGroupId()).thenReturn(1);
+        when(cachedDevice2.getGroupId()).thenReturn(1);
+        when(cachedDevice3.getGroupId()).thenReturn(2);
+        when(cachedDevice1.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+        when(cachedDevice2.getProfiles()).thenReturn(ImmutableList.of(mLeAudioProfile));
+        when(cachedDevice3.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+
+        Utils.setLeAudioEnabled(mLocalBtManager, cachedDevice2, false);
+
+        verify(mLeAudioProfile).setEnabled(device1, false);
+        verify(mLeAudioProfile).setEnabled(device2, false);
+        verify(mHearingAidProfile).setEnabled(device1, true);
+        verify(mAssistant).setEnabled(device1, false);
+        verify(mLeAudioProfile, never()).setEnabled(eq(device3), anyBoolean());
+        verify(mA2dpProfile, never()).setEnabled(eq(device3), anyBoolean());
+        verify(mHeadsetProfile, never()).setEnabled(eq(device3), anyBoolean());
+    }
+
+    @Test
+    public void disableLeAudioProfile_dualModeEnabled_a2dpAndHfpNotChanged() {
+        SystemProperties.set("persist.bluetooth.enable_dual_mode_audio", "true");
+        CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
+        BluetoothDevice device1 = mock(BluetoothDevice.class);
+        when(cachedDevice1.getDevice()).thenReturn(device1);
+        when(cachedDevice1.getGroupId()).thenReturn(BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(cachedDevice1.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+        when(mA2dpProfile.isEnabled(device1)).thenReturn(false);
+        when(mHeadsetProfile.isEnabled(device1)).thenReturn(false);
+
+        Utils.setLeAudioEnabled(mLocalBtManager, cachedDevice1, false);
+
+        verify(mLeAudioProfile).setEnabled(device1, false);
+        verify(mA2dpProfile, never()).setEnabled(device1, true);
+        verify(mHeadsetProfile, never()).setEnabled(device1, true);
+    }
+
+    @Test
+    public void disableLeAudioProfile_dualModeDisabled_enableA2dpAndHfp() {
+        SystemProperties.set("persist.bluetooth.enable_dual_mode_audio", "false");
+        CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
+        BluetoothDevice device1 = mock(BluetoothDevice.class);
+        when(cachedDevice1.getDevice()).thenReturn(device1);
+        when(cachedDevice1.getGroupId()).thenReturn(BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(cachedDevice1.getProfiles())
+                .thenReturn(ImmutableList.of(mA2dpProfile, mHeadsetProfile, mLeAudioProfile));
+        when(mA2dpProfile.isEnabled(device1)).thenReturn(false);
+        when(mHeadsetProfile.isEnabled(device1)).thenReturn(false);
+
+        Utils.setLeAudioEnabled(mLocalBtManager, cachedDevice1, false);
+
+        verify(mLeAudioProfile).setEnabled(device1, false);
+        verify(mA2dpProfile).setEnabled(device1, true);
+        verify(mHeadsetProfile).setEnabled(device1, true);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceControllerTest.java
index 4f6fed7..7fece8b 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceControllerTest.java
@@ -43,6 +43,8 @@
 import android.content.Context;
 import android.database.ContentObserver;
 import android.os.Looper;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
 import android.platform.test.flag.junit.SetFlagsRule;
 import android.provider.Settings;
 import android.view.View;
@@ -78,6 +80,7 @@
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
 
 import org.junit.After;
 import org.junit.Before;
@@ -113,9 +116,6 @@
     private static final int TEST_DEVICE_GROUP_ID1 = 1;
     private static final int TEST_DEVICE_GROUP_ID2 = 2;
 
-    private static final String TEST_SETTINGS_KEY =
-            "bluetooth_le_broadcast_fallback_active_group_id";
-
     @Rule public final MockitoRule mMockitoRule = MockitoJUnit.rule();
     @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
 
@@ -125,6 +125,7 @@
     @Mock private BluetoothEventManager mBtEventManager;
     @Mock private LocalBluetoothProfileManager mBtProfileManager;
     @Mock private CachedBluetoothDeviceManager mCacheManager;
+    @Mock private LeAudioProfile mLeaProfile;
     @Mock private LocalBluetoothLeBroadcast mBroadcast;
     @Mock private LocalBluetoothLeBroadcastAssistant mAssistant;
     @Mock private VolumeControlProfile mVolumeControl;
@@ -169,6 +170,7 @@
         when(btManager.getEventManager()).thenReturn(mBtEventManager);
         when(btManager.getProfileManager()).thenReturn(mBtProfileManager);
         when(btManager.getCachedDeviceManager()).thenReturn(mCacheManager);
+        when(mBtProfileManager.getLeAudioProfile()).thenReturn(mLeaProfile);
         when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast);
         when(mBtProfileManager.getLeAudioBroadcastAssistantProfile()).thenReturn(mAssistant);
         when(mBtProfileManager.getVolumeControlProfile()).thenReturn(mVolumeControl);
@@ -210,8 +212,8 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStart_flagOff_doNothing() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.onStart(mLifecycleOwner);
         verify(mBtEventManager, never()).registerCallback(mController);
         verify(mContentResolver, never())
@@ -225,8 +227,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStart_flagOn_registerCallback() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.onStart(mLifecycleOwner);
         verify(mBtEventManager).registerCallback(mController);
         verify(mContentResolver)
@@ -240,8 +242,8 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStop_flagOff_doNothing() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(true);
         mController.onStop(mLifecycleOwner);
         verify(mBtEventManager, never()).unregisterCallback(mController);
@@ -251,8 +253,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStop_flagOn_notRegistered_doNothing() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(false);
         mController.onStop(mLifecycleOwner);
         verify(mBtEventManager, never()).unregisterCallback(mController);
@@ -262,8 +264,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStop_flagOn_registered_unregisterCallback() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(true);
         mController.onStop(mLifecycleOwner);
         verify(mBtEventManager).unregisterCallback(mController);
@@ -273,20 +275,20 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void getAvailabilityStatus_flagOn() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void getAvailabilityStatus_flagOff() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         assertThat(mController.getAvailabilityStatus()).isEqualTo(UNSUPPORTED_ON_DEVICE);
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_flagOff_invisible() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         mController.displayPreference(mScreen);
         mController.updateVisibility();
@@ -295,8 +297,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_broadcastOffBluetoothOff_invisible() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         when(mBroadcast.isEnabled(any())).thenReturn(false);
         mShadowBluetoothAdapter.setEnabled(false);
         mController.displayPreference(mScreen);
@@ -306,8 +308,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_broadcastOnBluetoothOff_invisible() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         mShadowBluetoothAdapter.setEnabled(false);
         mController.displayPreference(mScreen);
@@ -317,8 +319,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_broadcastOffBluetoothOn_invisible() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         when(mBroadcast.isEnabled(any())).thenReturn(false);
         mController.displayPreference(mScreen);
         mController.updateVisibility();
@@ -327,8 +329,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_broadcastOnBluetoothOn_visible() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         mController.displayPreference(mScreen);
         mController.updateVisibility();
@@ -337,8 +339,9 @@
     }
 
     @Test
-    public void onProfileConnectionStateChanged_noDeviceInSharing_updateSummary() {
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID1);
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onProfileConnectionStateChanged_adoptApi_noDeviceInSharing_updateSummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID1);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
         mController.displayPreference(mScreen);
@@ -354,8 +357,9 @@
     }
 
     @Test
-    public void onFallbackDeviceChanged_updateSummary() {
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID1);
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onFallbackDeviceChanged_adoptApi_updateSummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID1);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1));
         when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
@@ -372,8 +376,9 @@
     }
 
     @Test
-    public void onActiveDeviceChanged_updateSummary() {
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY,
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onActiveDeviceChanged_adoptApi_updateSummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(
                 BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
         when(mCachedDevice1.isActiveDevice(BluetoothProfile.LE_AUDIO)).thenReturn(true);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
@@ -392,8 +397,9 @@
     }
 
     @Test
-    public void displayPreference_fallbackDeviceInSharing_showCorrectSummary() {
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID1);
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_adoptApi_fallbackDeviceInSharing_showCorrectSummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID1);
         when(mCachedDevice3.isActiveDevice(BluetoothProfile.LE_AUDIO)).thenReturn(true);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices())
@@ -408,8 +414,9 @@
     }
 
     @Test
-    public void displayPreference_activeDeviceInSharing_showCorrectSummary() {
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID2);
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_adoptApi_activeDeviceInSharing_showCorrectSummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID2);
         when(mCachedDevice1.isActiveDevice(BluetoothProfile.LE_AUDIO)).thenReturn(true);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1, mDevice2));
@@ -422,8 +429,9 @@
     }
 
     @Test
-    public void displayPreference_noFallbackDeviceOrActiveInSharing_showEmptySummary() {
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID2);
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_adoptApi_noFallbackDeviceOrActiveInSharing_showEmptySummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID2);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1, mDevice2));
         when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
@@ -433,9 +441,10 @@
     }
 
     @Test
-    public void displayPreference_noFallbackOrActiveDevice_showEmptySummary() {
-        Settings.Secure.putInt(
-                mContentResolver, TEST_SETTINGS_KEY, BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_adoptApi_noFallbackOrActiveDevice_showEmptySummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(
+                BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
         mController.displayPreference(mScreen);
@@ -444,13 +453,235 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_adoptApi_clickToShowCorrectDialog() {
+        AlertDialog latestAlertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
+        if (latestAlertDialog != null) {
+            latestAlertDialog.dismiss();
+            ShadowAlertDialogCompat.reset();
+        }
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID1);
+        mShadowBluetoothAdapter.setMostRecentlyConnectedDevices(
+                List.of(mDevice1, mDevice2, mDevice3));
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(
+                ImmutableList.of(mDevice1, mDevice2, mDevice3));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.init(mParentFragment);
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        mPreference.performClick();
+        shadowOf(Looper.getMainLooper()).idle();
+        AlertDialog dialog = ShadowAlertDialogCompat.getLatestAlertDialog();
+        assertThat(dialog.isShowing()).isTrue();
+        assertThat(dialog.getListView().getCount()).isEqualTo(2);
+        ArrayList<View> outViews = new ArrayList<>();
+        dialog.getListView()
+                .findViewsWithText(outViews, TEST_DEVICE_NAME1, View.FIND_VIEWS_WITH_TEXT);
+        assertThat(outViews.size()).isEqualTo(1);
+        View view = Iterables.getOnlyElement(outViews);
+        assertThat(view instanceof CheckedTextView).isTrue();
+        assertThat(((CheckedTextView) view).isChecked()).isTrue();
+        verify(mFeatureFactory.metricsFeatureProvider)
+                .visible(
+                        /* context= */ eq(null),
+                        /* source= */ anyInt(),
+                        eq(SettingsEnums.DIALOG_AUDIO_SHARING_CALL_AUDIO),
+                        /* latency= */ anyInt());
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void testBluetoothLeBroadcastAssistantCallbacks_adoptApi_updateSummary() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(
+                BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString()).isEmpty();
+
+        // onSourceAdded will update summary
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID1);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.mBroadcastAssistantCallback.onSourceAdded(mDevice1, /* sourceId= */
+                1, /* reason= */ 1);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString())
+                .isEqualTo(
+                        mContext.getString(
+                                R.string.audio_sharing_call_audio_description, TEST_DEVICE_NAME1));
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void testBluetoothLeBroadcastAssistantCallbacks_adoptApi_doNothing() {
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(
+                BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString()).isEmpty();
+
+        when(mLeaProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID1);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.mBroadcastAssistantCallback.onSearchStarted(/* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSearchStartFailed(/* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSearchStopped(/* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSearchStopFailed(/* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSourceAddFailed(
+                mDevice1, mSource, /* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSourceRemoved(
+                mDevice1, /* sourceId= */ 1, /* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSourceRemoveFailed(
+                mDevice1, /* sourceId= */ 1, /* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSourceModified(
+                mDevice1, /* sourceId= */ 1, /* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSourceModifyFailed(
+                mDevice1, /* sourceId= */ 1, /* reason= */ 1);
+        mController.mBroadcastAssistantCallback.onSourceFound(mSource);
+        mController.mBroadcastAssistantCallback.onSourceLost(/* broadcastId= */ 1);
+        shadowOf(Looper.getMainLooper()).idle();
+        mController.mBroadcastAssistantCallback.onReceiveStateChanged(mDevice1, /* sourceId= */ 1,
+                mState);
+
+        // Above callbacks won't update summary.
+        assertThat(mPreference.getSummary().toString()).isEmpty();
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onProfileConnectionStateChanged_noDeviceInSharing_updateSummary() {
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID1);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        mPreference.setSummary("test");
+
+        mController.onProfileConnectionStateChanged(
+                mCachedDevice1,
+                BluetoothAdapter.STATE_DISCONNECTED,
+                BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString()).isEmpty();
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onFallbackDeviceChanged_updateSummary() {
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID1);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        mPreference.setSummary("test");
+
+        mContentObserver.onChange(true);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString())
+                .isEqualTo(
+                        mContext.getString(
+                                R.string.audio_sharing_call_audio_description, TEST_DEVICE_NAME1));
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onActiveDeviceChanged_updateSummary() {
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(mCachedDevice1.isActiveDevice(BluetoothProfile.LE_AUDIO)).thenReturn(true);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        mPreference.setSummary("test");
+
+        mController.onActiveDeviceChanged(mCachedDevice1, BluetoothProfile.LE_AUDIO);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString())
+                .isEqualTo(
+                        mContext.getString(
+                                R.string.audio_sharing_call_audio_description, TEST_DEVICE_NAME1));
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_fallbackDeviceInSharing_showCorrectSummary() {
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID1);
+        when(mCachedDevice3.isActiveDevice(BluetoothProfile.LE_AUDIO)).thenReturn(true);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices())
+                .thenReturn(ImmutableList.of(mDevice1, mDevice2, mDevice3));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString())
+                .isEqualTo(
+                        mContext.getString(
+                                R.string.audio_sharing_call_audio_description, TEST_DEVICE_NAME1));
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_activeDeviceInSharing_showCorrectSummary() {
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID2);
+        when(mCachedDevice1.isActiveDevice(BluetoothProfile.LE_AUDIO)).thenReturn(true);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1, mDevice2));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString())
+                .isEqualTo(mContext.getString(
+                        R.string.audio_sharing_call_audio_description, TEST_DEVICE_NAME1));
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_noFallbackDeviceOrActiveInSharing_showEmptySummary() {
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID2);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1, mDevice2));
+        when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString()).isEmpty();
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void displayPreference_noFallbackOrActiveDevice_showEmptySummary() {
+        Settings.Secure.putInt(
+                mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+        when(mBroadcast.isEnabled(any())).thenReturn(true);
+        when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+        assertThat(mPreference.getSummary().toString()).isEmpty();
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void displayPreference_clickToShowCorrectDialog() {
         AlertDialog latestAlertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
         if (latestAlertDialog != null) {
             latestAlertDialog.dismiss();
             ShadowAlertDialogCompat.reset();
         }
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID1);
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID1);
         mShadowBluetoothAdapter.setMostRecentlyConnectedDevices(
                 List.of(mDevice1, mDevice2, mDevice3));
         when(mBroadcast.isEnabled(any())).thenReturn(true);
@@ -497,7 +728,8 @@
 
         // Perform click to switch call audio device with API
         mSetFlagsRule.enableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API);
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID2);
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID2);
         index = listView.findIndexOfItemContainingText(TEST_DEVICE_NAME1);
         listView.performItemClick(index);
         shadowOf(Looper.getMainLooper()).idle();
@@ -548,9 +780,11 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void testBluetoothLeBroadcastAssistantCallbacks_updateSummary() {
         Settings.Secure.putInt(
-                mContentResolver, TEST_SETTINGS_KEY, BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+                mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
         mController.displayPreference(mScreen);
@@ -558,7 +792,8 @@
         assertThat(mPreference.getSummary().toString()).isEmpty();
 
         // onSourceAdded will update summary
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID1);
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID1);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1));
         when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
         mController.mBroadcastAssistantCallback.onSourceAdded(mDevice1, /* sourceId= */
@@ -571,16 +806,19 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void testBluetoothLeBroadcastAssistantCallbacks_doNothing() {
         Settings.Secure.putInt(
-                mContentResolver, TEST_SETTINGS_KEY, BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
+                mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                BluetoothCsipSetCoordinator.GROUP_ID_INVALID);
         when(mBroadcast.isEnabled(any())).thenReturn(true);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of());
         mController.displayPreference(mScreen);
         shadowOf(Looper.getMainLooper()).idle();
         assertThat(mPreference.getSummary().toString()).isEmpty();
 
-        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID1);
+        Settings.Secure.putInt(mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+                TEST_DEVICE_GROUP_ID1);
         when(mAssistant.getAllConnectedDevices()).thenReturn(ImmutableList.of(mDevice1));
         when(mAssistant.getAllSources(any())).thenReturn(ImmutableList.of(mState));
         mController.mBroadcastAssistantCallback.onSearchStarted(/* reason= */ 1);
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupControllerTest.java
index a739bb3..6ca0306 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumeGroupControllerTest.java
@@ -23,6 +23,7 @@
 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;
@@ -42,6 +43,8 @@
 import android.database.ContentObserver;
 import android.media.AudioManager;
 import android.os.Looper;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
 import android.platform.test.flag.junit.SetFlagsRule;
 import android.provider.Settings;
 
@@ -60,6 +63,7 @@
 import com.android.settingslib.bluetooth.BluetoothUtils;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
 import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
+import com.android.settingslib.bluetooth.LeAudioProfile;
 import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
 import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcastAssistant;
 import com.android.settingslib.bluetooth.LocalBluetoothManager;
@@ -196,8 +200,8 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStart_flagOff_doNothing() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.onStart(mLifecycleOwner);
         verify(mAssistant, never())
                 .registerServiceCallBack(
@@ -214,8 +218,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStart_flagOn_registerCallbacks() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.onStart(mLifecycleOwner);
         verify(mAssistant)
                 .registerServiceCallBack(
@@ -229,8 +233,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onAudioSharingProfilesConnected_flagOn_registerCallbacks() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.onAudioSharingProfilesConnected();
         verify(mAssistant)
                 .registerServiceCallBack(
@@ -247,8 +251,8 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStop_flagOff_doNothing() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.onStop(mLifecycleOwner);
         verify(mAssistant, never())
                 .unregisterServiceCallBack(any(BluetoothLeBroadcastAssistant.Callback.class));
@@ -259,8 +263,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStop_flagOn_callbacksNotRegistered_doNothing() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(false);
         mController.onStop(mLifecycleOwner);
         verify(mAssistant, never())
@@ -272,8 +276,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void onStop_flagOn_callbacksRegistered_unregisterCallbacks() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(true);
         mController.onStop(mLifecycleOwner);
         verify(mAssistant)
@@ -284,16 +288,16 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void displayPreference_flagOff_doNothing() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.displayPreference(mScreen);
         assertThat(mPreferenceGroup.isVisible()).isFalse();
         verify(mDeviceUpdater, never()).forceUpdate();
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void displayPreference_flagOn_updateDeviceList() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.displayPreference(mScreen);
         assertThat(mPreferenceGroup.isVisible()).isFalse();
         verify(mDeviceUpdater).forceUpdate();
@@ -316,6 +320,24 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onDeviceAdded_adoptApi_rankFallbackDeviceOnTop() {
+        LeAudioProfile leAudioProfile = mock(LeAudioProfile.class);
+        when(leAudioProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID2);
+        when(mProfileManager.getLeAudioProfile()).thenReturn(leAudioProfile);
+        when(mPreference1.getProgress()).thenReturn(TEST_VOLUME_VALUE);
+        when(mPreference2.getProgress()).thenReturn(TEST_VOLUME_VALUE);
+        mController.setPreferenceGroup(mPreferenceGroup);
+        mController.onDeviceAdded(mPreference1);
+        mController.onDeviceAdded(mPreference2);
+        shadowOf(Looper.getMainLooper()).idle();
+
+        verify(mPreference1).setOrder(1);
+        verify(mPreference2).setOrder(0);
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void onDeviceAdded_rankFallbackDeviceOnTop() {
         Settings.Secure.putInt(
                 mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
@@ -374,8 +396,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_emptyPreferenceGroup_doNothing() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(true);
         mController.updateVisibility();
         shadowOf(Looper.getMainLooper()).idle();
@@ -384,8 +406,8 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_flagOff_setVisibleToFalse() {
-        mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(true);
         mPreferenceGroup.addPreference(mPreference1);
         when(mBroadcast.isEnabled(null)).thenReturn(true);
@@ -399,8 +421,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_notEmptyPreferenceGroup_noSharing_setVisibleToFalse() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(true);
         mPreferenceGroup.addPreference(mPreference1);
         when(mBroadcast.isEnabled(null)).thenReturn(false);
@@ -414,8 +436,8 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING)
     public void updateVisibility_notEmptyPreferenceGroup_isSharing_setVisibleToTrue() {
-        mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
         mController.setCallbacksRegistered(true);
         mPreferenceGroup.addPreference(mPreference1);
         when(mBroadcast.isEnabled(null)).thenReturn(true);
@@ -429,6 +451,29 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void settingsObserverOnChange_adoptApi_updatePreferenceOrder() {
+        LeAudioProfile leAudioProfile = mock(LeAudioProfile.class);
+        when(leAudioProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID2);
+        when(mProfileManager.getLeAudioProfile()).thenReturn(leAudioProfile);
+        when(mPreference1.getProgress()).thenReturn(TEST_VOLUME_VALUE);
+        when(mPreference2.getProgress()).thenReturn(TEST_VOLUME_VALUE);
+        mController.setPreferenceGroup(mPreferenceGroup);
+        mController.onDeviceAdded(mPreference1);
+        mController.onDeviceAdded(mPreference2);
+        shadowOf(Looper.getMainLooper()).idle();
+
+
+        when(leAudioProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID1);
+        mContentObserver.onChange(true);
+        shadowOf(Looper.getMainLooper()).idle();
+
+        verify(mPreference1).setOrder(0);
+        verify(mPreference2).setOrder(1);
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void settingsObserverOnChange_updatePreferenceOrder() {
         Settings.Secure.putInt(
                 mContentResolver, BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreferenceTest.java b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreferenceTest.java
index 5ff143f..c84d7f8 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreferenceTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingDeviceVolumePreferenceTest.java
@@ -31,6 +31,9 @@
 import android.bluetooth.BluetoothDevice;
 import android.content.Context;
 import android.media.AudioManager;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
+import android.platform.test.flag.junit.SetFlagsRule;
 import android.provider.Settings;
 import android.widget.SeekBar;
 
@@ -41,9 +44,11 @@
 import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
 import com.android.settingslib.bluetooth.BluetoothUtils;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.LeAudioProfile;
 import com.android.settingslib.bluetooth.LocalBluetoothManager;
 import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
 import com.android.settingslib.bluetooth.VolumeControlProfile;
+import com.android.settingslib.flags.Flags;
 
 import org.junit.Before;
 import org.junit.Rule;
@@ -64,9 +69,11 @@
     private static final int TEST_MIN_STREAM_VALUE = 0;
 
     @Rule public final MockitoRule mMockitoRule = MockitoJUnit.rule();
+    @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
 
     @Mock private LocalBluetoothManager mLocalBtManager;
     @Mock private LocalBluetoothProfileManager mLocalBtProfileManager;
+    @Mock private LeAudioProfile mLeAudioProfile;
     @Mock private VolumeControlProfile mVolumeControl;
     @Mock private CachedBluetoothDevice mCachedDevice;
     @Mock private BluetoothDevice mDevice;
@@ -84,6 +91,7 @@
         mFeatureFactory = FakeFeatureFactory.setupForTest();
         when(mLocalBtManager.getProfileManager()).thenReturn(mLocalBtProfileManager);
         when(mLocalBtProfileManager.getVolumeControlProfile()).thenReturn(mVolumeControl);
+        when(mLocalBtProfileManager.getLeAudioProfile()).thenReturn(mLeAudioProfile);
         when(mContext.getSystemService(AudioManager.class)).thenReturn(mAudioManager);
         when(mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC))
                 .thenReturn(TEST_MAX_STREAM_VALUE);
@@ -161,6 +169,70 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onStopTrackingTouch_adoptApi_fallbackDevice_setDeviceVolume() {
+        when(mLeAudioProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID);
+        mPreference.onStopTrackingTouch(mSeekBar);
+
+        verifyNoInteractions(mVolumeControl);
+        verify(mAudioManager)
+                .setStreamVolume(AudioManager.STREAM_MUSIC, TEST_MAX_STREAM_VALUE, /* flags= */ 0);
+        verify(mFeatureFactory.metricsFeatureProvider)
+                .action(
+                        mContext,
+                        SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME,
+                        /* isPrimary= */ true);
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onProgressChanged_adoptApi_fallbackDevice_fromUserNotInTouch_setDeviceVolume() {
+        when(mLeAudioProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID);
+        mPreference.onProgressChanged(mSeekBar, TEST_VOLUME_VALUE, /* fromUser= */ true);
+
+        verifyNoInteractions(mVolumeControl);
+        verify(mAudioManager)
+                .setStreamVolume(AudioManager.STREAM_MUSIC, TEST_MAX_STREAM_VALUE, /* flags= */ 0);
+        verify(mFeatureFactory.metricsFeatureProvider)
+                .action(
+                        mContext,
+                        SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME,
+                        /* isPrimary= */ true);
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onProgressChanged_adoptApi_fallbackDevice_fromUserInTouch_doNothing() {
+        when(mLeAudioProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID);
+        mPreference.onStartTrackingTouch(mSeekBar);
+        mPreference.onProgressChanged(mSeekBar, TEST_VOLUME_VALUE, /* fromUser= */ true);
+
+        verifyNoInteractions(mVolumeControl);
+        verifyNoInteractions(mAudioManager);
+        verify(mFeatureFactory.metricsFeatureProvider, never())
+                .action(
+                        any(Context.class),
+                        eq(SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME),
+                        anyBoolean());
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
+    public void onProgressChanged_adoptApi_fallbackDevice_notFromUserNotInTouch_doNothing() {
+        when(mLeAudioProfile.getBroadcastToUnicastFallbackGroup()).thenReturn(TEST_DEVICE_GROUP_ID);
+        mPreference.onProgressChanged(mSeekBar, TEST_VOLUME_VALUE, /* fromUser= */ false);
+
+        verifyNoInteractions(mVolumeControl);
+        verifyNoInteractions(mAudioManager);
+        verify(mFeatureFactory.metricsFeatureProvider, never())
+                .action(
+                        any(Context.class),
+                        eq(SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME),
+                        anyBoolean());
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void onStopTrackingTouch_fallbackDevice_setDeviceVolume() {
         Settings.Secure.putInt(
                 mContext.getContentResolver(),
@@ -179,6 +251,7 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void onProgressChanged_fallbackDevice_fromUserNotInTouch_setDeviceVolume() {
         Settings.Secure.putInt(
                 mContext.getContentResolver(),
@@ -197,6 +270,7 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void onProgressChanged_fallbackDevice_fromUserInTouch_doNothing() {
         Settings.Secure.putInt(
                 mContext.getContentResolver(),
@@ -215,6 +289,7 @@
     }
 
     @Test
+    @DisableFlags(Flags.FLAG_ADOPT_PRIMARY_GROUP_MANAGEMENT_API_V2)
     public void onProgressChanged_fallbackDevice_notFromUserNotInTouch_doNothing() {
         Settings.Secure.putInt(
                 mContext.getContentResolver(),
diff --git a/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateDetailsFragmentTest.java b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateDetailsFragmentTest.java
index d1c32a2..6fce9a8 100644
--- a/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateDetailsFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateDetailsFragmentTest.java
@@ -39,7 +39,6 @@
 
 import com.android.settings.R;
 import com.android.settingslib.core.AbstractPreferenceController;
-import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -144,16 +143,15 @@
     }
 
     private void enableDeviceStateSettableRotationStates(String[] settableStates,
-            String[] settableStatesDescriptions) {
+                                                         String[] settableStatesDescriptions) {
         when(mResources.getStringArray(
                 com.android.internal.R.array.config_perDeviceStateRotationLockDefaults)).thenReturn(
                 settableStates);
         when(mResources.getStringArray(
                 R.array.config_settableAutoRotationDeviceStatesDescriptions)).thenReturn(
                 settableStatesDescriptions);
-        DeviceStateRotationLockSettingsManager.resetInstance();
-        DeviceStateRotationLockSettingsManager.getInstance(mContext)
-                .resetStateForTesting(mResources);
+        DeviceStateAutoRotateSettingManagerProvider.resetInstance();
+        when(mContext.getResources()).thenReturn(mResources);
     }
 
     // Sets up posture mappings for PosturesHelper
diff --git a/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateOverviewControllerTest.java b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateOverviewControllerTest.java
index a5416e7..4c2c694 100644
--- a/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateOverviewControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateOverviewControllerTest.java
@@ -18,30 +18,48 @@
 
 import static com.android.settings.core.BasePreferenceController.AVAILABLE;
 import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE;
+import static com.android.settings.testutils.DeviceStateAutoRotateSettingTestUtils.setDeviceStateRotationLockEnabled;
 
 import static com.google.common.truth.Truth.assertThat;
 
-import com.android.settings.testutils.shadow.ShadowDeviceStateRotationLockSettingsManager;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.content.res.Resources;
+
 import com.android.settings.testutils.shadow.ShadowRotationPolicy;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
 @RunWith(RobolectricTestRunner.class)
-@Config(shadows = {ShadowRotationPolicy.class, ShadowDeviceStateRotationLockSettingsManager.class})
+@Config(shadows = {ShadowRotationPolicy.class})
 public class DeviceStateAutoRotateOverviewControllerTest {
+    @Mock
+    private Resources mResources;
+    private DeviceStateAutoRotateOverviewController mController;
 
-    private final DeviceStateAutoRotateOverviewController mController =
-            new DeviceStateAutoRotateOverviewController(
-                    RuntimeEnvironment.application, "device_state_auto_rotate");
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        Context context = Mockito.spy(RuntimeEnvironment.application);
+        when(context.getResources()).thenReturn(mResources);
+
+        mController = new DeviceStateAutoRotateOverviewController(
+                context, "device_state_auto_rotate");
+    }
 
     @Test
     public void getAvailabilityStatus_rotationAndDeviceStateRotationEnabled_returnsAvailable() {
         ShadowRotationPolicy.setRotationSupported(true);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
 
         int availability = mController.getAvailabilityStatus();
 
@@ -51,7 +69,7 @@
     @Test
     public void getAvailabilityStatus_rotationNotSupported_returnsUnsupportedOnDevice() {
         ShadowRotationPolicy.setRotationSupported(false);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
 
         int availability = mController.getAvailabilityStatus();
 
@@ -61,7 +79,7 @@
     @Test
     public void getAvailabilityStatus_deviceStateRotationNotSupported_returnsUnsupportedOnDevice() {
         ShadowRotationPolicy.setRotationSupported(true);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(false);
+        setDeviceStateRotationLockEnabled(false, mResources);
 
         int availability = mController.getAvailabilityStatus();
 
diff --git a/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateSettingControllerTest.java b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateSettingControllerTest.java
index cb1be85..63a4af2 100644
--- a/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateSettingControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateSettingControllerTest.java
@@ -18,14 +18,17 @@
 
 import static com.android.settings.core.BasePreferenceController.AVAILABLE;
 import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE;
+import static com.android.settings.testutils.DeviceStateAutoRotateSettingTestUtils.setDeviceStateRotationLockEnabled;
 
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import android.app.settings.SettingsEnums;
 import android.content.Context;
+import android.content.res.Resources;
 import android.hardware.devicestate.DeviceState;
 import android.hardware.devicestate.DeviceStateManager;
 
@@ -34,10 +37,9 @@
 import androidx.preference.PreferenceScreen;
 
 import com.android.settings.R;
-import com.android.settings.testutils.shadow.ShadowDeviceStateRotationLockSettingsManager;
 import com.android.settings.testutils.shadow.ShadowRotationPolicy;
 import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
-import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
+import com.android.settingslib.devicestate.DeviceStateAutoRotateSettingManager;
 import com.android.settingslib.search.SearchIndexableRaw;
 
 import org.junit.Before;
@@ -54,10 +56,7 @@
 import java.util.List;
 
 @RunWith(RobolectricTestRunner.class)
-@Config(shadows = {
-        ShadowRotationPolicy.class,
-        ShadowDeviceStateRotationLockSettingsManager.class
-})
+@Config(shadows = {ShadowRotationPolicy.class})
 public class DeviceStateAutoRotateSettingControllerTest {
 
     private static final DeviceState DEFAULT_DEVICE_STATE = new DeviceState(
@@ -66,10 +65,11 @@
     private static final int DEFAULT_ORDER = -10;
 
     private final Context mContext = Mockito.spy(RuntimeEnvironment.application);
-    private DeviceStateRotationLockSettingsManager mAutoRotateSettingsManager;
+    private DeviceStateAutoRotateSettingManager mAutoRotateSettingsManager;
 
     @Mock private MetricsFeatureProvider mMetricsFeatureProvider;
     @Mock private DeviceStateManager mDeviceStateManager;
+    @Mock private Resources mResources;
 
     private DeviceStateAutoRotateSettingController mController;
 
@@ -78,11 +78,14 @@
         MockitoAnnotations.initMocks(this);
 
         doReturn(mContext).when(mContext).getApplicationContext();
+        when(mContext.getResources()).thenReturn(mResources);
         doReturn(mDeviceStateManager).when(mContext).getSystemService(DeviceStateManager.class);
         doReturn(List.of(DEFAULT_DEVICE_STATE)).when(
                 mDeviceStateManager).getSupportedDeviceStates();
+        setDeviceStateRotationLockEnabled(false, mResources);
         mAutoRotateSettingsManager =
-                DeviceStateRotationLockSettingsManager.getInstance(mContext);
+                DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(mContext);
+
         mController = new DeviceStateAutoRotateSettingController(
                 mContext,
                 DEFAULT_DEVICE_STATE.getIdentifier(),
@@ -108,7 +111,7 @@
     @Test
     public void getAvailabilityStatus_rotationAndDeviceStateRotationEnabled_returnsAvailable() {
         ShadowRotationPolicy.setRotationSupported(true);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
 
         int availability = mController.getAvailabilityStatus();
 
@@ -118,7 +121,7 @@
     @Test
     public void getAvailabilityStatus_deviceStateRotationDisabled_returnsUnsupported() {
         ShadowRotationPolicy.setRotationSupported(true);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(false);
+        setDeviceStateRotationLockEnabled(false, mResources);
 
         int availability = mController.getAvailabilityStatus();
 
@@ -128,7 +131,7 @@
     @Test
     public void getAvailabilityStatus_rotationDisabled_returnsUnsupported() {
         ShadowRotationPolicy.setRotationSupported(false);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
 
         int availability = mController.getAvailabilityStatus();
 
diff --git a/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateSettingManagerProviderTest.kt b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateSettingManagerProviderTest.kt
new file mode 100644
index 0000000..f2e59c5
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/display/DeviceStateAutoRotateSettingManagerProviderTest.kt
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2025 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.display;
+
+import android.content.Context
+import android.content.res.Resources
+import android.hardware.devicestate.DeviceStateManager
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
+import android.platform.test.flag.junit.SetFlagsRule
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.internal.R
+import com.android.settingslib.devicestate.DeviceStateAutoRotateSettingManagerImpl
+import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager
+import com.android.window.flags.Flags
+import com.google.common.truth.Truth.assertThat
+import org.junit.After
+import org.junit.Before
+import org.junit.Assert.assertNotSame
+import org.junit.Assert.assertSame
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mock
+import org.mockito.junit.MockitoJUnit
+import org.mockito.Mockito.`when` as whenever
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class DeviceStateAutoRotateSettingManagerProviderTest {
+
+    @get:Rule
+    val setFlagsRule: SetFlagsRule = SetFlagsRule()
+    @get:Rule
+    val rule = MockitoJUnit.rule()
+
+    @Mock
+    private lateinit var mockContext: Context
+    @Mock
+    private lateinit var mockDeviceStateManager: DeviceStateManager
+    @Mock
+    private lateinit var mockResources: Resources
+
+    private val context: Context = ApplicationProvider.getApplicationContext()
+
+    @Before
+    fun setup() {
+        whenever(mockContext.contentResolver).thenReturn(context.contentResolver)
+        whenever(mockContext.getSystemService(DeviceStateManager::class.java)).thenReturn(
+            mockDeviceStateManager
+        )
+        whenever(mockContext.resources).thenReturn(mockResources)
+        whenever(mockResources.getStringArray(R.array.config_perDeviceStateRotationLockDefaults))
+            .thenReturn(arrayOf())
+    }
+
+    @After
+    fun tearDown() {
+        DeviceStateAutoRotateSettingManagerProvider.resetInstance()
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_DEVICE_STATE_AUTO_ROTATE_SETTING_REFACTOR)
+    fun getSingletonInstance_refactorFlagEnabled_returnsRefactoredManager() {
+        val manager = DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(mockContext)
+
+        assertThat(manager).isInstanceOf(DeviceStateAutoRotateSettingManagerImpl::class.java)
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ENABLE_DEVICE_STATE_AUTO_ROTATE_SETTING_REFACTOR)
+    fun getSingletonInstance_refactorFlagDisabled_returnsLegacyManager() {
+        val manager = DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(mockContext)
+
+        assertThat(manager).isInstanceOf(DeviceStateRotationLockSettingsManager::class.java)
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_DEVICE_STATE_AUTO_ROTATE_SETTING_REFACTOR)
+    fun getSingletonInstance_resetInstance_returnsNewInstance() {
+        val manager1 = DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(mockContext)
+        DeviceStateAutoRotateSettingManagerProvider.resetInstance()
+        val manager2 = DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(mockContext)
+
+        assertNotSame(manager1, manager2)
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_DEVICE_STATE_AUTO_ROTATE_SETTING_REFACTOR)
+    fun getSingletonInstance_getInstanceTwice_returnsSameInstance() {
+        val manager1 = DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(mockContext)
+        val manager2 = DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(mockContext)
+
+        assertSame(manager1, manager2)
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/display/SmartAutoRotateControllerTest.java b/tests/robotests/src/com/android/settings/display/SmartAutoRotateControllerTest.java
index e2542b0..a1eb89c 100644
--- a/tests/robotests/src/com/android/settings/display/SmartAutoRotateControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/SmartAutoRotateControllerTest.java
@@ -19,6 +19,7 @@
 import static com.android.settings.core.BasePreferenceController.AVAILABLE;
 import static com.android.settings.core.BasePreferenceController.DISABLED_DEPENDENT_SETTING;
 import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE;
+import static com.android.settings.testutils.DeviceStateAutoRotateSettingTestUtils.setDeviceStateRotationLockEnabled;
 
 import static com.google.common.truth.Truth.assertThat;
 
@@ -33,6 +34,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
+import android.content.res.Resources;
 import android.hardware.devicestate.DeviceState;
 import android.hardware.devicestate.DeviceStateManager;
 import android.os.UserHandle;
@@ -41,11 +43,11 @@
 import androidx.preference.Preference;
 
 import com.android.settings.testutils.ResolveInfoBuilder;
-import com.android.settings.testutils.shadow.ShadowDeviceStateRotationLockSettingsManager;
+import com.android.settings.testutils.shadow.ShadowDeviceStateAutoRotateSettingManager;
 import com.android.settings.testutils.shadow.ShadowRotationPolicy;
 import com.android.settings.testutils.shadow.ShadowSensorPrivacyManager;
 import com.android.settings.testutils.shadow.ShadowSystemSettings;
-import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
+import com.android.settingslib.devicestate.DeviceStateAutoRotateSettingManager;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -73,17 +75,21 @@
     private Preference mPreference;
     @Mock
     private DeviceStateManager mDeviceStateManager;
+    @Mock
+    private Resources mResources;
     private ContentResolver mContentResolver;
-    private DeviceStateRotationLockSettingsManager mDeviceStateAutoRotateSettingsManager;
+    private DeviceStateAutoRotateSettingManager mDeviceStateAutoRotateSettingManager;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         final Context context = Mockito.spy(RuntimeEnvironment.application);
         mContentResolver = RuntimeEnvironment.application.getContentResolver();
+        mResources = Mockito.spy(RuntimeEnvironment.application.getResources());
 
         when(context.getPackageManager()).thenReturn(mPackageManager);
         when(context.getContentResolver()).thenReturn(mContentResolver);
+        when(context.getResources()).thenReturn(mResources);
         doReturn(PACKAGE_NAME).when(mPackageManager).getRotationResolverPackageName();
         doReturn(PackageManager.PERMISSION_GRANTED).when(mPackageManager).checkPermission(
                 Manifest.permission.CAMERA, PACKAGE_NAME);
@@ -91,8 +97,9 @@
         doReturn(context).when(context).getApplicationContext();
         doReturn(mDeviceStateManager).when(context).getSystemService(DeviceStateManager.class);
         doReturn(getDeviceStateList()).when(mDeviceStateManager).getSupportedDeviceStates();
-        mDeviceStateAutoRotateSettingsManager = DeviceStateRotationLockSettingsManager.getInstance(
-                context);
+        setDeviceStateRotationLockEnabled(false, mResources);
+        mDeviceStateAutoRotateSettingManager =
+                DeviceStateAutoRotateSettingManagerProvider.getSingletonInstance(context);
         mController = Mockito.spy(new SmartAutoRotateController(context, "test_key"));
 
         when(mController.isCameraLocked()).thenReturn(false);
@@ -144,7 +151,7 @@
 
     @Test
     @Config(shadows = {
-            ShadowDeviceStateRotationLockSettingsManager.class,
+            ShadowDeviceStateAutoRotateSettingManager.class,
             ShadowRotationPolicy.class
     })
     public void getAvailabilityStatus_deviceStateRotationLocked_returnDisableDependentSetting() {
@@ -158,7 +165,7 @@
 
     @Test
     @Config(shadows = {
-            ShadowDeviceStateRotationLockSettingsManager.class,
+            ShadowDeviceStateAutoRotateSettingManager.class,
             ShadowRotationPolicy.class
     })
     public void getAvailabilityStatus_deviceStateRotationUnlocked_returnAvailable() {
@@ -182,18 +189,18 @@
 
     private void enableDeviceStateRotation() {
         ShadowRotationPolicy.setRotationSupported(true);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
     }
 
     private void lockDeviceStateRotation() {
-        ShadowDeviceStateRotationLockSettingsManager shadowManager =
-                Shadow.extract(mDeviceStateAutoRotateSettingsManager);
+        ShadowDeviceStateAutoRotateSettingManager shadowManager =
+                Shadow.extract(mDeviceStateAutoRotateSettingManager);
         shadowManager.setRotationLockedForAllStates(true);
     }
 
     private void unlockDeviceStateRotation() {
-        ShadowDeviceStateRotationLockSettingsManager shadowManager =
-                Shadow.extract(mDeviceStateAutoRotateSettingsManager);
+        ShadowDeviceStateAutoRotateSettingManager shadowManager =
+                Shadow.extract(mDeviceStateAutoRotateSettingManager);
         shadowManager.setRotationLockedForAllStates(false);
     }
 
diff --git a/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java
index 9f1b5d4..1fb4703 100644
--- a/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java
@@ -18,6 +18,8 @@
 
 import static android.provider.Settings.Secure.CAMERA_AUTOROTATE;
 
+import static com.android.settings.testutils.DeviceStateAutoRotateSettingTestUtils.setDeviceStateRotationLockEnabled;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
@@ -40,7 +42,6 @@
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.testutils.FakeFeatureFactory;
 import com.android.settings.testutils.ResolveInfoBuilder;
-import com.android.settings.testutils.shadow.ShadowDeviceStateRotationLockSettingsManager;
 import com.android.settings.testutils.shadow.ShadowSensorPrivacyManager;
 import com.android.settings.testutils.shadow.ShadowSystemSettings;
 
@@ -57,8 +58,7 @@
 @RunWith(RobolectricTestRunner.class)
 @Config(shadows = {
         ShadowSystemSettings.class,
-        ShadowSensorPrivacyManager.class,
-        ShadowDeviceStateRotationLockSettingsManager.class
+        ShadowSensorPrivacyManager.class
 })
 public class SmartAutoRotatePreferenceControllerTest {
 
@@ -104,7 +104,7 @@
                 new SmartAutoRotatePreferenceController(mContext, "smart_auto_rotate"));
         when(mController.isCameraLocked()).thenReturn(false);
         when(mController.isPowerSaveMode()).thenReturn(false);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(false);
+        setDeviceStateRotationLockEnabled(false, mResources);
     }
 
     @Test
@@ -213,7 +213,7 @@
     @Test
     public void getAvailabilityStatus_deviceStateRotationEnabled_returnsUnsupported() {
         enableAutoRotationPreference();
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
                 BasePreferenceController.UNSUPPORTED_ON_DEVICE);
diff --git a/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceFragmentTest.java
index 1615538..731cffb 100644
--- a/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceFragmentTest.java
@@ -27,6 +27,7 @@
 
 import static com.android.settings.display.SmartAutoRotatePreferenceFragment.AUTO_ROTATE_MAIN_SWITCH_PREFERENCE_KEY;
 import static com.android.settings.display.SmartAutoRotatePreferenceFragment.AUTO_ROTATE_SWITCH_PREFERENCE_KEY;
+import static com.android.settings.testutils.DeviceStateAutoRotateSettingTestUtils.setDeviceStateRotationLockEnabled;
 
 import static com.google.common.truth.Truth.assertThat;
 
@@ -55,10 +56,8 @@
 import com.android.settings.R;
 import com.android.settings.SettingsActivity;
 import com.android.settings.testutils.ResolveInfoBuilder;
-import com.android.settings.testutils.shadow.ShadowDeviceStateRotationLockSettingsManager;
 import com.android.settings.testutils.shadow.ShadowRotationPolicy;
 import com.android.settingslib.core.AbstractPreferenceController;
-import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -75,7 +74,6 @@
 @RunWith(RobolectricTestRunner.class)
 @Config(shadows = {
         com.android.settings.testutils.shadow.ShadowFragment.class,
-        ShadowDeviceStateRotationLockSettingsManager.class,
         ShadowRotationPolicy.class
 })
 public class SmartAutoRotatePreferenceFragmentTest {
@@ -174,7 +172,7 @@
 
     @Test
     public void createHeader_faceDetectionSupported_switchBarIsEnabled() {
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(false);
+        setDeviceStateRotationLockEnabled(false, mResources);
         mFragment.createHeader(mActivity);
 
         verify(mRotateMainSwitchPreference, never()).setVisible(false);
@@ -184,7 +182,7 @@
     @Test
     public void createHeader_deviceStateRotationSupported_switchBarIsDisabled() {
         ShadowRotationPolicy.setRotationSupported(true);
-        ShadowDeviceStateRotationLockSettingsManager.setDeviceStateRotationLockEnabled(true);
+        setDeviceStateRotationLockEnabled(true, mResources);
 
         mFragment.createHeader(mActivity);
 
@@ -258,15 +256,14 @@
     private void enableDeviceStateSettableRotationStates(
             String[] settableStates, String[] settableStatesDescriptions) {
         when(mResources.getStringArray(
-                        com.android.internal.R.array.config_perDeviceStateRotationLockDefaults))
+                com.android.internal.R.array.config_perDeviceStateRotationLockDefaults))
                 .thenReturn(settableStates);
         when(mResources.getStringArray(R.array.config_settableAutoRotationDeviceStatesDescriptions))
                 .thenReturn(settableStatesDescriptions);
         when(mResources.getBoolean(R.bool.config_auto_rotate_face_detection_available))
                 .thenReturn(true);
-        DeviceStateRotationLockSettingsManager.resetInstance();
-        DeviceStateRotationLockSettingsManager.getInstance(mContext)
-                .resetStateForTesting(mResources);
+        DeviceStateAutoRotateSettingManagerProvider.resetInstance();
+        when(mContext.getResources()).thenReturn(mResources);
     }
 
     // Sets up posture mappings for PosturesHelper
diff --git a/tests/robotests/src/com/android/settings/localepicker/LocaleListEditorTest.java b/tests/robotests/src/com/android/settings/localepicker/LocaleListEditorTest.java
index 22d39e3..5f5b8f6 100644
--- a/tests/robotests/src/com/android/settings/localepicker/LocaleListEditorTest.java
+++ b/tests/robotests/src/com/android/settings/localepicker/LocaleListEditorTest.java
@@ -275,6 +275,7 @@
     public void showConfirmDialog_systemLocaleSelected_shouldShowLocaleChangeDialog()
             throws Exception {
         //pre-condition
+        Locale.setDefault(Locale.forLanguageTag("zh-TW"));
         setUpLocaleConditions(true);
         final Configuration config = new Configuration();
         config.setLocales((LocaleList.forLanguageTags("zh-TW,en-US")));
@@ -379,6 +380,7 @@
     @Test
     public void onTouch_dragDifferentLocaleToTop_showConfirmDialog() throws Exception {
         MotionEvent event = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_UP, 0.0f, 0.0f, 0);
+        Locale.setDefault(Locale.forLanguageTag("zh-TW"));
         setUpLocaleConditions(true);
         final Configuration config = new Configuration();
         config.setLocales((LocaleList.forLanguageTags("zh-TW,en-US")));
diff --git a/tests/robotests/src/com/android/settings/network/AdaptiveConnectivityScreenTest.kt b/tests/robotests/src/com/android/settings/network/AdaptiveConnectivityScreenTest.kt
index 2b3173a..53f37c9 100644
--- a/tests/robotests/src/com/android/settings/network/AdaptiveConnectivityScreenTest.kt
+++ b/tests/robotests/src/com/android/settings/network/AdaptiveConnectivityScreenTest.kt
@@ -16,11 +16,18 @@
 
 package com.android.settings.network
 
+import android.content.Context
+import android.platform.test.annotations.EnableFlags
+import android.provider.Settings
+import android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED
+import android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED
+import android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED
+import androidx.fragment.app.testing.launchFragmentInContainer
 import androidx.preference.SwitchPreferenceCompat
+import androidx.test.core.app.ApplicationProvider
 import androidx.test.ext.junit.runners.AndroidJUnit4
 import com.android.settings.flags.Flags
-import com.android.settings.network.AdaptiveConnectivitySettings.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED
-import com.android.settings.network.AdaptiveConnectivitySettings.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED
+import com.android.settingslib.metadata.PreferenceHierarchy
 import com.android.settingslib.preference.CatalystScreenTestCase
 import com.google.common.truth.Truth.assertThat
 import org.junit.Test
@@ -28,11 +35,12 @@
 
 @Suppress("DEPRECATION")
 @RunWith(AndroidJUnit4::class)
-class AdaptiveConnectivityScreenTest : CatalystScreenTestCase() {
+class AdaptiveConnectivityScreenTest() : CatalystScreenTestCase() {
     override val preferenceScreenCreator = AdaptiveConnectivityScreen()
     override val flagName
         get() = Flags.FLAG_CATALYST_ADAPTIVE_CONNECTIVITY
-
+    private lateinit var fragment: AdaptiveConnectivitySettings
+    private val mContext: Context = ApplicationProvider.getApplicationContext()
     override fun migration() {}
 
     @Test
@@ -41,21 +49,121 @@
     }
 
     @Test
-    fun flagDefaultDisabled_noSwitchPreferenceCompatExists() {
-        // create fragment
-        val fragment: AdaptiveConnectivitySettings =
-            preferenceScreenCreator.fragmentClass().newInstance()
-        // check if switch preference exists
-        assertSwitchPreferenceCompatIsNull(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED, fragment)
-        assertSwitchPreferenceCompatIsNull(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED, fragment)
+    fun getPreferenceHierarchy_returnsHierarchy() {
+        val hierarchy: PreferenceHierarchy =
+            preferenceScreenCreator.getPreferenceHierarchy(mContext)
+        (appContext)
+        assertThat(hierarchy.find(ADAPTIVE_CONNECTIVITY_ENABLED)).isNotNull()
+        assertThat(hierarchy.find(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED)).isNull()
+        assertThat(hierarchy.find(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED)).isNull()
     }
 
-    private fun assertSwitchPreferenceCompatIsNull(
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_NESTED_TOGGLE_SWITCHES)
+    fun getPreferenceHierarchy_flagEnabled_returnsHierarchyWithNestedToggle() {
+        val hierarchy: PreferenceHierarchy =
+            preferenceScreenCreator.getPreferenceHierarchy(mContext)
+        (appContext)
+        assertThat(hierarchy.find(ADAPTIVE_CONNECTIVITY_ENABLED)).isNotNull()
+        assertThat(hierarchy.find(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED)).isNotNull()
+        assertThat(hierarchy.find(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED)).isNotNull()
+
+    }
+
+    @Test
+    fun flagDefaultDisabled_noSwitchPreferenceCompatExists() {
+        val scenario = launchFragmentInContainer<AdaptiveConnectivitySettings>()
+        scenario.onFragment { fragment ->
+            this.fragment = fragment
+            assertSwitchPreferenceCompatVisibility(
+                ADAPTIVE_CONNECTIVITY_WIFI_ENABLED, fragment,
+                false
+            )
+            assertSwitchPreferenceCompatVisibility(
+                ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED,
+                fragment,
+                false
+            )
+        }
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_NESTED_TOGGLE_SWITCHES)
+    fun flagEnabled_switchPreferenceCompatExists() {
+        val scenario = launchFragmentInContainer<AdaptiveConnectivitySettings>()
+        scenario.onFragment { fragment ->
+            this.fragment = fragment
+            assertSwitchPreferenceCompatVisibility(
+                ADAPTIVE_CONNECTIVITY_WIFI_ENABLED, fragment,
+                true
+            )
+            assertSwitchPreferenceCompatVisibility(
+                ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED,
+                fragment,
+                true
+            )
+        }
+    }
+
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_NESTED_TOGGLE_SWITCHES)
+    fun flagEnabled_onWifiScorerSwitchClick_shouldUpdateSetting() {
+        val scenario = launchFragmentInContainer<AdaptiveConnectivitySettings>()
+        scenario.onFragment { fragment: AdaptiveConnectivitySettings ->
+            this.fragment = fragment
+            val switchPreference =
+                fragment.findPreference<SwitchPreferenceCompat>(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED)
+            assertThat(switchPreference?.isChecked).isTrue()
+            switchPreference?.performClick()
+            assertThat(switchPreference?.isChecked).isFalse()
+            assertThat(updateSetting(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED)).isFalse()
+            switchPreference?.performClick()
+            assertThat(switchPreference?.isChecked).isTrue()
+            assertThat(updateSetting(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED)).isTrue()
+        }
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_NESTED_TOGGLE_SWITCHES)
+    fun flagEnabled_onAdaptiveMobileNetworkSwitchClick_shouldUpdateSetting() {
+        val scenario = launchFragmentInContainer<AdaptiveConnectivitySettings>()
+        scenario.onFragment { fragment: AdaptiveConnectivitySettings ->
+            this.fragment = fragment
+            val switchPreference =
+                fragment.findPreference<SwitchPreferenceCompat>(
+                    ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED
+                )
+            assertThat(switchPreference?.isChecked).isTrue()
+            switchPreference?.performClick()
+            assertThat(switchPreference?.isChecked).isFalse()
+            assertThat(updateSetting(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED)).isFalse()
+            switchPreference?.performClick()
+            assertThat(switchPreference?.isChecked).isTrue()
+            assertThat(updateSetting(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED)).isTrue()
+        }
+    }
+
+    /**
+     * Helper function to get the setting value from Settings.Secure.
+     *
+     * @param key the key of the setting to get.
+     */
+    private fun updateSetting(key: String): Boolean {
+        return (Settings.Secure.getInt(
+            mContext.contentResolver,
+            key,
+            0
+        ) == 1)
+    }
+
+    private fun assertSwitchPreferenceCompatVisibility(
         key: String,
-        fragment: AdaptiveConnectivitySettings
+        fragment: AdaptiveConnectivitySettings,
+        isVisible: Boolean
     ) {
         val switchPreference = fragment.findPreference<SwitchPreferenceCompat>(key)
-        assertThat(switchPreference).isNull()
+        assertThat(switchPreference?.isVisible).isEqualTo(isVisible)
     }
 
 }
diff --git a/tests/robotests/src/com/android/settings/network/AdaptiveMobileNetworkTogglePreferenceTest.kt b/tests/robotests/src/com/android/settings/network/AdaptiveMobileNetworkTogglePreferenceTest.kt
new file mode 100644
index 0000000..6b2b7dd
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/network/AdaptiveMobileNetworkTogglePreferenceTest.kt
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2025 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.network
+
+import android.content.Context
+import android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED
+import androidx.preference.SwitchPreferenceCompat
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.settingslib.preference.createAndBindWidget
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class AdaptiveMobileNetworkTogglePreferenceTest {
+    private val context: Context = ApplicationProvider.getApplicationContext()
+
+    private val adaptiveMobileNetworkTogglePreference = AdaptiveMobileNetworkTogglePreference()
+
+    @Test
+    fun switchClick_defaultDisabled_returnFalse() {
+        setAdaptiveMobileNetworkEnabled(false)
+
+        assertThat(getSwitchPreference().isChecked).isFalse()
+    }
+
+    @Test
+    fun switchClick_defaultEnabled_returnTrue() {
+        setAdaptiveMobileNetworkEnabled(true)
+
+        assertThat(getSwitchPreference().isChecked).isTrue()
+    }
+
+    @Test
+    fun setChecked_defaultEnabled_updatesCorrectly() {
+        val preference = getSwitchPreference()
+        assertThat(preference.isChecked).isTrue()
+
+        preference.performClick()
+
+        assertThat(preference.isChecked).isFalse()
+
+        preference.performClick()
+
+        assertThat(preference.isChecked).isTrue()
+    }
+
+    @Test
+    fun storeSetTrue_setAdaptiveMobileNetworkEnabled() {
+        setAdaptiveMobileNetworkEnabled(true)
+
+        assertThat(
+            getAdaptiveMobileNetworkEnabled()
+        ).isTrue()
+    }
+
+    @Test
+    fun storeSetFalse_setAdaptiveMobileNetworkDisabled() {
+        setAdaptiveMobileNetworkEnabled(false)
+
+        assertThat(
+            getAdaptiveMobileNetworkEnabled()
+        ).isFalse()
+    }
+
+    private fun getSwitchPreference(): SwitchPreferenceCompat =
+        adaptiveMobileNetworkTogglePreference.createAndBindWidget(context)
+
+    private fun setAdaptiveMobileNetworkEnabled(enabled: Boolean) =
+        adaptiveMobileNetworkTogglePreference
+            .storage(context)
+            .setBoolean(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED, enabled)
+
+    private fun getAdaptiveMobileNetworkEnabled() =
+        adaptiveMobileNetworkTogglePreference
+            .storage(context)
+            .getBoolean(ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED)
+}
diff --git a/tests/robotests/src/com/android/settings/network/WifiScorerTogglePreferenceTest.kt b/tests/robotests/src/com/android/settings/network/WifiScorerTogglePreferenceTest.kt
new file mode 100644
index 0000000..794b5eb
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/network/WifiScorerTogglePreferenceTest.kt
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2025 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.network
+
+import android.content.Context
+import android.content.ContextWrapper
+import android.net.wifi.WifiManager
+import android.provider.Settings.Secure.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED
+import androidx.preference.SwitchPreferenceCompat
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.settingslib.preference.createAndBindWidget
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.verify
+
+@RunWith(AndroidJUnit4::class)
+class WifiScorerTogglePreferenceTest {
+    private val mockWifiManager = mock<WifiManager>()
+
+    private val context: Context =
+        object : ContextWrapper(ApplicationProvider.getApplicationContext()) {
+            override fun getSystemService(name: String): Any? =
+                when {
+                    name == getSystemServiceName(WifiManager::class.java) -> mockWifiManager
+                    else -> super.getSystemService(name)
+                }
+        }
+
+    private val wifiScorerTogglePreference = WifiScorerTogglePreference()
+
+    @Test
+    fun switchClick_defaultDisabled_returnFalse() {
+        setWifiScorerEnabled(false)
+
+        assertThat(getSwitchPreference().isChecked).isFalse()
+    }
+
+    @Test
+    fun switchClick_defaultEnabled_returnTrue() {
+        setWifiScorerEnabled(true)
+
+        assertThat(getSwitchPreference().isChecked).isTrue()
+    }
+
+    @Test
+    fun setChecked_defaultEnabled_updatesCorrectly() {
+        val preference = getSwitchPreference()
+        assertThat(preference.isChecked).isTrue()
+
+        preference.performClick()
+
+        assertThat(preference.isChecked).isFalse()
+
+        preference.performClick()
+
+        assertThat(preference.isChecked).isTrue()
+    }
+
+    @Test
+    fun storeSetTrue_wifiManagerSetWifiScoringEnabled() {
+        setWifiScorerEnabled(true)
+
+        assertThat(getWifiScorerEnabled()).isTrue()
+        verify(mockWifiManager).setWifiScoringEnabled(true)
+    }
+
+    @Test
+    fun storeSetFalse_wifiManagerSetWifiScoringDisabled() {
+        setWifiScorerEnabled(false)
+
+        assertThat(getWifiScorerEnabled()).isFalse()
+        verify(mockWifiManager).setWifiScoringEnabled(false)
+    }
+
+    private fun getSwitchPreference(): SwitchPreferenceCompat =
+        wifiScorerTogglePreference.createAndBindWidget(context)
+
+    private fun setWifiScorerEnabled(enabled: Boolean) =
+        wifiScorerTogglePreference
+            .storage(context)
+            .setBoolean(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED, enabled)
+
+    private fun getWifiScorerEnabled() =
+        wifiScorerTogglePreference
+            .storage(context)
+            .getBoolean(ADAPTIVE_CONNECTIVITY_WIFI_ENABLED)
+}
diff --git a/tests/robotests/src/com/android/settings/supervision/SupervisionSafeSearchPreferenceTest.kt b/tests/robotests/src/com/android/settings/supervision/SupervisionSafeSearchPreferenceTest.kt
new file mode 100644
index 0000000..371cca3
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/supervision/SupervisionSafeSearchPreferenceTest.kt
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2025 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.supervision
+
+import android.content.Context
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.settings.R
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class SupervisionSafeSearchPreferenceTest {
+    private val context: Context = ApplicationProvider.getApplicationContext()
+
+    private val searchFilterOnPreference = SupervisionSearchFilterOnPreference()
+
+    private val searchFilterOffPreference = SupervisionSearchFilterOffPreference()
+
+    @Test
+    fun getTitle_filterOn() {
+        assertThat(searchFilterOnPreference.title)
+            .isEqualTo(R.string.supervision_web_content_filters_search_filter_on_title)
+    }
+
+
+    @Test
+    fun getSummary_filterOn() {
+        assertThat(searchFilterOnPreference.summary)
+            .isEqualTo(R.string.supervision_web_content_filters_search_filter_on_summary)
+    }
+
+    @Test
+    fun getTitle_filterOff() {
+        assertThat(searchFilterOffPreference.title)
+            .isEqualTo(R.string.supervision_web_content_filters_search_filter_off_title)
+    }
+
+    @Test
+    fun getSummary_filterOff() {
+        assertThat(searchFilterOffPreference.summary)
+            .isEqualTo(
+                R.string.supervision_web_content_filters_search_filter_off_summary
+            )
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/supervision/SupervisionSafeSitesPreferenceTest.kt b/tests/robotests/src/com/android/settings/supervision/SupervisionSafeSitesPreferenceTest.kt
index 5be7a11..a3aca69 100644
--- a/tests/robotests/src/com/android/settings/supervision/SupervisionSafeSitesPreferenceTest.kt
+++ b/tests/robotests/src/com/android/settings/supervision/SupervisionSafeSitesPreferenceTest.kt
@@ -16,20 +16,33 @@
 package com.android.settings.supervision
 
 import android.content.Context
+import android.provider.Settings
+import android.provider.Settings.Secure.BROWSER_CONTENT_FILTERS_ENABLED
+import android.provider.Settings.SettingNotFoundException
 import androidx.test.core.app.ApplicationProvider
 import androidx.test.ext.junit.runners.AndroidJUnit4
 import com.android.settings.R
+import com.android.settingslib.preference.createAndBindWidget
+import com.android.settingslib.widget.SelectorWithWidgetPreference
 import com.google.common.truth.Truth.assertThat
+import org.junit.Assert.assertThrows
+import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
 
 @RunWith(AndroidJUnit4::class)
 class SupervisionSafeSitesPreferenceTest {
     private val context: Context = ApplicationProvider.getApplicationContext()
+    private lateinit var dataStore: SupervisionSafeSitesDataStore
+    private lateinit var allowAllSitesPreference: SupervisionAllowAllSitesPreference
+    private lateinit var blockExplicitSitesPreference: SupervisionBlockExplicitSitesPreference
 
-    private val allowAllSitesPreference = SupervisionAllowAllSitesPreference()
-
-    private val blockExplicitSitesPreference = SupervisionBlockExplicitSitesPreference()
+    @Before
+    fun setUp() {
+        dataStore = SupervisionSafeSitesDataStore(context)
+        allowAllSitesPreference = SupervisionAllowAllSitesPreference(dataStore)
+        blockExplicitSitesPreference = SupervisionBlockExplicitSitesPreference(dataStore)
+    }
 
     @Test
     fun getTitle_allowAllSites() {
@@ -50,4 +63,64 @@
                 R.string.supervision_web_content_filters_browser_block_explicit_sites_summary
             )
     }
+
+    @Test
+    fun allowAllSitesIsChecked_whenNoValueIsSet() {
+        assertThrows(SettingNotFoundException::class.java) {
+            Settings.Secure.getInt(context.getContentResolver(), BROWSER_CONTENT_FILTERS_ENABLED)
+        }
+        assertThat(getBlockExplicitSitesWidget().isChecked).isFalse()
+        assertThat(getAllowAllSitesWidget().isChecked).isTrue()
+    }
+
+    @Test
+    fun blockExplicitSitesIsChecked_whenPreviouslyEnabled() {
+        Settings.Secure.putInt(context.getContentResolver(), BROWSER_CONTENT_FILTERS_ENABLED, 1)
+        assertThat(getAllowAllSitesWidget().isChecked).isFalse()
+        assertThat(getBlockExplicitSitesWidget().isChecked).isTrue()
+    }
+
+    @Test
+    fun clickBlockExplicitSites_enablesFilter() {
+        Settings.Secure.putInt(context.getContentResolver(), BROWSER_CONTENT_FILTERS_ENABLED, 0)
+        val blockExplicitSitesWidget = getBlockExplicitSitesWidget()
+        assertThat(blockExplicitSitesWidget.isChecked).isFalse()
+
+        blockExplicitSitesWidget.performClick()
+
+        assertThat(
+            Settings.Secure.getInt(
+                context.getContentResolver(),
+                BROWSER_CONTENT_FILTERS_ENABLED,
+            )
+        )
+            .isEqualTo(1)
+        assertThat(blockExplicitSitesWidget.isChecked).isTrue()
+    }
+
+    @Test
+    fun clickAllowAllSites_disablesFilter() {
+        Settings.Secure.putInt(context.getContentResolver(), BROWSER_CONTENT_FILTERS_ENABLED, 1)
+        val allowAllSitesWidget = getAllowAllSitesWidget()
+        assertThat(allowAllSitesWidget.isChecked).isFalse()
+
+        allowAllSitesWidget.performClick()
+
+        assertThat(
+            Settings.Secure.getInt(
+                context.getContentResolver(),
+                BROWSER_CONTENT_FILTERS_ENABLED,
+            )
+        )
+            .isEqualTo(0)
+        assertThat(allowAllSitesWidget.isChecked).isTrue()
+    }
+
+    private fun getBlockExplicitSitesWidget(): SelectorWithWidgetPreference {
+        return blockExplicitSitesPreference.createAndBindWidget(context)
+    }
+
+    private fun getAllowAllSitesWidget(): SelectorWithWidgetPreference {
+        return allowAllSitesPreference.createAndBindWidget(context)
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/supervision/SupervisionWebContentFiltersScreenTest.kt b/tests/robotests/src/com/android/settings/supervision/SupervisionWebContentFiltersScreenTest.kt
index 351cbde..31bdbd2 100644
--- a/tests/robotests/src/com/android/settings/supervision/SupervisionWebContentFiltersScreenTest.kt
+++ b/tests/robotests/src/com/android/settings/supervision/SupervisionWebContentFiltersScreenTest.kt
@@ -15,18 +15,32 @@
  */
 package com.android.settings.supervision
 
+import android.app.supervision.flags.Flags
 import android.content.Context
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
+import android.platform.test.flag.junit.SetFlagsRule
+import androidx.fragment.app.testing.FragmentScenario
 import androidx.test.core.app.ApplicationProvider
 import androidx.test.ext.junit.runners.AndroidJUnit4
 import com.android.settings.R
+import com.android.settingslib.widget.SelectorWithWidgetPreference
 import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Rule
 import org.junit.Test
 import org.junit.runner.RunWith
 
 @RunWith(AndroidJUnit4::class)
 class SupervisionWebContentFiltersScreenTest {
+    @get:Rule val setFlagsRule = SetFlagsRule()
     private val context: Context = ApplicationProvider.getApplicationContext()
-    private val supervisionWebContentFiltersScreen = SupervisionWebContentFiltersScreen()
+    private lateinit var supervisionWebContentFiltersScreen: SupervisionWebContentFiltersScreen
+
+    @Before
+    fun setUp() {
+        supervisionWebContentFiltersScreen = SupervisionWebContentFiltersScreen()
+    }
 
     @Test
     fun key() {
@@ -39,4 +53,40 @@
         assertThat(supervisionWebContentFiltersScreen.title)
             .isEqualTo(R.string.supervision_web_content_filters_title)
     }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_WEB_CONTENT_FILTERS_SCREEN)
+    fun flagEnabled() {
+        assertThat(supervisionWebContentFiltersScreen.isFlagEnabled(context)).isTrue()
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ENABLE_WEB_CONTENT_FILTERS_SCREEN)
+    fun flagDisabled() {
+        assertThat(supervisionWebContentFiltersScreen.isFlagEnabled(context)).isFalse()
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_ENABLE_WEB_CONTENT_FILTERS_SCREEN)
+    fun switchSafeSitesPreferences() {
+        FragmentScenario.launchInContainer(supervisionWebContentFiltersScreen.fragmentClass())
+            .onFragment { fragment ->
+                val allowAllSitesPreference =
+                    fragment.findPreference<SelectorWithWidgetPreference>(
+                        SupervisionAllowAllSitesPreference.KEY
+                    )!!
+                val blockExplicitSitesPreference =
+                    fragment.findPreference<SelectorWithWidgetPreference>(
+                        SupervisionBlockExplicitSitesPreference.KEY
+                    )!!
+
+                assertThat(allowAllSitesPreference.isChecked).isTrue()
+                assertThat(blockExplicitSitesPreference.isChecked).isFalse()
+
+                blockExplicitSitesPreference.performClick()
+
+                assertThat(blockExplicitSitesPreference.isChecked).isTrue()
+                assertThat(allowAllSitesPreference.isChecked).isFalse()
+            }
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/testutils/DeviceStateAutoRotateSettingTestUtils.java b/tests/robotests/src/com/android/settings/testutils/DeviceStateAutoRotateSettingTestUtils.java
new file mode 100644
index 0000000..3359b2f
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/testutils/DeviceStateAutoRotateSettingTestUtils.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2025 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.testutils;
+
+import static org.mockito.Mockito.when;
+
+import android.content.res.Resources;
+
+/**
+ * Helper for testing device state auto rotate setting
+ */
+public class DeviceStateAutoRotateSettingTestUtils {
+
+    /**
+     * Mock {@link mockResources} to return device state auto rotate enabled or disabled based on
+     * value passed for {@link enable}.
+     */
+    public static void setDeviceStateRotationLockEnabled(boolean enable, Resources mockResources) {
+        String[] perDeviceStateRotationLockDefaults = new String[0];
+        if (enable) {
+            perDeviceStateRotationLockDefaults = new String[]{"test_value"};
+        }
+        when(mockResources.getStringArray(
+                com.android.internal.R.array.config_perDeviceStateRotationLockDefaults))
+                .thenReturn(perDeviceStateRotationLockDefaults);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDeviceStateRotationLockSettingsManager.java b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDeviceStateAutoRotateSettingManager.java
similarity index 73%
rename from tests/robotests/src/com/android/settings/testutils/shadow/ShadowDeviceStateRotationLockSettingsManager.java
rename to tests/robotests/src/com/android/settings/testutils/shadow/ShadowDeviceStateAutoRotateSettingManager.java
index ed266e3..b44d79e 100644
--- a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDeviceStateRotationLockSettingsManager.java
+++ b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDeviceStateAutoRotateSettingManager.java
@@ -16,29 +16,17 @@
 
 package com.android.settings.testutils.shadow;
 
-import android.content.Context;
-
 import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
 
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
 
 @Implements(DeviceStateRotationLockSettingsManager.class)
-public class ShadowDeviceStateRotationLockSettingsManager {
+public class ShadowDeviceStateAutoRotateSettingManager {
 
-    private static boolean sDeviceStateRotationLockEnabled;
     private boolean mIsRotationLockedForAllStates;
 
     @Implementation
-    public static boolean isDeviceStateRotationLockEnabled(Context context) {
-        return sDeviceStateRotationLockEnabled;
-    }
-
-    public static void setDeviceStateRotationLockEnabled(boolean enabled) {
-        sDeviceStateRotationLockEnabled = enabled;
-    }
-
-    @Implementation
     public boolean isRotationLockedForAllStates() {
         return mIsRotationLockedForAllStates;
     }
diff --git a/tests/robotests/testutils/com/android/settings/testutils/shadow/ShadowBluetoothUtils.java b/tests/robotests/testutils/com/android/settings/testutils/shadow/ShadowBluetoothUtils.java
index 4dca749..72de746 100644
--- a/tests/robotests/testutils/com/android/settings/testutils/shadow/ShadowBluetoothUtils.java
+++ b/tests/robotests/testutils/com/android/settings/testutils/shadow/ShadowBluetoothUtils.java
@@ -18,24 +18,48 @@
 
 import android.content.Context;
 
+import androidx.annotation.NonNull;
+
 import com.android.settings.bluetooth.Utils;
+import com.android.settingslib.bluetooth.CachedBluetoothDevice;
 import com.android.settingslib.bluetooth.LocalBluetoothManager;
 
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
 import org.robolectric.annotation.Resetter;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /** Robolectric shadow for the bluetooth utils. */
 @Implements(Utils.class)
 public class ShadowBluetoothUtils {
 
     public static LocalBluetoothManager sLocalBluetoothManager;
+    private static final  Map<CachedBluetoothDevice, Boolean> sLeAudioState = new HashMap<>();
 
     @Implementation
     protected static LocalBluetoothManager getLocalBtManager(Context context) {
         return sLocalBluetoothManager;
     }
 
+    /** Sets le audio state for the device. */
+    @Implementation
+    public static void setLeAudioEnabled(
+            @NonNull LocalBluetoothManager manager,
+            @NonNull CachedBluetoothDevice cachedDevice,
+            boolean enable) {
+        sLeAudioState.put(cachedDevice, enable);
+    }
+
+    /** Checks whether le audio is enabled for the device. */
+    public static boolean isLeAudioEnabled(@NonNull CachedBluetoothDevice cachedDevice) {
+        if (sLeAudioState.containsKey(cachedDevice)) {
+            return sLeAudioState.get(cachedDevice);
+        }
+        return false;
+    }
+
     /** Resets the local bluetooth manager to null. */
     @Resetter
     public static void reset() {
diff --git a/tests/unit/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceControllerTest.java b/tests/unit/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceControllerTest.java
index 6318c9c..c5c69af 100644
--- a/tests/unit/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceControllerTest.java
@@ -103,6 +103,6 @@
         // the background thread.
         TimeUnit.SECONDS.sleep(5);
         assertThat(preference.getSummary()).isEqualTo(ResourcesUtils.getResourcesString(
-                mContext, "storage_summary", percentage, freeSpace));
+                mContext, "storage_toplevel_summary", percentage, freeSpace));
     }
 }
diff --git a/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAboutContentControllerTest.kt b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAboutContentControllerTest.kt
index d070811..036cc3f 100644
--- a/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAboutContentControllerTest.kt
+++ b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAboutContentControllerTest.kt
@@ -63,11 +63,9 @@
         controller.displayPreference(screen)
 
         assertThat(preference.title).isEqualTo(
-            context.getString(
-                R.string.description_about_satellite_setting,
-                TEST_SIM_OPERATOR_NAME
+            "You can send and receive text messages and use some apps by satellite with an eligible Test Carrier account"
             )
-        )
+
     }
 
     private companion object {
diff --git a/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAccountInfoControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAccountInfoControllerTest.java
new file mode 100644
index 0000000..331a74c
--- /dev/null
+++ b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAccountInfoControllerTest.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2025 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.network.telephony.satellite;
+
+import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL;
+
+import static com.android.settings.core.BasePreferenceController.AVAILABLE;
+import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE;
+import static com.android.settings.network.telephony.satellite.SatelliteSettingAccountInfoController.PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN;
+import static com.android.settings.network.telephony.satellite.SatelliteSettingAccountInfoController.PREF_KEY_YOUR_SATELLITE_DATA_PLAN;
+import static com.android.settings.network.telephony.satellite.SatelliteSettingAccountInfoController.PREF_KEY_YOUR_SATELLITE_PLAN;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.os.Looper;
+import android.os.PersistableBundle;
+import android.telephony.TelephonyManager;
+import android.telephony.satellite.SatelliteManager;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceManager;
+import androidx.preference.PreferenceScreen;
+import androidx.test.core.app.ApplicationProvider;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
+import com.android.settings.testutils.ResourcesUtils;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+@RunWith(AndroidJUnit4.class)
+public class SatelliteSettingAccountInfoControllerTest {
+    private static final int TEST_SUB_ID = 5;
+    private static final String TEST_OPERATOR_NAME = "test_operator_name";
+
+    @Rule
+    public final MockitoRule mMockitoRule = MockitoJUnit.rule();
+
+    @Mock
+    private TelephonyManager mTelephonyManager;
+
+    private Context mContext;
+    private SatelliteSettingAccountInfoController mController;
+    private final PersistableBundle mPersistableBundle = new PersistableBundle();
+
+    @Before
+    public void setUp() {
+        if (Looper.myLooper() == null) {
+            Looper.prepare();
+        }
+        mContext = spy(ApplicationProvider.getApplicationContext());
+        mController = new SatelliteSettingAccountInfoController(mContext,
+                PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
+        when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager);
+        when(mTelephonyManager.getSimOperatorName(TEST_SUB_ID)).thenReturn(TEST_OPERATOR_NAME);
+    }
+
+    @Test
+    public void getAvailabilityStatus_entitlementNotSupport_returnConditionalUnavailable() {
+        when(mContext.getSystemService(SatelliteManager.class)).thenReturn(null);
+        mController.init(TEST_SUB_ID, mPersistableBundle, false, false);
+
+        int result = mController.getAvailabilityStatus(TEST_SUB_ID);
+
+        assertThat(result).isEqualTo(CONDITIONALLY_UNAVAILABLE);
+    }
+
+    @Test
+    public void getAvailabilityStatus_entitlementIsSupported_returnConditionalUnavailable() {
+        mPersistableBundle.putBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL, true);
+        mController.init(TEST_SUB_ID, mPersistableBundle, false, false);
+
+        int result = mController.getAvailabilityStatus(TEST_SUB_ID);
+
+        assertThat(result).isEqualTo(AVAILABLE);
+    }
+
+    @Test
+    public void displayPreference_showCategoryTitle_correctOperatorName() {
+        mPersistableBundle.putBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL, true);
+        when(mContext.getSystemService(SatelliteManager.class)).thenReturn(null);
+        mController.init(TEST_SUB_ID, mPersistableBundle, false, false);
+
+        PreferenceScreen screen = new PreferenceManager(mContext).createPreferenceScreen(mContext);
+        PreferenceCategory preferenceCategory = new PreferenceCategory(mContext);
+        preferenceCategory.setKey(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
+        Preference preference = new Preference(mContext);
+        preference.setKey(PREF_KEY_YOUR_SATELLITE_PLAN);
+        screen.addPreference(preferenceCategory);
+        screen.addPreference(preference);
+
+        mController.displayPreference(screen);
+
+        assertThat(preferenceCategory.getTitle().toString()).isEqualTo(
+                ResourcesUtils.getResourcesString(mContext, "category_title_your_satellite_plan",
+                        TEST_OPERATOR_NAME));
+    }
+
+    @Test
+    public void displayPreference_showEligibleUiButDataUnavailable_showSmsEligibleAccountState() {
+        mPersistableBundle.putBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL, true);
+        when(mContext.getSystemService(SatelliteManager.class)).thenReturn(null);
+        mController = new SatelliteSettingAccountInfoController(mContext,
+                PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN) {
+            @Override
+            protected boolean isSatelliteEligible() {
+                return true;
+            }
+        };
+        mController.init(TEST_SUB_ID, mPersistableBundle, true, false);
+        PreferenceScreen screen = new PreferenceManager(mContext).createPreferenceScreen(mContext);
+        PreferenceCategory preferenceCategory = new PreferenceCategory(mContext);
+        preferenceCategory.setKey(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
+        Preference preference = new Preference(mContext);
+        preference.setKey(PREF_KEY_YOUR_SATELLITE_PLAN);
+        Preference preferenceData = new Preference(mContext);
+        preferenceData.setKey(PREF_KEY_YOUR_SATELLITE_DATA_PLAN);
+        screen.addPreference(preferenceCategory);
+        screen.addPreference(preference);
+        screen.addPreference(preferenceData);
+
+        mController.displayPreference(screen);
+
+        assertThat(preference.getTitle().toString()).isEqualTo(
+                ResourcesUtils.getResourcesString(mContext, "title_have_satellite_plan"));
+        assertThat(preferenceData.getTitle()).isEqualTo(null);
+    }
+
+    @Test
+    public void
+            displayPreference_showEligibleUiAndDataAvailable_showSmsAndDataEligibleAccountState() {
+        mPersistableBundle.putBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL, true);
+        when(mContext.getSystemService(SatelliteManager.class)).thenReturn(null);
+        mController = new SatelliteSettingAccountInfoController(mContext,
+                PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN) {
+            @Override
+            protected boolean isSatelliteEligible() {
+                return true;
+            }
+        };
+        mController.init(TEST_SUB_ID, mPersistableBundle, true, true);
+        PreferenceScreen screen = new PreferenceManager(mContext).createPreferenceScreen(mContext);
+        PreferenceCategory preferenceCategory = new PreferenceCategory(mContext);
+        preferenceCategory.setKey(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
+        Preference preference = new Preference(mContext);
+        preference.setKey(PREF_KEY_YOUR_SATELLITE_PLAN);
+        Preference preferenceData = new Preference(mContext);
+        preferenceData.setKey(PREF_KEY_YOUR_SATELLITE_DATA_PLAN);
+        screen.addPreference(preferenceCategory);
+        screen.addPreference(preference);
+        screen.addPreference(preferenceData);
+
+        mController.displayPreference(screen);
+
+        assertThat(preference.getTitle().toString()).isEqualTo(
+                ResourcesUtils.getResourcesString(mContext, "title_have_satellite_plan"));
+        assertThat(preferenceData.getTitle().toString()).isEqualTo(
+                ResourcesUtils.getResourcesString(mContext, "title_have_satellite_data_plan"));
+    }
+
+    @Test
+    public void displayPreference_showIneligibleUi_showSmsAccountState() {
+        mPersistableBundle.putBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL, true);
+        when(mContext.getSystemService(SatelliteManager.class)).thenReturn(null);
+        mController = new SatelliteSettingAccountInfoController(mContext,
+                PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN) {
+            @Override
+            protected boolean isSatelliteEligible() {
+                return false;
+            }
+        };
+        mController.init(TEST_SUB_ID, mPersistableBundle, false, false);
+        PreferenceScreen screen = new PreferenceManager(mContext).createPreferenceScreen(mContext);
+        PreferenceCategory preferenceCategory = new PreferenceCategory(mContext);
+        preferenceCategory.setKey(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
+        Preference preference = new Preference(mContext);
+        preference.setKey(PREF_KEY_YOUR_SATELLITE_PLAN);
+        screen.addPreference(preferenceCategory);
+        screen.addPreference(preference);
+
+        mController.displayPreference(screen);
+
+        assertThat(preference.getTitle().toString()).isEqualTo(
+                ResourcesUtils.getResourcesString(mContext, "title_no_satellite_plan"));
+    }
+}
diff --git a/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java
index c67f0ac..7cb85a5 100644
--- a/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java
@@ -19,7 +19,6 @@
 import static android.telephony.CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC;
 import static android.telephony.CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_MANUAL;
 import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL;
-import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_DATA;
 import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_SMS;
 
 import static com.android.settings.core.BasePreferenceController.AVAILABLE;
@@ -183,41 +182,10 @@
 
     @Test
     @EnableFlags(com.android.settings.flags.Flags.FLAG_SATELLITE_OEM_SETTINGS_UX_MIGRATION)
-    public void title_hasServiceDataType_showDataUi() {
-        mController.initialize(TEST_SUB_ID);
-        PreferenceManager preferenceManager = new PreferenceManager(mContext);
-        PreferenceScreen preferenceScreen = preferenceManager.createPreferenceScreen(mContext);
-        Preference preference = new Preference(mContext);
-        preference.setKey(KEY);
-        preference.setTitle("test title");
-        preferenceScreen.addPreference(preference);
-        mController.displayPreference(preferenceScreen);
-        mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged(
-                new int[]{SERVICE_TYPE_SMS, SERVICE_TYPE_DATA});
-
-        assertThat(preference.getTitle()).isEqualTo("Satellite connectivity");
-    }
-
-    @Test
-    @EnableFlags(com.android.settings.flags.Flags.FLAG_SATELLITE_OEM_SETTINGS_UX_MIGRATION)
-    public void title_onlyHasServiceSmsType_showSmsUi() {
-        mController.initialize(TEST_SUB_ID);
-        PreferenceManager preferenceManager = new PreferenceManager(mContext);
-        PreferenceScreen preferenceScreen = preferenceManager.createPreferenceScreen(mContext);
-        Preference preference = new Preference(mContext);
-        preference.setKey(KEY);
-        preference.setTitle("test title");
-        preferenceScreen.addPreference(preference);
-        mController.displayPreference(preferenceScreen);
-        mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged(
-                new int[]{SERVICE_TYPE_SMS});
-
-        assertThat(preference.getTitle()).isEqualTo("Satellite messaging");
-    }
-
-    @Test
-    @EnableFlags(com.android.settings.flags.Flags.FLAG_SATELLITE_OEM_SETTINGS_UX_MIGRATION)
-    public void summary_noEntitlement_showSummaryWithoutEntitlement() {
+    public void summary_noEntitlementAndTypeIsAuto_showSummaryWithoutEntitlement() {
+        mCarrierConfig.putInt(
+                CarrierConfigManager.KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT,
+                CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC);
         mCarrierConfig.putBoolean(
                 KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL,
                 false);
@@ -237,9 +205,6 @@
     @Test
     @EnableFlags(com.android.settings.flags.Flags.FLAG_SATELLITE_OEM_SETTINGS_UX_MIGRATION)
     public void summary_smsAvailableForManualType_showSummaryWithAccount() {
-        mCarrierConfig.putBoolean(
-                KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL,
-                true);
         mCarrierConfig.putInt(
                 CarrierConfigManager.KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT,
                 CARRIER_ROAMING_NTN_CONNECT_MANUAL);
diff --git a/tests/unit/src/com/android/settings/safetycenter/FaceSafetySourceTest.java b/tests/unit/src/com/android/settings/safetycenter/FaceSafetySourceTest.java
index 5d94532..1d6f48f 100644
--- a/tests/unit/src/com/android/settings/safetycenter/FaceSafetySourceTest.java
+++ b/tests/unit/src/com/android/settings/safetycenter/FaceSafetySourceTest.java
@@ -37,7 +37,6 @@
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.hardware.face.FaceManager;
-import android.hardware.fingerprint.FingerprintManager;
 import android.os.UserHandle;
 import android.platform.test.annotations.DisableFlags;
 import android.platform.test.annotations.EnableFlags;
@@ -53,7 +52,6 @@
 
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.Settings;
-import com.android.settings.biometrics.BiometricEnrollActivity;
 import com.android.settings.biometrics.face.FaceEnrollIntroductionInternal;
 import com.android.settings.flags.Flags;
 import com.android.settings.testutils.FakeFeatureFactory;
@@ -85,7 +83,6 @@
     @Mock private PackageManager mPackageManager;
     @Mock private DevicePolicyManager mDevicePolicyManager;
     @Mock private FaceManager mFaceManager;
-    @Mock private FingerprintManager mFingerprintManager;
     @Mock private LockPatternUtils mLockPatternUtils;
     @Mock private SafetyCenterManagerWrapper mSafetyCenterManagerWrapper;
     @Mock private SupervisionManager mSupervisionManager;
@@ -100,8 +97,6 @@
         when(mApplicationContext.getSystemService(Context.DEVICE_POLICY_SERVICE))
                 .thenReturn(mDevicePolicyManager);
         when(mApplicationContext.getSystemService(Context.FACE_SERVICE)).thenReturn(mFaceManager);
-        when(mApplicationContext.getSystemService(Context.FINGERPRINT_SERVICE))
-                .thenReturn(mFingerprintManager);
         when(mApplicationContext.getSystemService(Context.SUPERVISION_SERVICE))
                 .thenReturn(mSupervisionManager);
         FakeFeatureFactory featureFactory = FakeFeatureFactory.setupForTest();
@@ -216,12 +211,10 @@
 
     @Test
     @RequiresFlagsEnabled(Flags.FLAG_BIOMETRICS_ONBOARDING_EDUCATION)
-    public void setSafetySourceData_onlyFaceNotEnrolled_whenNotDisabledByAdmin_setsData() {
+    public void setSafetySourceData_withFaceNotEnrolled_whenNotDisabledByAdmin_setsData() {
         when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
         when(mFaceManager.isHardwareDetected()).thenReturn(true);
         when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false);
-        when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
-        when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(true);
         when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0);
 
         FaceSafetySource.setSafetySourceData(mApplicationContext, EVENT_SOURCE_STATE_CHANGED);
@@ -234,24 +227,6 @@
 
     @Test
     @RequiresFlagsEnabled(Flags.FLAG_BIOMETRICS_ONBOARDING_EDUCATION)
-    public void setSafetySourceData_noBiometricEnrolled_whenNotDisabledByAdmin_setsData() {
-        when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
-        when(mFaceManager.isHardwareDetected()).thenReturn(true);
-        when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false);
-        when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
-        when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(false);
-        when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0);
-
-        FaceSafetySource.setSafetySourceData(mApplicationContext, EVENT_SOURCE_STATE_CHANGED);
-
-        assertSafetySourceEnabledDataSetWithSingularSummary(
-                "security_settings_face_preference_title_new",
-                "security_settings_face_preference_summary_none_new",
-                BiometricEnrollActivity.class.getName());
-    }
-
-    @Test
-    @RequiresFlagsEnabled(Flags.FLAG_BIOMETRICS_ONBOARDING_EDUCATION)
     @DisableFlags(android.app.supervision.flags.Flags.FLAG_DEPRECATE_DPM_SUPERVISION_APIS)
     public void setSafetySourceData_withFaceEnrolled_whenDisabledByAdmin_setsData() {
         when(mDevicePolicyManager.getProfileOwnerOrDeviceOwnerSupervisionComponent(USER_HANDLE))
diff --git a/tests/unit/src/com/android/settings/safetycenter/FingerprintSafetySourceTest.java b/tests/unit/src/com/android/settings/safetycenter/FingerprintSafetySourceTest.java
index 18eae9a..dac2699 100644
--- a/tests/unit/src/com/android/settings/safetycenter/FingerprintSafetySourceTest.java
+++ b/tests/unit/src/com/android/settings/safetycenter/FingerprintSafetySourceTest.java
@@ -36,7 +36,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
-import android.hardware.face.FaceManager;
 import android.hardware.fingerprint.Fingerprint;
 import android.hardware.fingerprint.FingerprintManager;
 import android.os.UserHandle;
@@ -53,7 +52,6 @@
 import androidx.test.ext.junit.runners.AndroidJUnit4;
 
 import com.android.internal.widget.LockPatternUtils;
-import com.android.settings.biometrics.BiometricEnrollActivity;
 import com.android.settings.biometrics.fingerprint.FingerprintSettings;
 import com.android.settings.flags.Flags;
 import com.android.settings.testutils.FakeFeatureFactory;
@@ -89,7 +87,6 @@
     @Mock private PackageManager mPackageManager;
     @Mock private DevicePolicyManager mDevicePolicyManager;
     @Mock private FingerprintManager mFingerprintManager;
-    @Mock private FaceManager mFaceManager;
     @Mock private LockPatternUtils mLockPatternUtils;
     @Mock private SafetyCenterManagerWrapper mSafetyCenterManagerWrapper;
     @Mock private SupervisionManager mSupervisionManager;
@@ -103,7 +100,6 @@
         when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true);
         when(mApplicationContext.getSystemService(Context.FINGERPRINT_SERVICE))
                 .thenReturn(mFingerprintManager);
-        when(mApplicationContext.getSystemService(Context.FACE_SERVICE)).thenReturn(mFaceManager);
         when(mApplicationContext.getSystemService(Context.DEVICE_POLICY_SERVICE))
                 .thenReturn(mDevicePolicyManager);
         when(mApplicationContext.getSystemService(Context.SUPERVISION_SERVICE))
@@ -232,12 +228,10 @@
 
     @Test
     @RequiresFlagsEnabled(Flags.FLAG_BIOMETRICS_ONBOARDING_EDUCATION)
-    public void setSafetySourceData_onlyFingerprintNotEnrolled_whenNotDisabledByAdmin_setsData() {
+    public void setSafetySourceData_withFingerprintNotEnrolled_whenNotDisabledByAdmin_setsData() {
         when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
         when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
         when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(false);
-        when(mFaceManager.isHardwareDetected()).thenReturn(true);
-        when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true);
         when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0);
 
         FingerprintSafetySource.setSafetySourceData(
@@ -251,25 +245,6 @@
 
     @Test
     @RequiresFlagsEnabled(Flags.FLAG_BIOMETRICS_ONBOARDING_EDUCATION)
-    public void setSafetySourceData_noBiometricEnrolled_whenNotDisabledByAdmin_setsData() {
-        when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
-        when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
-        when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(false);
-        when(mFaceManager.isHardwareDetected()).thenReturn(true);
-        when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false);
-        when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0);
-
-        FingerprintSafetySource.setSafetySourceData(
-                mApplicationContext, EVENT_SOURCE_STATE_CHANGED);
-
-        assertSafetySourceEnabledDataSetWithSingularSummary(
-                "security_settings_fingerprint",
-                "security_settings_fingerprint_preference_summary_none_new",
-                BiometricEnrollActivity.class.getName());
-    }
-
-    @Test
-    @RequiresFlagsEnabled(Flags.FLAG_BIOMETRICS_ONBOARDING_EDUCATION)
     @DisableFlags(android.app.supervision.flags.Flags.FLAG_DEPRECATE_DPM_SUPERVISION_APIS)
     public void setSafetySourceData_withFingerprintsEnrolled_whenDisabledByAdmin_setsData() {
         int enrolledFingerprintsCount = 2;