diff --git a/aconfig/accessibility/accessibility_flags.aconfig b/aconfig/accessibility/accessibility_flags.aconfig
index 4a741a1..268ae6a 100644
--- a/aconfig/accessibility/accessibility_flags.aconfig
+++ b/aconfig/accessibility/accessibility_flags.aconfig
@@ -59,6 +59,13 @@
 }
 
 flag {
+  name: "enable_magnification_focus_following_dialog"
+  namespace: "accessibility"
+  description: "Decides whether to show the magnification focus following dialog in Settings app."
+  bug: "388336111"
+}
+
+flag {
   name: "fix_a11y_settings_search"
   namespace: "accessibility"
   description: "Fix the a11y related search items in Settings app"
diff --git a/aconfig/settings_flag_declarations.aconfig b/aconfig/settings_flag_declarations.aconfig
index 6eb1e02..b57a69d 100644
--- a/aconfig/settings_flag_declarations.aconfig
+++ b/aconfig/settings_flag_declarations.aconfig
@@ -70,3 +70,13 @@
   description: "Flag for catalyst service"
   bug: "323791114"
 }
+
+flag {
+  name: "utils_return_user_handle_for_current_user_id"
+  namespace: "profile_experiences"
+  description: "Don't ignore the current user id when checking for existing profiles."
+  bug: "378471943"
+  metadata {
+    purpose: PURPOSE_BUGFIX
+  }
+}
diff --git a/res/layout/dialog_keyboard_a11y_input_setting_keys.xml b/res/layout/dialog_keyboard_a11y_input_setting_keys.xml
index dfa3c46..d826fee 100644
--- a/res/layout/dialog_keyboard_a11y_input_setting_keys.xml
+++ b/res/layout/dialog_keyboard_a11y_input_setting_keys.xml
@@ -55,7 +55,7 @@
             android:text="@string/input_setting_keys_dialog_option_200"
             android:paddingStart="12dp"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
+            android:layout_height="48dp"
             android:layout_gravity="start|center_vertical"
             android:background="@null"/>
         <RadioButton
@@ -63,30 +63,30 @@
             android:text="@string/input_setting_keys_dialog_option_400"
             android:paddingStart="12dp"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
+            android:layout_height="48dp"
             android:layout_gravity="start|center_vertical"
-            android:layout_marginTop="12dp"
+            android:layout_marginTop="6dp"
             android:background="@null"/>
         <RadioButton
             android:id="@+id/input_setting_keys_value_600"
             android:text="@string/input_setting_keys_dialog_option_600"
             android:paddingStart="12dp"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
+            android:layout_height="48dp"
             android:layout_gravity="start|center_vertical"
-            android:layout_marginTop="12dp"
+            android:layout_marginTop="6dp"
             android:background="@null"/>
 
         <LinearLayout
             android:orientation="horizontal"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginVertical="12dp">
+            android:layout_marginVertical="6dp">
             <RadioButton
                 android:id="@+id/input_setting_keys_value_custom"
                 android:paddingStart="12dp"
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
+                android:layout_height="48dp"
                 android:layout_gravity="center_vertical"
                 android:background="@null"/>
             <LinearLayout
@@ -94,6 +94,7 @@
                 android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
+                android:minHeight="48dp"
                 android:layout_gravity="center_vertical"
                 android:gravity="center_vertical"
                 android:paddingEnd="16dp">
@@ -123,8 +124,7 @@
                     android:layout_height="wrap_content"
                     android:layout_gravity="center_vertical"
                     android:layout_marginTop="8dp"
-                    android:visibility="gone"
-                    android:background="@null"/>
+                    android:visibility="gone"/>
             </LinearLayout>
         </LinearLayout>
     </RadioGroup>
diff --git a/res/layout/notif_importance_preference.xml b/res/layout/notif_importance_preference.xml
index b2a02d1..614856c 100644
--- a/res/layout/notif_importance_preference.xml
+++ b/res/layout/notif_importance_preference.xml
@@ -21,8 +21,8 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:gravity="center"
-    android:layout_marginStart="24dp"
-    android:layout_marginEnd="16dp"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
     android:paddingTop="@dimen/notification_importance_toggle_marginTop"
     android:paddingBottom="@dimen/notification_importance_toggle_marginTop"
     android:orientation="vertical">
diff --git a/res/layout/notif_priority_conversation_preference.xml b/res/layout/notif_priority_conversation_preference.xml
index 4601c00..326c52a 100644
--- a/res/layout/notif_priority_conversation_preference.xml
+++ b/res/layout/notif_priority_conversation_preference.xml
@@ -21,8 +21,8 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:gravity="center"
-    android:layout_marginStart="24dp"
-    android:layout_marginEnd="16dp"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
     android:paddingTop="@dimen/notification_importance_toggle_marginTop"
     android:paddingBottom="@dimen/notification_importance_toggle_marginTop"
     android:orientation="vertical">
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c3fb2f9..236959d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3170,6 +3170,10 @@
     <string name="screensaver_settings_summary_dock">While docked</string>
     <!-- Display settings screen, summary fragment for screen saver options, activated never [CHAR LIMIT=35] -->
     <string name="screensaver_settings_summary_never">Never</string>
+    <!-- Summary for when screensaver is enabled, only while stationary and upright [CHAR LIMIT=35] -->
+    <string name="screensaver_settings_summary_postured">While postured</string>
+    <!-- Summary for when screensaver is enabled, only while stationary and upright and charging [CHAR LIMIT=35] -->
+    <string name="screensaver_settings_summary_postured_and_charging">While postured and charging</string>
     <!-- Display settings screen, summary for screen saver options, screen saver is turned on [CHAR LIMIT=50] -->
     <string name="screensaver_settings_summary_on">
         On / <xliff:g id="screen_saver" example="Art gallery">%1$s</xliff:g>
@@ -4712,7 +4716,7 @@
     <string name="mouse_keys_release2_summary">Use the \“<xliff:g id="release_2_label" example="/">%s</xliff:g>\” key to click the secondary mouse button</string>
 
     <!-- Title for the button to trigger the 'keyboard shortcuts helper' dialog. [CHAR LIMIT=35] -->
-    <string name="keyboard_shortcuts_helper">Keyboard shortcuts</string>
+    <string name="keyboard_shortcuts_helper">View keyboard shortcuts</string>
     <!-- Summary text for the 'keyboard shortcuts helper' dialog. [CHAR LIMIT=100] -->
     <string name="keyboard_shortcuts_helper_summary">Show list of shortcuts</string>
     <!-- Title for the 'Work profile keyboards & tools' preference category inside Languages and inputs'. [CHAR LIMIT=50] -->
@@ -5088,6 +5092,12 @@
     <string name="accessibility_tap_assistance_title">Timing controls</string>
     <!-- Title for the accessibility system controls page. [CHAR LIMIT=50] -->
     <string name="accessibility_system_controls_title">System controls</string>
+    <!-- Title for the accessibility feedback preference. [CHAR LIMIT=50] -->
+    <string name="accessibility_feedback_title">Feedback</string>
+    <!-- Summary for the accessibility feedback preference. [CHAR LIMIT=100] -->
+    <string name="accessibility_feedback_summary">Help improve by taking a survey</string>
+    <!-- Summary for the accessibility feedback preference is disabled. [CHAR LIMIT=100] -->
+    <string name="accessibility_feedback_disabled_summary">No surveys available</string>
     <!-- Title for the accessibility preference category of services downloaded by the user. [CHAR LIMIT=50] -->
     <string name="user_installed_services_category_title">Downloaded apps</string>
     <!-- Title for the accessibility preference category of settings considered to be experimental, meaning they might be changed or removed in the future. [CHAR LIMIT=50] -->
@@ -8993,9 +9003,12 @@
     <!-- [CHAR LIMIT=100] Title for switch that says whether this app can appear in the conversation notification section-->
     <string name="conversation_section_switch_title">Conversation section</string>
 
-    <!-- [CHAR LIMIT=100] Summary for switch that says whether this app can appear in the conversation notification section-->
+    <!-- [CHAR LIMIT=100] Summary for switch that says whether this app can appear in the conversation notification section (old)-->
     <string name="conversation_section_switch_summary">Allow app to use conversation section</string>
 
+    <!-- [CHAR LIMIT=100] Summary for switch that says whether this app can appear in the conversation notification section-->
+    <string name="conversation_section_switch_complete_summary">Allow app to use conversation section, although conversation features like prioritization and bubbles are not supported by this app.</string>
+
     <!-- [CHAR LIMIT=NONE] Conversation preference summary, the parent channel this conversation was spawned from (separator) the parent channel group (e.g. an account name)-->
     <string name="notification_conversation_summary" translatable="false">"<xliff:g id="parent_category_name">%1$s</xliff:g> • <xliff:g id="parent_category_group_name">%2$s</xliff:g>"</string>
 
@@ -9388,8 +9401,11 @@
     <!-- [CHAR LIMIT=NONE] Text appearing when app does not send notifications -->
     <string name="app_notifications_not_send_desc">This app does not send notifications</string>
 
+    <!-- [CHAR LIMIT=NONE] App notification settings: section header for app wide notif settings -->
+    <string name="app_notification_settings">App settings</string>
+
     <!-- [CHAR LIMIT=NONE] App notification settings: channels title -->
-    <string name="notification_channels">Categories</string>
+    <string name="notification_channels">Notification categories</string>
 
     <!-- [CHAR LIMIT=NONE] App notification settings: non-grouped-channels title -->
     <string name="notification_channels_other">Other</string>
@@ -12431,9 +12447,9 @@
     <!-- Category name "About satellite messaging" [CHAR_LIMIT=NONE] -->
     <string name="category_name_about_satellite_messaging">About <xliff:g id="subject" example="satellite messaging">%1$s</xliff:g></string>
     <!-- Summary for category "About satellite messaging" [CHAR_LIMIT=NONE] -->
-    <string name="title_about_satellite_setting">You can send and receive text messages by satellite as part of an eligible <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> account</string>
+    <string name="title_about_satellite_setting">You can send and receive text messages by satellite with an eligible <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> account</string>
     <!-- Category title "Your mobile plan" [CHAR_LIMIT=NONE] -->
-    <string name="category_title_your_satellite_plan">Your <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> plan</string>
+    <string name="category_title_your_satellite_plan">Your <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> account</string>
     <!-- Title for category "Your mobile plan when satellite is included in plan" [CHAR_LIMIT=NONE] -->
     <string name="title_have_satellite_plan">Messaging is included with your account</string>
     <!-- Title for category "Your mobile plan when satellite is not included in plan" [CHAR_LIMIT=NONE] -->
@@ -12451,7 +12467,7 @@
     <!-- Summary for satellite supported service [CHAR_LIMIT=NONE] -->
     <string name="summary_supported_service">You can text anyone, including emergency services. Your phone will reconnect to a mobile network when available.</string>
     <!-- learn more text - more about satellite messaging [CHAR_LIMIT=NONE] -->
-    <string name="satellite_setting_summary_more_information"><xliff:g id="subject" example="satellite messaging">%1$s</xliff:g> may take longer and is available only in some areas. Weather and certain structures may affect your satellite 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>
+    <string name="satellite_setting_summary_more_information"><xliff:g id="subject" example="satellite messaging">%1$s</xliff:g> may take longer and is available only in some areas. Weather and certain structures may affect your satellite 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">%2$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>
     <!-- Title for satellite warning dialog to avoid user using wifi/bluetooth/airplane mode [CHAR_LIMIT=NONE] -->
diff --git a/res/xml/accessibility_autoclick_settings.xml b/res/xml/accessibility_autoclick_settings.xml
index 72371f3..d3a9514 100644
--- a/res/xml/accessibility_autoclick_settings.xml
+++ b/res/xml/accessibility_autoclick_settings.xml
@@ -80,7 +80,6 @@
         android:key="accessibility_control_autoclick_cursor_area_size"
         android:title="@string/autoclick_cursor_area_size_title"
         android:summary="@string/autoclick_cursor_area_size_summary"
-        settings:seekBarIncrement="20"
         android:selectable="false"
         settings:searchable="false"
         settings:controller="com.android.settings.accessibility.ToggleAutoclickCursorAreaSizeController"/>
diff --git a/res/xml/app_notification_settings.xml b/res/xml/app_notification_settings.xml
index 06d74f6..b91aea9 100644
--- a/res/xml/app_notification_settings.xml
+++ b/res/xml/app_notification_settings.xml
@@ -30,49 +30,21 @@
     <Preference
         android:key="block_desc" />
 
-    <!-- Whether the app can show promoted notifications -->
-    <PreferenceCategory
-        android:title="@string/live_notifications"
-        android:key="promoted_category"
-        android:visibility="gone">
-
-        <com.android.settingslib.RestrictedSwitchPreference
-            android:key="promoted_switch"
-            android:title="@string/live_notifications_switch" />
-
-        <Preference
-            android:key="promoted_desc"
-            android:summary="@string/live_notifications_desc"
-            android:selectable="false"/>
-
-    </PreferenceCategory>
-
     <!-- Conversations added here -->
     <PreferenceCategory
         android:title="@string/conversations_category_title"
         android:key="conversations"
-        android:visibility="gone">
+        android:visibility="gone"
+        android:layout="@layout/empty_view" >
 
     </PreferenceCategory>
-    <com.android.settingslib.RestrictedSwitchPreference
-        android:key="invalid_conversation_switch"
-        android:title="@string/conversation_section_switch_title" />
-    <Preference
-        android:key="invalid_conversation_info"/>
-
-    <!--Bubbles -->
-    <Preference
-        android:key="bubble_pref_link"
-        android:title="@string/notification_bubbles_title"
-        android:icon="@drawable/ic_create_bubble"
-        settings:controller="com.android.settings.notification.app.BubbleSummaryPreferenceController">
-    </Preference>
 
     <!-- Bundles added here -->
     <PreferenceCategory
         android:key="bundles"
         android:title="@string/notification_bundles"
-        android:visibility="gone" />
+        android:visibility="gone"
+        android:layout="@layout/empty_view" />
 
     <!-- Channels/Channel groups added here -->
     <PreferenceCategory
@@ -84,61 +56,78 @@
         android:title="@string/no_recent_channels"
         android:icon="@drawable/ic_expand"/>
 
+    <PreferenceCategory
+        android:key="pre_channels_fields"
+        android:layout="@layout/empty_view"
+        android:visibility="gone" >
     <!-- Importance toggle -->
-    <com.android.settingslib.RestrictedSwitchPreference
-        android:key="allow_sound"
-        android:title="@string/allow_interruption"
-        android:summary="@string/allow_interruption_summary"
-        settings:allowDividerAbove="true"
-        settings:allowDividerBelow="false" />
+        <com.android.settingslib.RestrictedSwitchPreference
+            android:key="allow_sound"
+            android:title="@string/allow_interruption"
+            android:summary="@string/allow_interruption_summary" />
 
-    <!-- Visibility Override -->
-    <com.android.settings.RestrictedListPreference
-        android:key="visibility_override"
-        android:title="@string/app_notification_visibility_override_title"
-        settings:allowDividerAbove="true"
-        settings:allowDividerBelow="false" />
+        <!-- Visibility Override -->
+        <com.android.settings.RestrictedListPreference
+            android:key="visibility_override"
+            android:title="@string/app_notification_visibility_override_title" />
 
-    <!-- Bypass DND -->
-    <com.android.settingslib.RestrictedSwitchPreference
-        android:key="bypass_dnd"
-        android:title="@string/app_notification_override_dnd_title"
-        android:summary="@string/app_notification_override_dnd_summary"
-        settings:allowDividerAbove="true"
-        settings:allowDividerBelow="false" />
+        <!-- Bypass DND -->
+        <com.android.settingslib.RestrictedSwitchPreference
+            android:key="bypass_dnd"
+            android:title="@string/app_notification_override_dnd_title"
+            android:summary="@string/app_notification_override_dnd_summary"/>
+    </PreferenceCategory>
 
-    <!-- Allow full-screen intents -->
-    <com.android.settingslib.RestrictedSwitchPreference
-        android:key="fsi_permission"
-        android:title="@string/app_notification_fsi_permission_title"
-        android:summary="@string/app_notification_fsi_permission_summary"
-        settings:allowDividerAbove="true"
-        settings:allowDividerBelow="false" />
+    <PreferenceCategory
+        android:key="app_wide"
+        android:title="@string/app_notification_settings"
+        settings:isPreferenceVisible="false">
 
-    <!-- Show badge -->
-    <com.android.settingslib.RestrictedSwitchPreference
-        android:key="badge"
-        android:title="@string/notification_badge_title"
-        android:icon="@drawable/ic_notification_dot"
-        settings:useAdditionalSummary="true"
-        settings:restrictedSwitchSummary="@string/enabled_by_admin"
-        android:order="1001"
-        settings:allowDividerAbove="true"
-        settings:allowDividerBelow="false" />
+        <!-- Whether the app can show promoted notifications -->
+        <com.android.settingslib.RestrictedSwitchPreference
+            android:key="promoted_switch"
+            android:title="@string/live_notifications_switch"
+            android:summary="@string/live_notifications_desc" />
 
-    <Preference
-        android:key="app_link"
-        android:icon="@drawable/ic_settings_24dp"
-        android:title="@string/app_settings_link"
-        android:order="1003"
-        settings:allowDividerAbove="true"
-        settings:allowDividerBelow="false" />
+        <com.android.settingslib.RestrictedSwitchPreference
+            android:key="invalid_conversation_switch"
+            android:title="@string/conversation_section_switch_title" />
+        <Preference
+            android:key="invalid_conversation_info"/>
 
-    <com.android.settingslib.widget.FooterPreference
-        android:key="deleted"
-        android:icon="@drawable/ic_trash_can"
-        android:order="8000"
-        settings:allowDividerAbove="true"
-        settings:allowDividerBelow="false" />
+        <!--Bubbles -->
+        <Preference
+            android:key="bubble_pref_link"
+            android:title="@string/notification_bubbles_title"
+            android:icon="@drawable/ic_create_bubble"
+            settings:controller="com.android.settings.notification.app.BubbleSummaryPreferenceController">
+        </Preference>
+
+        <!-- Allow full-screen intents -->
+        <com.android.settingslib.RestrictedSwitchPreference
+            android:key="fsi_permission"
+            android:title="@string/app_notification_fsi_permission_title"
+            android:summary="@string/app_notification_fsi_permission_summary"/>
+
+        <!-- Show badge -->
+        <com.android.settingslib.RestrictedSwitchPreference
+            android:key="badge"
+            android:title="@string/notification_badge_title"
+            android:icon="@drawable/ic_notification_dot"
+            settings:useAdditionalSummary="true"
+            settings:restrictedSwitchSummary="@string/enabled_by_admin"
+            android:order="1001"/>
+
+        <Preference
+            android:key="app_link"
+            android:icon="@drawable/ic_settings_24dp"
+            android:title="@string/app_settings_link"
+            android:order="1003"/>
+
+        <com.android.settingslib.widget.FooterPreference
+            android:key="deleted"
+            android:icon="@drawable/ic_trash_can"
+            android:order="8000"/>
+    </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/res/xml/channel_notification_settings.xml b/res/xml/channel_notification_settings.xml
index a3895e3..a8b536b 100644
--- a/res/xml/channel_notification_settings.xml
+++ b/res/xml/channel_notification_settings.xml
@@ -111,16 +111,18 @@
         android:title="@string/app_notification_override_dnd_title"
         android:summary="@string/app_notification_override_dnd_summary" />
 
-    <Preference
-        android:key="app_link"
-        android:order="18"
-        android:title="@string/app_settings_link"
-        android:icon="@drawable/ic_settings_24dp"
-        settings:allowDividerAbove="true"/>
-
     <com.android.settingslib.widget.FooterPreference
         android:key="block_desc"
-        android:order="110"
-        settings:allowDividerAbove="false"/>
+        android:order="110"/>
+
+    <PreferenceCategory
+        android:key="external"
+        android:order="18"
+        android:layout="@layout/settingslib_preference_category_no_title">
+        <Preference
+            android:key="app_link"
+            android:title="@string/app_settings_link"
+            android:icon="@drawable/ic_settings_24dp"/>
+    </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/res/xml/modes_calls_settings.xml b/res/xml/modes_calls_settings.xml
index b564020..e3a6fca 100644
--- a/res/xml/modes_calls_settings.xml
+++ b/res/xml/modes_calls_settings.xml
@@ -32,9 +32,11 @@
         android:layout_height="16dp"/>
 
     <!-- Repeat callers -->
-    <SwitchPreferenceCompat
-        android:key="zen_mode_repeat_callers"
-        android:title="@string/zen_mode_repeat_callers_title" />
+    <PreferenceCategory>
+        <SwitchPreferenceCompat
+            android:key="zen_mode_repeat_callers"
+            android:title="@string/zen_mode_repeat_callers_title" />
+    </PreferenceCategory>
 
     <com.android.settingslib.widget.FooterPreference
         android:key="info_footer"
diff --git a/res/xml/physical_keyboard_settings.xml b/res/xml/physical_keyboard_settings.xml
index 5691405..b7538c8 100644
--- a/res/xml/physical_keyboard_settings.xml
+++ b/res/xml/physical_keyboard_settings.xml
@@ -24,8 +24,7 @@
         android:title="@string/keyboard_options_category">
         <Preference
             android:key="keyboard_shortcuts_helper"
-            android:title="@string/keyboard_shortcuts_helper"
-            android:summary="@string/keyboard_shortcuts_helper_summary" />
+            android:title="@string/keyboard_shortcuts_helper"/>
 
         <Preference
             android:key="modifier_keys_settings"
diff --git a/res/xml/security_settings_fingerprint.xml b/res/xml/security_settings_fingerprint.xml
index 32f0924..331549c 100644
--- a/res/xml/security_settings_fingerprint.xml
+++ b/res/xml/security_settings_fingerprint.xml
@@ -29,6 +29,14 @@
         android:title="@string/fingerprint_add_title"
         android:icon="@drawable/ic_add_24dp"/>
 
+    <com.android.settingslib.widget.ButtonPreference
+        android:key="key_fingerprint_add_expressive"
+        android:title="@string/add"
+        settings:buttonPreferenceSize="large"
+        settings:buttonPreferenceType="tonal"
+        android:visibility="gone"
+        android:icon="@drawable/ic_add_24dp"/>
+
     <PreferenceCategory
         android:key="security_settings_fingerprint_unlock_category"
         android:title="@string/security_settings_fingerprint_settings_preferences_category"
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index c8011ee..636ef1c 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -424,7 +424,8 @@
         final List<UserHandle> userProfiles = userManager.getUserProfiles();
         String umUserType = getUmUserType(userType);
         for (UserHandle profile : userProfiles) {
-            if (profile.getIdentifier() == UserHandle.myUserId()) {
+            if (!com.android.settings.flags.Flags.utilsReturnUserHandleForCurrentUserId()
+                    && profile.getIdentifier() == UserHandle.myUserId()) {
                 continue;
             }
             final UserInfo userInfo = userManager.getUserInfo(profile.getIdentifier());
diff --git a/src/com/android/settings/accessibility/AccessibilitySettings.java b/src/com/android/settings/accessibility/AccessibilitySettings.java
index 6f0ef9e..c0341cc 100644
--- a/src/com/android/settings/accessibility/AccessibilitySettings.java
+++ b/src/com/android/settings/accessibility/AccessibilitySettings.java
@@ -148,9 +148,7 @@
 
     private final Map<String, PreferenceCategory> mCategoryToPrefCategoryMap =
             new ArrayMap<>();
-    @VisibleForTesting
-    final Map<Preference, PreferenceCategory> mServicePreferenceToPreferenceCategoryMap =
-            new ArrayMap<>();
+    private final List<Preference> mServicePreferences = new ArrayList<>();
     private final Map<ComponentName, PreferenceCategory> mPreBundledServiceComponentToCategoryMap =
             new ArrayMap<>();
 
@@ -372,13 +370,10 @@
         // Since services category is auto generated we have to do a pass
         // to generate it since services can come and go and then based on
         // the global accessibility state to decided whether it is enabled.
-        final ArrayList<Preference> servicePreferences =
-                new ArrayList<>(mServicePreferenceToPreferenceCategoryMap.keySet());
-        for (int i = 0; i < servicePreferences.size(); i++) {
-            Preference service = servicePreferences.get(i);
-            PreferenceCategory category = mServicePreferenceToPreferenceCategoryMap.get(service);
-            category.removePreference(service);
+        for (Preference service : mServicePreferences) {
+            service.getParent().removePreference(service);
         }
+        mServicePreferences.clear();
 
         initializePreBundledServicesMapFromArray(CATEGORY_SCREEN_READER,
                 R.array.config_preinstalled_screen_reader_services);
@@ -423,7 +418,7 @@
                 prefCategory = mPreBundledServiceComponentToCategoryMap.get(componentName);
             }
             prefCategory.addPreference(preference);
-            mServicePreferenceToPreferenceCategoryMap.put(preference, prefCategory);
+            mServicePreferences.add(preference);
         }
 
         // Update the order of all the category according to the order defined in xml file.
diff --git a/src/com/android/settings/accessibility/MagnificationFeedbackPreferenceController.java b/src/com/android/settings/accessibility/MagnificationFeedbackPreferenceController.java
new file mode 100644
index 0000000..bfcd293
--- /dev/null
+++ b/src/com/android/settings/accessibility/MagnificationFeedbackPreferenceController.java
@@ -0,0 +1,85 @@
+/*
+ * 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.accessibility;
+
+import android.content.Context;
+import android.util.Log;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.lifecycle.DefaultLifecycleObserver;
+import androidx.preference.Preference;
+
+import com.android.settings.R;
+import com.android.settings.core.BasePreferenceController;
+import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.overlay.SurveyFeatureProvider;
+
+/**
+ * PreferenceController for magnification feedback preference. This controller manages the
+ * visibility and click behavior of the preference based on the availability of a user survey
+ * related to magnification.
+ */
+public class MagnificationFeedbackPreferenceController extends BasePreferenceController
+        implements DefaultLifecycleObserver {
+    private static final String TAG = "MagnificationFeedbackPreferenceController";
+    public static final String PREF_KEY = "magnification_feedback";
+    public static final String FEEDBACK_KEY = "A11yMagnificationUser";
+    private final DashboardFragment mParent;
+    private final @Nullable SurveyFeatureProvider mSurveyFeatureProvider;
+
+    public MagnificationFeedbackPreferenceController(@NonNull Context context,
+            @NonNull DashboardFragment parent, @NonNull String preferenceKey) {
+        super(context, preferenceKey);
+        mParent = parent;
+        mSurveyFeatureProvider =
+                FeatureFactory.getFeatureFactory().getSurveyFeatureProvider(context);
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return AVAILABLE;
+    }
+
+    @Override
+    public void updateState(@NonNull Preference preference) {
+        super.updateState(preference);
+        if (mSurveyFeatureProvider != null) {
+            mSurveyFeatureProvider.checkSurveyAvailable(
+                    mParent.getViewLifecycleOwner(),
+                    FEEDBACK_KEY,
+                    enabled -> {
+                        final String summary = mContext.getString(enabled
+                                ? R.string.accessibility_feedback_summary
+                                : R.string.accessibility_feedback_disabled_summary);
+                        preference.setSummary(summary);
+                        preference.setEnabled(enabled);
+                    });
+        } else {
+            Log.w(TAG, "SurveyFeatureProvider is not ready");
+        }
+    }
+
+    @Override
+    public boolean handlePreferenceTreeClick(@NonNull Preference preference) {
+        if (mSurveyFeatureProvider != null) {
+            mSurveyFeatureProvider.sendActivityIfAvailable(FEEDBACK_KEY);
+        }
+        return true;
+    }
+}
diff --git a/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeController.java b/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeController.java
index 95016b5..835bd5a 100644
--- a/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeController.java
+++ b/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeController.java
@@ -17,6 +17,7 @@
 package com.android.settings.accessibility;
 
 import static android.content.Context.MODE_PRIVATE;
+import static android.view.accessibility.AccessibilityManager.AUTOCLICK_CURSOR_AREA_INCREMENT_SIZE;
 import static android.view.accessibility.AccessibilityManager.AUTOCLICK_CURSOR_AREA_SIZE_MAX;
 import static android.view.accessibility.AccessibilityManager.AUTOCLICK_CURSOR_AREA_SIZE_MIN;
 
@@ -35,6 +36,7 @@
 
 import com.android.server.accessibility.Flags;
 import com.android.settings.core.SliderPreferenceController;
+import com.android.settingslib.widget.SliderPreference;
 
 /** Controller class that controls accessibility autoclick cursor area size settings. */
 public class ToggleAutoclickCursorAreaSizeController extends SliderPreferenceController
@@ -44,6 +46,7 @@
 
     private final ContentResolver mContentResolver;
     private final SharedPreferences mSharedPreferences;
+    private SliderPreference mPreference;
 
     public ToggleAutoclickCursorAreaSizeController(@NonNull Context context,
             @NonNull String preferenceKey) {
@@ -70,6 +73,13 @@
     @Override
     public void displayPreference(@NonNull PreferenceScreen screen) {
         super.displayPreference(screen);
+        mPreference = screen.findPreference(getPreferenceKey());
+        if (mPreference != null) {
+            mPreference.setMin(getMin());
+            mPreference.setMax(getMax());
+            mPreference.setSliderIncrement(AUTOCLICK_CURSOR_AREA_INCREMENT_SIZE);
+            mPreference.setValue(getSliderPosition());
+        }
     }
 
     @Override
@@ -85,8 +95,9 @@
 
     @Override
     public boolean setSliderPosition(int position) {
-        Settings.Secure.putInt(mContentResolver,
-                Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE, position);
+        int size = validateSize(position);
+        Settings.Secure.putInt(
+                mContentResolver, Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE, size);
         return true;
     }
 
@@ -95,10 +106,7 @@
         int size = Settings.Secure.getInt(mContentResolver,
                 Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE,
                 AccessibilityManager.AUTOCLICK_CURSOR_AREA_SIZE_DEFAULT);
-        // Make sure the size is between min and max allowed value.
-        size = Math.min(size, AUTOCLICK_CURSOR_AREA_SIZE_MAX);
-        size = Math.max(size, AUTOCLICK_CURSOR_AREA_SIZE_MIN);
-        return size;
+        return validateSize(size);
     }
 
     @Override
@@ -110,4 +118,10 @@
     public int getMin() {
         return AUTOCLICK_CURSOR_AREA_SIZE_MIN;
     }
+
+    private int validateSize(int size) {
+        size = Math.min(size, AUTOCLICK_CURSOR_AREA_SIZE_MAX);
+        size = Math.max(size, AUTOCLICK_CURSOR_AREA_SIZE_MIN);
+        return size;
+    }
 }
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 73b31c3..fef83ae 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -196,20 +196,17 @@
 
     @Override
     protected void initSettingsPreference() {
-        // If the device doesn't support window magnification feature, it should hide the
-        // settings preference.
-        if (!isWindowMagnificationSupported(getContext())) {
-            return;
-        }
-
         final PreferenceCategory generalCategory = findPreference(KEY_GENERAL_CATEGORY);
-        // LINT.IfChange(preference_list)
-        addMagnificationModeSetting(generalCategory);
-        addFollowTypingSetting(generalCategory);
-        addOneFingerPanningSetting(generalCategory);
-        addAlwaysOnSetting(generalCategory);
-        addJoystickSetting(generalCategory);
-        // LINT.ThenChange(search_data)
+        if (isWindowMagnificationSupported(getContext())) {
+            // LINT.IfChange(preference_list)
+            addMagnificationModeSetting(generalCategory);
+            addFollowTypingSetting(generalCategory);
+            addOneFingerPanningSetting(generalCategory);
+            addAlwaysOnSetting(generalCategory);
+            addJoystickSetting(generalCategory);
+            // LINT.ThenChange(:search_data)
+        }
+        addFeedbackSetting(generalCategory);
     }
 
     @Override
@@ -346,6 +343,14 @@
         return pref;
     }
 
+    private static Preference createFeedbackPreference(Context context) {
+        final Preference pref = new Preference(context);
+        pref.setTitle(R.string.accessibility_feedback_title);
+        pref.setSummary(R.string.accessibility_feedback_summary);
+        pref.setKey(MagnificationFeedbackPreferenceController.PREF_KEY);
+        return pref;
+    }
+
     private static boolean isJoystickSupported() {
         return DeviceConfig.getBoolean(
                 DeviceConfig.NAMESPACE_WINDOW_MANAGER,
@@ -371,6 +376,21 @@
         addPreferenceController(joystickPreferenceController);
     }
 
+    private void addFeedbackSetting(PreferenceCategory generalCategory) {
+        if (!Flags.enableLowVisionHats()) {
+            return;
+        }
+
+        final Preference feedbackPreference = createFeedbackPreference(getPrefContext());
+        generalCategory.addPreference(feedbackPreference);
+
+        final MagnificationFeedbackPreferenceController magnificationFeedbackPreferenceController =
+                new MagnificationFeedbackPreferenceController(getContext(), this,
+                        MagnificationFeedbackPreferenceController.PREF_KEY);
+        magnificationFeedbackPreferenceController.displayPreference(getPreferenceScreen());
+        addPreferenceController(magnificationFeedbackPreferenceController);
+    }
+
     @Override
     public void showDialog(int dialogId) {
         super.showDialog(dialogId);
@@ -773,7 +793,8 @@
                                     createFollowTypingPreference(context),
                                     createOneFingerPanningPreference(context),
                                     createAlwaysOnPreference(context),
-                                    createJoystickPreference(context)
+                                    createJoystickPreference(context),
+                                    createFeedbackPreference(context)
                             )
                             .forEach(pref ->
                                     rawData.add(createPreferenceSearchData(context, pref)));
@@ -810,9 +831,14 @@
                             niks.add(MagnificationJoystickPreferenceController.PREF_KEY);
                         }
                     }
+
+                    if (!Flags.enableLowVisionHats()) {
+                        niks.add(MagnificationFeedbackPreferenceController.PREF_KEY);
+                    }
+
                     return niks;
                 }
-                // LINT.ThenChange(preference_list)
+                // LINT.ThenChange(:preference_list)
 
                 private SearchIndexableRaw createPreferenceSearchData(
                         Context context, Preference pref) {
diff --git a/src/com/android/settings/accessibility/VibrationMainSwitchPreference.kt b/src/com/android/settings/accessibility/VibrationMainSwitchPreference.kt
index 4f1eec2..a9a0516 100644
--- a/src/com/android/settings/accessibility/VibrationMainSwitchPreference.kt
+++ b/src/com/android/settings/accessibility/VibrationMainSwitchPreference.kt
@@ -30,6 +30,7 @@
 import com.android.settingslib.metadata.PreferenceLifecycleContext
 import com.android.settingslib.metadata.PreferenceLifecycleProvider
 import com.android.settingslib.metadata.ReadWritePermit
+import com.android.settingslib.metadata.SensitivityLevel
 
 /** Accessibility settings for vibration. */
 // LINT.IfChange
@@ -62,6 +63,9 @@
         callingUid: Int,
     ) = ReadWritePermit.ALLOW
 
+    override val sensitivityLevel: Int
+        get() = SensitivityLevel.NO_SENSITIVITY
+
     override fun onResume(context: PreferenceLifecycleContext) {
         vibrator = context.getSystemService(Vibrator::class.java)
         context
diff --git a/src/com/android/settings/applications/AppStorageSizesController.java b/src/com/android/settings/applications/AppStorageSizesController.java
index 43734b2..7cf86f8 100644
--- a/src/com/android/settings/applications/AppStorageSizesController.java
+++ b/src/com/android/settings/applications/AppStorageSizesController.java
@@ -17,7 +17,6 @@
 package com.android.settings.applications;
 
 import android.content.Context;
-import android.text.format.Formatter;
 
 import androidx.annotation.Nullable;
 import androidx.annotation.StringRes;
@@ -25,6 +24,7 @@
 
 import com.android.internal.util.Preconditions;
 import com.android.settingslib.applications.StorageStatsSource;
+import com.android.settingslib.spaprivileged.model.app.AppStorageRepositoryImpl;
 
 /**
  * Handles setting the sizes for the app info screen.
@@ -70,27 +70,28 @@
             mCacheSize.setSummary(errorRes);
             mTotalSize.setSummary(errorRes);
         } else {
+            var appStorageRepository = new AppStorageRepositoryImpl(context);
             long codeSize = mLastResult.getCodeBytes();
             long dataSize =
                     mDataCleared ? 0 : mLastResult.getDataBytes() - mLastResult.getCacheBytes();
             if (mLastCodeSize != codeSize) {
                 mLastCodeSize = codeSize;
-                mAppSize.setSummary(getSizeStr(context, codeSize));
+                mAppSize.setSummary(appStorageRepository.formatSizeBytes(codeSize));
             }
             if (mLastDataSize != dataSize) {
                 mLastDataSize = dataSize;
-                mDataSize.setSummary(getSizeStr(context, dataSize));
+                mDataSize.setSummary(appStorageRepository.formatSizeBytes(dataSize));
             }
             long cacheSize = (mDataCleared || mCachedCleared) ? 0 : mLastResult.getCacheBytes();
             if (mLastCacheSize != cacheSize) {
                 mLastCacheSize = cacheSize;
-                mCacheSize.setSummary(getSizeStr(context, cacheSize));
+                mCacheSize.setSummary(appStorageRepository.formatSizeBytes(cacheSize));
             }
 
             long totalSize = codeSize + dataSize + cacheSize;
             if (mLastTotalSize != totalSize) {
                 mLastTotalSize = totalSize;
-                mTotalSize.setSummary(getSizeStr(context, totalSize));
+                mTotalSize.setSummary(appStorageRepository.formatSizeBytes(totalSize));
             }
         }
     }
@@ -129,10 +130,6 @@
         return mLastResult;
     }
 
-    private String getSizeStr(Context context, long size) {
-        return Formatter.formatFileSize(context, size);
-    }
-
     public static class Builder {
         private Preference mTotalSize;
         private Preference mAppSize;
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java b/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
index 8d6f3cb..e50b0e5 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
@@ -99,7 +99,9 @@
 import com.android.settingslib.core.AbstractPreferenceController;
 import com.android.settingslib.search.SearchIndexable;
 import com.android.settingslib.transition.SettingsTransitionHelper;
+import com.android.settingslib.widget.ButtonPreference;
 import com.android.settingslib.widget.FooterPreference;
+import com.android.settingslib.widget.SettingsThemeHelper;
 import com.android.settingslib.widget.TwoTargetPreference;
 
 import com.google.android.setupdesign.util.DeviceHelper;
@@ -250,6 +252,8 @@
                 "key_fingerprint_check_enrolled";
         @VisibleForTesting
         static final String KEY_FINGERPRINT_ADD = "key_fingerprint_add";
+        @VisibleForTesting
+        static final String KEY_FINGERPRINT_ADD_EXPRESSIVE = "key_fingerprint_add_expressive";
         private static final String KEY_FINGERPRINT_ENABLE_KEYGUARD_TOGGLE =
                 "fingerprint_enable_keyguard_toggle";
         private static final String KEY_LAUNCHED_CONFIRM = "launched_confirm";
@@ -325,6 +329,8 @@
         @Nullable
         private UdfpsEnrollCalibrator mCalibrator;
 
+        private boolean mIsExpressiveThemeStyle;
+
         FingerprintAuthenticateSidecar.Listener mAuthenticateListener =
                 new FingerprintAuthenticateSidecar.Listener() {
                     @Override
@@ -471,6 +477,7 @@
         @Override
         public void onCreate(Bundle savedInstanceState) {
             super.onCreate(savedInstanceState);
+            mIsExpressiveThemeStyle = SettingsThemeHelper.isExpressiveTheme(getPrefContext());
 
             Activity activity = getActivity();
             mFingerprintManager = Utils.getFingerprintManagerOrNull(activity);
@@ -679,7 +686,8 @@
                 mFingerprintsEnrolledCategory.removeAll();
             }
 
-            String keyToReturn = KEY_FINGERPRINT_ADD;
+            String keyToReturn = mIsExpressiveThemeStyle
+                    ? KEY_FINGERPRINT_ADD_EXPRESSIVE : KEY_FINGERPRINT_ADD;
             final List<Fingerprint> items = mFingerprintManager.getEnrolledFingerprints(mUserId);
             final int fingerprintCount = items.size();
             for (int i = 0; i < fingerprintCount; i++) {
@@ -715,13 +723,30 @@
                 mFingerprintsEnrolledCategory.addPreference(pref);
                 pref.setOnPreferenceChangeListener(this);
             }
-            mAddFingerprintPreference = findPreference(KEY_FINGERPRINT_ADD);
+            mAddFingerprintPreference = findPreference(mIsExpressiveThemeStyle
+                    ? KEY_FINGERPRINT_ADD_EXPRESSIVE : KEY_FINGERPRINT_ADD);
             setupAddFingerprintPreference();
             return keyToReturn;
         }
 
         private void setupAddFingerprintPreference() {
             mAddFingerprintPreference.setOnPreferenceChangeListener(this);
+            if (mIsExpressiveThemeStyle
+                    && (mAddFingerprintPreference instanceof ButtonPreference)) {
+                ((ButtonPreference) mAddFingerprintPreference).setOnClickListener(view -> {
+                    mIsEnrolling = true;
+                    Intent intent = new Intent();
+                    intent.setClassName(SETTINGS_PACKAGE_NAME,
+                            FingerprintEnroll.AddAdditionalFingerprint.class.getName());
+                    intent.putExtra(Intent.EXTRA_USER_ID, mUserId);
+                    intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN, mToken);
+                    if (mCalibrator != null) {
+                        intent.putExtras(mCalibrator.getExtrasForNextIntent());
+                    }
+                    startActivityForResult(intent, ADD_FINGERPRINT_REQUEST);
+                });
+            }
+
             updateAddPreference();
         }
 
@@ -803,12 +828,15 @@
                 return; // Activity went away
             }
 
-            mAddFingerprintPreference = findPreference(KEY_FINGERPRINT_ADD);
+            mAddFingerprintPreference = findPreference(
+                    mIsExpressiveThemeStyle ? KEY_FINGERPRINT_ADD_EXPRESSIVE : KEY_FINGERPRINT_ADD);
 
             if (mAddFingerprintPreference == null) {
                 return; // b/275519315 Skip if updateAddPreference() invoke before addPreference()
             }
 
+            updateAddingButtonStyle();
+
             /* Disable preference if too many fingerprints added */
             final int max = getContext().getResources().getInteger(
                     com.android.internal.R.integer.config_fingerprintMaxTemplatesPerUser);
@@ -828,6 +856,20 @@
                     && !tooMany && !removalInProgress && mToken != null);
         }
 
+        private void updateAddingButtonStyle() {
+            final Preference nonExpressiveBtnPreference = findPreference(KEY_FINGERPRINT_ADD);
+            final ButtonPreference expressiveBtnPreference =
+                    findPreference(KEY_FINGERPRINT_ADD_EXPRESSIVE);
+
+            if (nonExpressiveBtnPreference != null) {
+                nonExpressiveBtnPreference.setVisible(!mIsExpressiveThemeStyle);
+            }
+
+            if (expressiveBtnPreference != null) {
+                expressiveBtnPreference.setVisible(mIsExpressiveThemeStyle);
+            }
+        }
+
         private void createFooterPreference(PreferenceGroup root) {
             final Context context = getActivity();
             if (context == null) {
@@ -925,11 +967,11 @@
         @Override
         public boolean onPreferenceTreeClick(Preference pref) {
             final String key = pref.getKey();
-            if (KEY_FINGERPRINT_ADD.equals(key)) {
+            if (!mIsExpressiveThemeStyle && KEY_FINGERPRINT_ADD.equals(key)) {
                 mIsEnrolling = true;
                 Intent intent = new Intent();
                 intent.setClassName(SETTINGS_PACKAGE_NAME,
-                    FingerprintEnroll.AddAdditionalFingerprint.class.getName());
+                        FingerprintEnroll.AddAdditionalFingerprint.class.getName());
                 intent.putExtra(Intent.EXTRA_USER_ID, mUserId);
                 intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN, mToken);
                 if (mCalibrator != null) {
diff --git a/src/com/android/settings/connecteddevice/BluetoothPreference.kt b/src/com/android/settings/connecteddevice/BluetoothPreference.kt
index 4d4853e..8c12024 100644
--- a/src/com/android/settings/connecteddevice/BluetoothPreference.kt
+++ b/src/com/android/settings/connecteddevice/BluetoothPreference.kt
@@ -34,9 +34,9 @@
 import com.android.settings.widget.MainSwitchBarMetadata
 import com.android.settingslib.WirelessUtils
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.Permissions
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.metadata.PreferenceMetadata
 import com.android.settingslib.metadata.ReadWritePermit
 import com.android.settingslib.metadata.SensitivityLevel
@@ -152,7 +152,14 @@
             broadcastReceiver =
                 object : BroadcastReceiver() {
                     override fun onReceive(context: Context, intent: Intent) {
-                        notifyChange(KEY, DataChangeReason.UPDATE)
+                        val state =
+                            intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR)
+                        if (
+                            state == BluetoothAdapter.STATE_ON ||
+                                state == BluetoothAdapter.STATE_OFF
+                        ) {
+                            notifyChange(KEY, PreferenceChangeReason.STATE)
+                        }
                     }
                 }
             context.registerReceiver(
diff --git a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java
index 719d6cb..3130a0c 100644
--- a/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java
+++ b/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java
@@ -52,6 +52,7 @@
 import com.android.settingslib.bluetooth.LocalBluetoothManager;
 import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
 import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
+import com.android.settingslib.flags.Flags;
 import com.android.settingslib.utils.ThreadUtils;
 
 import com.google.common.collect.ImmutableList;
@@ -63,6 +64,7 @@
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
 
 /** PreferenceController to control the dialog to choose the active device for calls and alarms */
 public class AudioSharingCallAudioPreferenceController extends AudioSharingBasePreferenceController
@@ -379,11 +381,21 @@
 
     private void updateDeviceItemsInSharingSession() {
         mGroupedConnectedDevices = AudioSharingUtils.fetchConnectedDevicesByGroupId(mBtManager);
+        if (Flags.enableTemporaryBondDevicesUi()) {
+            mGroupedConnectedDevices =
+                    mGroupedConnectedDevices.entrySet().stream()
+                            .filter(entry -> !anyTemporaryBondDevice(entry.getValue()))
+                            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
+        }
         mDeviceItemsInSharingSession =
                 AudioSharingUtils.buildOrderedConnectedLeadAudioSharingDeviceItem(
                         mBtManager, mGroupedConnectedDevices, /* filterByInSharing= */ true);
     }
 
+    private boolean anyTemporaryBondDevice(List<BluetoothDevice> connectedDevices) {
+        return connectedDevices.stream().anyMatch(BluetoothUtils::isTemporaryBondDevice);
+    }
+
     @Nullable
     private Pair<Integer, AudioSharingDeviceItem> getActiveItemWithIndex() {
         List<AudioSharingDeviceItem> deviceItems = new ArrayList<>(mDeviceItemsInSharingSession);
diff --git a/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedState.java b/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedState.java
index dffb235..bdb62e8 100644
--- a/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedState.java
+++ b/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedState.java
@@ -18,9 +18,12 @@
 
 import android.app.AlertDialog;
 import android.bluetooth.BluetoothLeBroadcastMetadata;
+import android.text.Editable;
+import android.text.TextWatcher;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.widget.Button;
 import android.widget.EditText;
 import android.widget.TextView;
 
@@ -109,6 +112,20 @@
                                     controller.handleSourceAddRequest(preference, metadata);
                                 })
                         .create();
+        EditText editText = layout.requireViewById(R.id.broadcast_edit_text);
+        editText.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+                alertDialog.getButton(AlertDialog.BUTTON_POSITIVE)
+                        .setEnabled(s.length() >= 4 && s.length() <= 16);
+            }
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+            @Override
+            public void afterTextChanged(Editable s) {}
+        });
         alertDialog.show();
+        Button positiveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
+        positiveButton.setEnabled(false);
     }
 }
diff --git a/src/com/android/settings/core/BasePreferenceController.java b/src/com/android/settings/core/BasePreferenceController.java
index 3f91fb7..156b062 100644
--- a/src/com/android/settings/core/BasePreferenceController.java
+++ b/src/com/android/settings/core/BasePreferenceController.java
@@ -29,6 +29,7 @@
 import android.text.TextUtils;
 import android.util.Log;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceScreen;
@@ -194,7 +195,7 @@
         }
     }
 
-    public BasePreferenceController(Context context, String preferenceKey) {
+    public BasePreferenceController(@NonNull Context context, @NonNull String preferenceKey) {
         super(context);
         mPreferenceKey = preferenceKey;
         mPrefVisibility = true;
diff --git a/src/com/android/settings/core/SliderPreferenceController.java b/src/com/android/settings/core/SliderPreferenceController.java
index 8c936f2..9cd4697 100644
--- a/src/com/android/settings/core/SliderPreferenceController.java
+++ b/src/com/android/settings/core/SliderPreferenceController.java
@@ -16,6 +16,7 @@
 
 import android.content.Context;
 
+import androidx.annotation.NonNull;
 import androidx.preference.Preference;
 import androidx.slice.builders.SliceAction;
 
@@ -24,7 +25,7 @@
 public abstract class SliderPreferenceController extends BasePreferenceController implements
         Preference.OnPreferenceChangeListener {
 
-    public SliderPreferenceController(Context context, String preferenceKey) {
+    public SliderPreferenceController(@NonNull Context context, @NonNull String preferenceKey) {
         super(context, preferenceKey);
     }
 
diff --git a/src/com/android/settings/core/TogglePreferenceController.java b/src/com/android/settings/core/TogglePreferenceController.java
index 459312a..8889f8d 100644
--- a/src/com/android/settings/core/TogglePreferenceController.java
+++ b/src/com/android/settings/core/TogglePreferenceController.java
@@ -15,13 +15,14 @@
 
 import android.content.Context;
 
+import androidx.annotation.NonNull;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceScreen;
 import androidx.preference.TwoStatePreference;
 
+import com.android.settings.onboarding.OnboardingFeatureProvider;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.slices.SliceData;
-import com.android.settings.onboarding.OnboardingFeatureProvider;
 import com.android.settings.widget.TwoStateButtonPreference;
 import com.android.settingslib.PrimarySwitchPreference;
 import com.android.settingslib.core.instrumentation.SettingsJankMonitor;
@@ -37,7 +38,7 @@
 
     private static final String TAG = "TogglePrefController";
 
-    public TogglePreferenceController(Context context, String preferenceKey) {
+    public TogglePreferenceController(@NonNull Context context, @NonNull String preferenceKey) {
         super(context, preferenceKey);
     }
 
diff --git a/src/com/android/settings/datausage/DataSaverMainSwitchPreference.kt b/src/com/android/settings/datausage/DataSaverMainSwitchPreference.kt
index a05bd87..e73fe94 100644
--- a/src/com/android/settings/datausage/DataSaverMainSwitchPreference.kt
+++ b/src/com/android/settings/datausage/DataSaverMainSwitchPreference.kt
@@ -21,9 +21,9 @@
 import com.android.settings.R
 import com.android.settings.widget.MainSwitchBarMetadata
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.Permissions
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.metadata.PreferenceLifecycleProvider
 import com.android.settingslib.metadata.ReadWritePermit
 import com.android.settingslib.metadata.SensitivityLevel
@@ -36,6 +36,9 @@
     override val title
         get() = R.string.data_saver_switch_title
 
+    override val disableWidgetOnCheckedChanged: Boolean
+        get() = false
+
     override fun storage(context: Context) = createDataStore(context)
 
     override fun getReadPermissions(context: Context) =
@@ -75,7 +78,7 @@
         override fun onLastObserverRemoved() = dataSaverBackend.remListener(this)
 
         override fun onDataSaverChanged(isDataSaving: Boolean) =
-            notifyChange(KEY, DataChangeReason.UPDATE)
+            notifyChange(KEY, PreferenceChangeReason.VALUE)
     }
 
     companion object {
diff --git a/src/com/android/settings/development/linuxterminal/LinuxTerminalPreferenceController.java b/src/com/android/settings/development/linuxterminal/LinuxTerminalPreferenceController.java
index 3bd9587..0835081 100644
--- a/src/com/android/settings/development/linuxterminal/LinuxTerminalPreferenceController.java
+++ b/src/com/android/settings/development/linuxterminal/LinuxTerminalPreferenceController.java
@@ -34,8 +34,6 @@
 import com.android.settings.core.PreferenceControllerMixin;
 import com.android.settingslib.development.DeveloperOptionsPreferenceController;
 
-import java.util.Objects;
-
 /** Preference controller for Linux terminal option in developers option */
 public class LinuxTerminalPreferenceController extends DeveloperOptionsPreferenceController
         implements PreferenceControllerMixin {
@@ -59,13 +57,15 @@
         mTerminalPackageName =
                 isPackageInstalled(context.getPackageManager(), packageName) ? packageName : null;
 
-        StorageManager storageManager =
-                Objects.requireNonNull(context.getSystemService(StorageManager.class));
+        StorageManager storageManager = context.getSystemService(StorageManager.class);
         VirtualMachineManager virtualMachineManager =
-                Objects.requireNonNull(context.getSystemService(VirtualMachineManager.class));
+                context.getSystemService(VirtualMachineManager.class);
+
         mIsDeviceCapable =
                 getTotalMemory() >= MEMORY_MIN_BYTES
+                        && storageManager != null
                         && storageManager.getPrimaryStorageSize() >= STORAGE_MIN_BYTES
+                        && virtualMachineManager != null
                         && ((virtualMachineManager.getCapabilities() & CAPABILITY_NON_PROTECTED_VM)
                                 != 0);
     }
diff --git a/src/com/android/settings/display/BrightnessLevelPreference.kt b/src/com/android/settings/display/BrightnessLevelPreference.kt
index f87edcb..e14db6b 100644
--- a/src/com/android/settings/display/BrightnessLevelPreference.kt
+++ b/src/com/android/settings/display/BrightnessLevelPreference.kt
@@ -33,7 +33,6 @@
 import com.android.settings.core.SettingsBaseActivity
 import com.android.settingslib.RestrictedPreference
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.HandlerExecutor
 import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.KeyedObserver
@@ -43,6 +42,7 @@
 import com.android.settingslib.display.BrightnessUtils.GAMMA_SPACE_MIN
 import com.android.settingslib.display.BrightnessUtils.convertLinearToGammaFloat
 import com.android.settingslib.metadata.PersistentPreference
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.metadata.PreferenceMetadata
 import com.android.settingslib.metadata.PreferenceSummaryProvider
 import com.android.settingslib.metadata.RangeValue
@@ -155,7 +155,7 @@
         }
 
         override fun onKeyChanged(key: String, reason: Int) {
-            notifyChange(KEY, DataChangeReason.UPDATE)
+            notifyChange(KEY, reason)
         }
 
         override fun onDisplayAdded(displayId: Int) {}
@@ -163,7 +163,7 @@
         override fun onDisplayRemoved(displayId: Int) {}
 
         override fun onDisplayChanged(displayId: Int) {
-            notifyChange(KEY, DataChangeReason.UPDATE)
+            notifyChange(KEY, PreferenceChangeReason.STATE)
         }
     }
 
diff --git a/src/com/android/settings/display/darkmode/DarkModeStorage.kt b/src/com/android/settings/display/darkmode/DarkModeStorage.kt
index 9c53379..768a552 100644
--- a/src/com/android/settings/display/darkmode/DarkModeStorage.kt
+++ b/src/com/android/settings/display/darkmode/DarkModeStorage.kt
@@ -24,8 +24,8 @@
 import android.content.res.Configuration
 import android.os.PowerManager
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.KeyValueStore
+import com.android.settingslib.metadata.PreferenceChangeReason
 
 /**
  * Abstract storage for dark mode settings.
@@ -54,7 +54,7 @@
         broadcastReceiver =
             object : BroadcastReceiver() {
                 override fun onReceive(context: Context, intent: Intent) {
-                    notifyChange(DataChangeReason.UPDATE)
+                    notifyChange(PreferenceChangeReason.STATE)
                 }
             }
         context.registerReceiver(
@@ -63,7 +63,7 @@
         )
 
         darkModeObserver = DarkModeObserver(context)
-        darkModeObserver.subscribe { notifyChange(DataChangeReason.UPDATE) }
+        darkModeObserver.subscribe { notifyChange(PreferenceChangeReason.VALUE) }
     }
 
     override fun onLastObserverRemoved() {
diff --git a/src/com/android/settings/dream/DreamSettings.java b/src/com/android/settings/dream/DreamSettings.java
index 4854fc6..c237061 100644
--- a/src/com/android/settings/dream/DreamSettings.java
+++ b/src/com/android/settings/dream/DreamSettings.java
@@ -17,10 +17,6 @@
 package com.android.settings.dream;
 
 import static com.android.settings.dream.DreamMainSwitchPreferenceController.MAIN_SWITCH_PREF_KEY;
-import static com.android.settingslib.dream.DreamBackend.EITHER;
-import static com.android.settingslib.dream.DreamBackend.NEVER;
-import static com.android.settingslib.dream.DreamBackend.WHILE_CHARGING;
-import static com.android.settingslib.dream.DreamBackend.WHILE_DOCKED;
 
 import android.app.settings.SettingsEnums;
 import android.content.Context;
@@ -57,6 +53,7 @@
     static final String WHILE_CHARGING_ONLY = "while_charging_only";
     static final String WHILE_DOCKED_ONLY = "while_docked_only";
     static final String EITHER_CHARGING_OR_DOCKED = "either_charging_or_docked";
+    static final String WHILE_POSTURED_ONLY = "while_postured_only";
     static final String NEVER_DREAM = "never";
 
     private MainSwitchPreference mMainSwitchPreference;
@@ -75,26 +72,30 @@
     static int getSettingFromPrefKey(String key) {
         switch (key) {
             case WHILE_CHARGING_ONLY:
-                return WHILE_CHARGING;
+                return DreamBackend.WHILE_CHARGING;
             case WHILE_DOCKED_ONLY:
-                return WHILE_DOCKED;
+                return DreamBackend.WHILE_DOCKED;
             case EITHER_CHARGING_OR_DOCKED:
-                return EITHER;
+                return DreamBackend.WHILE_CHARGING_OR_DOCKED;
+            case WHILE_POSTURED_ONLY:
+                return DreamBackend.WHILE_POSTURED;
             case NEVER_DREAM:
             default:
-                return NEVER;
+                return DreamBackend.NEVER;
         }
     }
 
     static String getKeyFromSetting(@WhenToDream int dreamSetting) {
         switch (dreamSetting) {
-            case WHILE_CHARGING:
+            case DreamBackend.WHILE_CHARGING:
                 return WHILE_CHARGING_ONLY;
-            case WHILE_DOCKED:
+            case DreamBackend.WHILE_DOCKED:
                 return WHILE_DOCKED_ONLY;
-            case EITHER:
+            case DreamBackend.WHILE_CHARGING_OR_DOCKED:
                 return EITHER_CHARGING_OR_DOCKED;
-            case NEVER:
+            case DreamBackend.WHILE_POSTURED:
+                return WHILE_POSTURED_ONLY;
+            case DreamBackend.NEVER:
             default:
                 return NEVER_DREAM;
         }
@@ -103,14 +104,17 @@
     static int getDreamSettingDescriptionResId(@WhenToDream int dreamSetting,
             boolean enabledOnBattery) {
         switch (dreamSetting) {
-            case WHILE_CHARGING:
+            case DreamBackend.WHILE_CHARGING:
                 return R.string.screensaver_settings_summary_sleep;
-            case WHILE_DOCKED:
+            case DreamBackend.WHILE_DOCKED:
                 return enabledOnBattery ? R.string.screensaver_settings_summary_dock
                         : R.string.screensaver_settings_summary_dock_and_charging;
-            case EITHER:
+            case DreamBackend.WHILE_CHARGING_OR_DOCKED:
                 return R.string.screensaver_settings_summary_either_long;
-            case NEVER:
+            case DreamBackend.WHILE_POSTURED:
+                return enabledOnBattery ? R.string.screensaver_settings_summary_postured
+                        : R.string.screensaver_settings_summary_postured_and_charging;
+            case DreamBackend.NEVER:
             default:
                 return R.string.screensaver_settings_summary_never;
         }
diff --git a/src/com/android/settings/dream/WhenToDreamPicker.java b/src/com/android/settings/dream/WhenToDreamPicker.java
index 3052d20..b3b0c90 100644
--- a/src/com/android/settings/dream/WhenToDreamPicker.java
+++ b/src/com/android/settings/dream/WhenToDreamPicker.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.dream;
 
+import static android.service.dreams.Flags.allowDreamWhenPostured;
+
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.graphics.drawable.Drawable;
@@ -65,7 +67,11 @@
         }
 
         for (int i = 0; i < entries.length; i++) {
-            candidates.add(new WhenToDreamCandidateInfo(entries[i], values[i]));
+            final String key = values[i];
+            if (DreamSettings.WHILE_POSTURED_ONLY.equals(key) && !allowDreamWhenPostured()) {
+                continue;
+            }
+            candidates.add(new WhenToDreamCandidateInfo(entries[i], key));
         }
 
         return candidates;
diff --git a/src/com/android/settings/fuelgauge/BatteryHeaderPreference.kt b/src/com/android/settings/fuelgauge/BatteryHeaderPreference.kt
index 9029a85..f0a3ae6 100644
--- a/src/com/android/settings/fuelgauge/BatteryHeaderPreference.kt
+++ b/src/com/android/settings/fuelgauge/BatteryHeaderPreference.kt
@@ -32,6 +32,7 @@
 import com.android.settingslib.metadata.PreferenceMetadata
 import com.android.settingslib.metadata.RangeValue
 import com.android.settingslib.metadata.ReadWritePermit
+import com.android.settingslib.metadata.SensitivityLevel
 import com.android.settingslib.preference.PreferenceBinding
 import com.android.settingslib.widget.UsageProgressBarPreference
 
@@ -113,6 +114,9 @@
     override fun getWritePermit(context: Context, value: Int?, callingPid: Int, callingUid: Int) =
         ReadWritePermit.DISALLOW
 
+    override val sensitivityLevel: Int
+        get() = SensitivityLevel.NO_SENSITIVITY
+
     companion object {
         private const val KEY = "battery_header"
         private const val BATTERY_MAX_LEVEL: Long = 100L
diff --git a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverPreference.kt b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverPreference.kt
index be3a3b8..3e5cee9 100644
--- a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverPreference.kt
+++ b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverPreference.kt
@@ -22,7 +22,6 @@
 import com.android.settings.fuelgauge.BatterySaverReceiver
 import com.android.settings.fuelgauge.BatterySaverReceiver.BatterySaverListener
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.Permissions
 import com.android.settingslib.fuelgauge.BatterySaverLogging.SAVER_ENABLED_SETTINGS
@@ -30,6 +29,7 @@
 import com.android.settingslib.fuelgauge.BatteryStatus
 import com.android.settingslib.fuelgauge.BatteryUtils
 import com.android.settingslib.metadata.MainSwitchPreference
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.metadata.ReadWritePermit
 import com.android.settingslib.metadata.SensitivityLevel
 import kotlinx.coroutines.CoroutineScope
@@ -105,12 +105,12 @@
         override fun onPowerSaveModeChanged() {
             scope.launch {
                 delay(SWITCH_ANIMATION_DURATION)
-                notifyChange(KEY, DataChangeReason.UPDATE)
+                notifyChange(KEY, PreferenceChangeReason.VALUE)
             }
         }
 
         override fun onBatteryChanged(pluggedIn: Boolean) =
-            notifyChange(KEY, DataChangeReason.UPDATE)
+            notifyChange(KEY, PreferenceChangeReason.STATE)
     }
 
     companion object {
diff --git a/src/com/android/settings/inputmethod/MouseKeysImageListAdapter.java b/src/com/android/settings/inputmethod/MouseKeysImageListAdapter.java
index 65024b1..43e03b1 100644
--- a/src/com/android/settings/inputmethod/MouseKeysImageListAdapter.java
+++ b/src/com/android/settings/inputmethod/MouseKeysImageListAdapter.java
@@ -38,6 +38,7 @@
 
 public class MouseKeysImageListAdapter extends
         RecyclerView.Adapter<MouseKeysImageListAdapter.MouseKeyImageViewHolder> {
+    private static final String LABEL_DELIMITER = ", ";
     private static final ImmutableList<Integer> DRAWABLE_LIST = ImmutableList.of(
             R.drawable.mouse_keys_directional, R.drawable.mouse_keys_click,
             R.drawable.mouse_keys_press_hold, R.drawable.mouse_keys_release,
@@ -93,7 +94,7 @@
         List<String> directionalLabelList = DIRECTIONAL_CHAR_KEYCODE_LIST.stream().map(
                 (key) -> getDisplayLabel(currentInputDevice, key)).toList();
         mComposedSummaryList.add(context.getString(R.string.mouse_keys_directional_summary,
-                String.join(",", directionalLabelList)));
+                String.join(LABEL_DELIMITER, directionalLabelList)));
         String leftClickLabel = getDisplayLabel(currentInputDevice, LEFT_CLICK_CHAR_KEYCODE);
         mComposedSummaryList.add(
                 context.getString(R.string.mouse_keys_click_summary, leftClickLabel));
@@ -107,7 +108,8 @@
                 (key) -> getDisplayLabel(currentInputDevice, key)).toList();
         mComposedSummaryList.add(context.getString(R.string.mouse_keys_toggle_scroll_summary,
                 toggleScrollLabelList.getFirst(),
-                String.join(",", toggleScrollLabelList.subList(1, toggleScrollLabelList.size()))
+                String.join(LABEL_DELIMITER,
+                        toggleScrollLabelList.subList(1, toggleScrollLabelList.size()))
         ));
         String rightClickLabel = getDisplayLabel(currentInputDevice, RIGHT_CLICK_CHAR_KEYCODE);
         mComposedSummaryList.add(
diff --git a/src/com/android/settings/inputmethod/TouchpadGestureDialogFragment.java b/src/com/android/settings/inputmethod/TouchpadGestureDialogFragment.java
index ba753a8..3a0effc 100644
--- a/src/com/android/settings/inputmethod/TouchpadGestureDialogFragment.java
+++ b/src/com/android/settings/inputmethod/TouchpadGestureDialogFragment.java
@@ -37,6 +37,7 @@
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 
+import androidx.annotation.NonNull;
 import androidx.viewpager.widget.PagerAdapter;
 import androidx.viewpager.widget.ViewPager;
 
@@ -51,10 +52,6 @@
 public class TouchpadGestureDialogFragment extends BottomSheetDialogFragment {
 
     private Context mContext;
-    private LayoutInflater mInflater;
-    private View mViewArrowPrevious;
-    private View mViewArrowNext;
-    private ViewPager mViewPager;
     private ArrayList<View> mPageList;
     private ImageView[] mDotIndicators;
     private View[] mViewPagerItems;
@@ -68,7 +65,7 @@
     private static final int DOT_INDICATOR_RIGHT_PADDING = 6;
 
     @Override
-    public void onAttach(Context context) {
+    public void onAttach(@NonNull Context context) {
         super.onAttach(context);
         mContext = context;
     }
@@ -111,13 +108,14 @@
         window.setNavigationBarColor(Color.TRANSPARENT);
     }
 
+    @NonNull
     @Override
     public Dialog onCreateDialog(final Bundle savedInstanceState) {
         Dialog dialog = super.onCreateDialog(savedInstanceState);
 
-        mInflater = mContext.getSystemService(LayoutInflater.class);
-        View contentView = mInflater.inflate(R.layout.touchpad_gesture_preview, null);
-        addViewPager(contentView);
+        LayoutInflater inflater = mContext.getSystemService(LayoutInflater.class);
+        View contentView = inflater.inflate(R.layout.touchpad_gesture_preview, null);
+        addViewPager(contentView, inflater);
         dialog.setContentView(contentView);
         Window gestureDialogWindow = dialog.getWindow();
         gestureDialogWindow.setType(TYPE_SYSTEM_DIALOG);
@@ -145,7 +143,7 @@
         // The gesture education view shouldn't be draggable."
         behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
             @Override
-            public void onStateChanged(View bottomSheet, int newState) {
+            public void onStateChanged(@NonNull View bottomSheet, int newState) {
                 if (newState == BottomSheetBehavior.STATE_DRAGGING) {
                     if (isGestureNavigationEnabled()) {
                         behavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
@@ -156,7 +154,7 @@
             }
 
             @Override
-            public void onSlide(View bottomSheet, float slideOffset) {
+            public void onSlide(@NonNull View bottomSheet, float slideOffset) {
                 // Do nothing.
             }
         });
@@ -174,13 +172,12 @@
                         R.layout.gesture_tip5_switch_apps));
     }
 
-    private void addViewPager(View preview) {
-        mViewPager = preview.findViewById(R.id.viewpager);
+    private void addViewPager(View preview, LayoutInflater inflater) {
+        ViewPager viewPager = preview.findViewById(R.id.viewpager);
         int viewPagerResourceSize = getViewPagerResource().size();
         mViewPagerItems = new View[viewPagerResourceSize];
         for (int i = 0; i < viewPagerResourceSize; i++) {
-            mViewPagerItems[i] =
-                    mInflater.inflate(getViewPagerResource().get(i), null /* root */);
+            mViewPagerItems[i] = inflater.inflate(getViewPagerResource().get(i), null /* root */);
         }
 
         mPageList = new ArrayList<View>();
@@ -188,12 +185,12 @@
             mPageList.add(mViewPagerItems[i]);
         }
 
-        mViewPager.setAdapter(new GesturePagerAdapter(mPageList));
+        viewPager.setAdapter(new GesturePagerAdapter(mPageList));
 
         mButtonStartRestart = (Button) preview.findViewById(R.id.button_restart);
         mButtonStartRestart.setOnClickListener(v -> {
-            final int firstPos = mViewPager.getCurrentItem() - mViewPagerItems.length;
-            mViewPager.setCurrentItem(firstPos, true);
+            final int firstPos = viewPager.getCurrentItem() - mViewPagerItems.length;
+            viewPager.setCurrentItem(firstPos, true);
         });
 
         mButtonEndDone = (Button) preview.findViewById(R.id.button_done);
@@ -208,11 +205,11 @@
 
         mButtonEndNext = (Button) preview.findViewById(R.id.button_next);
         mButtonEndNext.setOnClickListener(v -> {
-            final int nextPos = mViewPager.getCurrentItem() + 1;
-            mViewPager.setCurrentItem(nextPos, true);
+            final int nextPos = viewPager.getCurrentItem() + 1;
+            viewPager.setCurrentItem(nextPos, true);
         });
 
-        mViewPager.addOnPageChangeListener(createPageListener());
+        viewPager.addOnPageChangeListener(createPageListener());
         final ViewGroup viewGroup = (ViewGroup) preview.findViewById(R.id.viewGroup);
         mDotIndicators = new ImageView[mPageList.size()];
         for (int i = 0; i < mPageList.size(); i++) {
@@ -234,12 +231,14 @@
         }
 
         @Override
-        public void destroyItem(ViewGroup container, int position, Object object) {
+        public void destroyItem(@NonNull ViewGroup container, int position,
+                                @NonNull Object object) {
             if (mPageViewList.get(position) != null) {
                 container.removeView(mPageViewList.get(position));
             }
         }
 
+        @NonNull
         @Override
         public Object instantiateItem(ViewGroup container, int position) {
             container.addView(mPageViewList.get(position));
@@ -252,7 +251,7 @@
         }
 
         @Override
-        public boolean isViewFromObject(View view, Object object) {
+        public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
             return object == view;
         }
     }
diff --git a/src/com/android/settings/inputmethod/TouchpadGesturesDisabledFooterPreferenceController.java b/src/com/android/settings/inputmethod/TouchpadGesturesDisabledFooterPreferenceController.java
index 6fc5f3b..a99a7f8 100644
--- a/src/com/android/settings/inputmethod/TouchpadGesturesDisabledFooterPreferenceController.java
+++ b/src/com/android/settings/inputmethod/TouchpadGesturesDisabledFooterPreferenceController.java
@@ -19,11 +19,14 @@
 import android.content.Context;
 import android.hardware.input.InputSettings;
 
+import androidx.annotation.NonNull;
+
 import com.android.settings.core.BasePreferenceController;
 
 public class TouchpadGesturesDisabledFooterPreferenceController extends BasePreferenceController {
 
-    public TouchpadGesturesDisabledFooterPreferenceController(Context context, String key) {
+    public TouchpadGesturesDisabledFooterPreferenceController(@NonNull Context context,
+                                                              @NonNull String key) {
         super(context, key);
     }
 
diff --git a/src/com/android/settings/inputmethod/TouchpadGesturesTutorialButtonPreferenceController.java b/src/com/android/settings/inputmethod/TouchpadGesturesTutorialButtonPreferenceController.java
index f13dc33..845ce47 100644
--- a/src/com/android/settings/inputmethod/TouchpadGesturesTutorialButtonPreferenceController.java
+++ b/src/com/android/settings/inputmethod/TouchpadGesturesTutorialButtonPreferenceController.java
@@ -24,6 +24,8 @@
 import android.hardware.input.InputSettings;
 import android.os.UserHandle;
 
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
 import androidx.preference.PreferenceScreen;
 
@@ -40,10 +42,11 @@
     private static final String GESTURE_DIALOG_TAG = "GESTURE_DIALOG_TAG";
     private static final String TUTORIAL_ACTION = "com.android.systemui.action.TOUCHPAD_TUTORIAL";
 
-    private Fragment mParent;
-    private MetricsFeatureProvider mMetricsFeatureProvider;
+    private @Nullable Fragment mParent;
+    private final MetricsFeatureProvider mMetricsFeatureProvider;
 
-    public TouchpadGesturesTutorialButtonPreferenceController(Context context, String key) {
+    public TouchpadGesturesTutorialButtonPreferenceController(@NonNull Context context,
+                                                              @NonNull String key) {
         super(context, key);
         mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
     }
diff --git a/src/com/android/settings/inputmethod/TouchpadPointerSpeedPreferenceController.java b/src/com/android/settings/inputmethod/TouchpadPointerSpeedPreferenceController.java
index b54421d..945ff43 100644
--- a/src/com/android/settings/inputmethod/TouchpadPointerSpeedPreferenceController.java
+++ b/src/com/android/settings/inputmethod/TouchpadPointerSpeedPreferenceController.java
@@ -20,6 +20,7 @@
 import android.content.Context;
 import android.hardware.input.InputSettings;
 
+import androidx.annotation.NonNull;
 import androidx.preference.PreferenceScreen;
 
 import com.android.settings.core.SliderPreferenceController;
@@ -29,10 +30,9 @@
 
 public class TouchpadPointerSpeedPreferenceController extends SliderPreferenceController {
 
-    private SeekBarPreference mPreference;
-    private MetricsFeatureProvider mMetricsFeatureProvider;
+    private final MetricsFeatureProvider mMetricsFeatureProvider;
 
-    public TouchpadPointerSpeedPreferenceController(Context context, String key) {
+    public TouchpadPointerSpeedPreferenceController(@NonNull Context context, @NonNull String key) {
         super(context, key);
         mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
     }
@@ -40,11 +40,11 @@
     @Override
     public void displayPreference(PreferenceScreen screen) {
         super.displayPreference(screen);
-        mPreference = screen.findPreference(getPreferenceKey());
-        mPreference.setMax(getMax());
-        mPreference.setMin(getMin());
-        mPreference.setProgress(getSliderPosition());
-        updateState(mPreference);
+        SeekBarPreference preference = screen.findPreference(getPreferenceKey());
+        preference.setMax(getMax());
+        preference.setMin(getMin());
+        preference.setProgress(getSliderPosition());
+        updateState(preference);
     }
 
     @Override
diff --git a/src/com/android/settings/inputmethod/TouchpadReverseScrollingPreferenceController.java b/src/com/android/settings/inputmethod/TouchpadReverseScrollingPreferenceController.java
index dfd7634..68f2679 100644
--- a/src/com/android/settings/inputmethod/TouchpadReverseScrollingPreferenceController.java
+++ b/src/com/android/settings/inputmethod/TouchpadReverseScrollingPreferenceController.java
@@ -20,6 +20,8 @@
 import android.content.Context;
 import android.hardware.input.InputSettings;
 
+import androidx.annotation.NonNull;
+
 import com.android.settings.R;
 import com.android.settings.core.TogglePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
@@ -27,9 +29,10 @@
 
 public class TouchpadReverseScrollingPreferenceController extends TogglePreferenceController {
 
-    private MetricsFeatureProvider mMetricsFeatureProvider;
+    private final MetricsFeatureProvider mMetricsFeatureProvider;
 
-    public TouchpadReverseScrollingPreferenceController(Context context, String key) {
+    public TouchpadReverseScrollingPreferenceController(@NonNull Context context,
+                                                        @NonNull String key) {
         super(context, key);
         mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
     }
diff --git a/src/com/android/settings/inputmethod/TouchpadRightClickZonePreferenceController.java b/src/com/android/settings/inputmethod/TouchpadRightClickZonePreferenceController.java
index f98812d..73c051d 100644
--- a/src/com/android/settings/inputmethod/TouchpadRightClickZonePreferenceController.java
+++ b/src/com/android/settings/inputmethod/TouchpadRightClickZonePreferenceController.java
@@ -20,6 +20,8 @@
 import android.content.Context;
 import android.hardware.input.InputSettings;
 
+import androidx.annotation.NonNull;
+
 import com.android.settings.R;
 import com.android.settings.core.TogglePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
@@ -27,9 +29,10 @@
 
 public class TouchpadRightClickZonePreferenceController extends TogglePreferenceController {
 
-    private MetricsFeatureProvider mMetricsFeatureProvider;
+    private final MetricsFeatureProvider mMetricsFeatureProvider;
 
-    public TouchpadRightClickZonePreferenceController(Context context, String key) {
+    public TouchpadRightClickZonePreferenceController(@NonNull Context context,
+                                                      @NonNull String key) {
         super(context, key);
         mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
     }
diff --git a/src/com/android/settings/inputmethod/TouchpadTapDraggingPreferenceController.java b/src/com/android/settings/inputmethod/TouchpadTapDraggingPreferenceController.java
index 59cf85d..ecd1b10 100644
--- a/src/com/android/settings/inputmethod/TouchpadTapDraggingPreferenceController.java
+++ b/src/com/android/settings/inputmethod/TouchpadTapDraggingPreferenceController.java
@@ -20,6 +20,8 @@
 import android.content.Context;
 import android.hardware.input.InputSettings;
 
+import androidx.annotation.NonNull;
+
 import com.android.settings.R;
 import com.android.settings.core.TogglePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
@@ -27,9 +29,9 @@
 
 public class TouchpadTapDraggingPreferenceController extends TogglePreferenceController {
 
-    private MetricsFeatureProvider mMetricsFeatureProvider;
+    private final MetricsFeatureProvider mMetricsFeatureProvider;
 
-    public TouchpadTapDraggingPreferenceController(Context context, String key) {
+    public TouchpadTapDraggingPreferenceController(@NonNull Context context, @NonNull String key) {
         super(context, key);
         mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
     }
diff --git a/src/com/android/settings/inputmethod/TouchpadTapToClickPreferenceController.java b/src/com/android/settings/inputmethod/TouchpadTapToClickPreferenceController.java
index 4b9aa1f..e052415 100644
--- a/src/com/android/settings/inputmethod/TouchpadTapToClickPreferenceController.java
+++ b/src/com/android/settings/inputmethod/TouchpadTapToClickPreferenceController.java
@@ -20,6 +20,8 @@
 import android.content.Context;
 import android.hardware.input.InputSettings;
 
+import androidx.annotation.NonNull;
+
 import com.android.settings.R;
 import com.android.settings.core.TogglePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
@@ -27,9 +29,9 @@
 
 public class TouchpadTapToClickPreferenceController extends TogglePreferenceController {
 
-    private MetricsFeatureProvider mMetricsFeatureProvider;
+    private final MetricsFeatureProvider mMetricsFeatureProvider;
 
-    public TouchpadTapToClickPreferenceController(Context context, String key) {
+    public TouchpadTapToClickPreferenceController(@NonNull Context context, @NonNull String key) {
         super(context, key);
         mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
     }
diff --git a/src/com/android/settings/network/AirplaneModePreference.kt b/src/com/android/settings/network/AirplaneModePreference.kt
index 11790d0..b870f30 100644
--- a/src/com/android/settings/network/AirplaneModePreference.kt
+++ b/src/com/android/settings/network/AirplaneModePreference.kt
@@ -37,11 +37,11 @@
 import com.android.settings.overlay.FeatureFactory.Companion.featureFactory
 import com.android.settingslib.RestrictedSwitchPreference
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.SettingsGlobalStore
 import com.android.settingslib.datastore.SettingsStore
 import com.android.settingslib.metadata.PreferenceAvailabilityProvider
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.metadata.PreferenceLifecycleContext
 import com.android.settingslib.metadata.PreferenceLifecycleProvider
 import com.android.settingslib.metadata.ReadWritePermit
@@ -126,7 +126,7 @@
                 phoneStateListener =
                     object : PhoneStateListener(Looper.getMainLooper()) {
                         override fun onRadioPowerStateChanged(state: Int) {
-                            notifyChange(KEY, DataChangeReason.UPDATE)
+                            notifyChange(KEY, PreferenceChangeReason.VALUE)
                         }
                     }
                 it.listen(phoneStateListener, PhoneStateListener.LISTEN_RADIO_POWER_STATE_CHANGED)
diff --git a/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryController.java b/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryController.java
index f0d1da4..6218e05 100644
--- a/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryController.java
+++ b/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryController.java
@@ -18,21 +18,13 @@
 
 import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ATTACH_SUPPORTED_BOOL;
 import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ESOS_SUPPORTED_BOOL;
-import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_DATA;
-import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_SMS;
 
 import android.content.Context;
 import android.os.PersistableBundle;
-import android.telephony.TelephonyCallback;
-import android.telephony.TelephonyManager;
-import android.telephony.satellite.NtnSignalStrength;
 import android.telephony.satellite.SatelliteManager;
 import android.util.Log;
 
-import androidx.annotation.NonNull;
-import androidx.annotation.VisibleForTesting;
 import androidx.lifecycle.DefaultLifecycleObserver;
-import androidx.lifecycle.LifecycleOwner;
 import androidx.preference.PreferenceCategory;
 import androidx.preference.PreferenceScreen;
 
@@ -40,9 +32,6 @@
 import com.android.settings.flags.Flags;
 import com.android.settings.network.CarrierConfigCache;
 
-import java.util.Arrays;
-import java.util.List;
-
 /** Preference controller for Satellite functions in mobile network settings. */
 public class SatelliteSettingsPreferenceCategoryController
         extends TelephonyBasePreferenceController implements DefaultLifecycleObserver {
@@ -51,17 +40,11 @@
     private CarrierConfigCache mCarrierConfigCache;
     private SatelliteManager mSatelliteManager;
     private PreferenceCategory mPreferenceCategory;
-    private TelephonyManager mTelephonyManager;
-
-    @VisibleForTesting
-    final CarrierRoamingNtnModeCallback mCarrierRoamingNtnModeCallback =
-            new CarrierRoamingNtnModeCallback();
 
     public SatelliteSettingsPreferenceCategoryController(Context context, String key) {
         super(context, key);
         mCarrierConfigCache = CarrierConfigCache.getInstance(context);
         mSatelliteManager = context.getSystemService(SatelliteManager.class);
-        mTelephonyManager = context.getSystemService(TelephonyManager.class);
     }
 
     /**
@@ -72,13 +55,13 @@
     public void init(int subId) {
         Log.d(TAG, "init(), subId=" + subId);
         mSubId = subId;
-        mTelephonyManager = mTelephonyManager.createForSubscriptionId(subId);
     }
 
     @Override
     public void displayPreference(PreferenceScreen screen) {
         super.displayPreference(screen);
         mPreferenceCategory = screen.findPreference(getPreferenceKey());
+        mPreferenceCategory.setTitle(R.string.category_title_satellite_connectivity);
     }
 
     @Override
@@ -103,58 +86,4 @@
         return (isSatelliteAttachSupported || isSatelliteSosSupported)
                 ? AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
     }
-
-    @Override
-    public void onResume(@NonNull LifecycleOwner owner) {
-        if (Flags.satelliteOemSettingsUxMigration()) {
-            mTelephonyManager.registerTelephonyCallback(mContext.getMainExecutor(),
-                    mCarrierRoamingNtnModeCallback);
-        }
-    }
-
-    @Override
-    public void onPause(@NonNull LifecycleOwner owner) {
-        if (Flags.satelliteOemSettingsUxMigration()) {
-            mTelephonyManager.unregisterTelephonyCallback(mCarrierRoamingNtnModeCallback);
-        }
-    }
-
-    @VisibleForTesting
-    class CarrierRoamingNtnModeCallback extends TelephonyCallback implements
-            TelephonyCallback.CarrierRoamingNtnListener {
-        @Override
-        public void onCarrierRoamingNtnAvailableServicesChanged(int[] availableServices) {
-            CarrierRoamingNtnListener.super.onCarrierRoamingNtnAvailableServicesChanged(
-                    availableServices);
-            List<Integer> availableServicesList = Arrays.stream(availableServices).boxed().toList();
-            boolean isSmsAvailable = availableServicesList.contains(SERVICE_TYPE_SMS);
-            boolean isDataAvailable = availableServicesList.contains(SERVICE_TYPE_DATA);
-            Log.i(TAG, "isSmsAvailable : " + isSmsAvailable
-                    + " / isDataAvailable " + isDataAvailable);
-            if (mPreferenceCategory == null) {
-                Log.d(TAG, "Satellite preference category is not initialized yet");
-                return;
-            }
-            if (isDataAvailable) {
-                mPreferenceCategory.setTitle(R.string.category_title_satellite_connectivity);
-            } else if (isSmsAvailable) {
-                mPreferenceCategory.setTitle(R.string.satellite_setting_title);
-            }
-        }
-
-        @Override
-        public void onCarrierRoamingNtnEligibleStateChanged(boolean eligible) {
-            // Do nothing
-        }
-
-        @Override
-        public void onCarrierRoamingNtnModeChanged(boolean active) {
-            // Do nothing
-        }
-
-        @Override
-        public void onCarrierRoamingNtnSignalStrengthChanged(NtnSignalStrength ntnSignalStrength) {
-            // Do nothing
-        }
-    }
 }
diff --git a/src/com/android/settings/notification/app/AllConversationsPreferenceController.java b/src/com/android/settings/notification/app/AllConversationsPreferenceController.java
index c863190..1fb8e35 100644
--- a/src/com/android/settings/notification/app/AllConversationsPreferenceController.java
+++ b/src/com/android/settings/notification/app/AllConversationsPreferenceController.java
@@ -23,6 +23,7 @@
 
 import com.android.settings.R;
 import com.android.settings.notification.NotificationBackend;
+import com.android.settingslib.widget.TopIntroPreference;
 
 public class AllConversationsPreferenceController extends ConversationListPreferenceController {
 
@@ -39,9 +40,9 @@
 
     @Override
     Preference getSummaryPreference() {
-        Preference pref = new Preference(mContext);
+        Preference pref = new TopIntroPreference(mContext);
         pref.setOrder(1);
-        pref.setSummary(R.string.other_conversations_summary);
+        pref.setTitle(R.string.other_conversations_summary);
         pref.setSelectable(false);
         return pref;
     }
diff --git a/src/com/android/settings/notification/app/AllowSoundPreferenceController.java b/src/com/android/settings/notification/app/AllowSoundPreferenceController.java
index 0664c54..b1333b3 100644
--- a/src/com/android/settings/notification/app/AllowSoundPreferenceController.java
+++ b/src/com/android/settings/notification/app/AllowSoundPreferenceController.java
@@ -71,6 +71,9 @@
             pref.setEnabled(!pref.isDisabledByAdmin());
             pref.setChecked(mChannel.getImportance() >= IMPORTANCE_DEFAULT
                     || mChannel.getImportance() == IMPORTANCE_UNSPECIFIED);
+            if (preference.getParent() != null) {
+                preference.getParent().setVisible(true);
+            }
         } else { Log.i(TAG, "tried to updatestate on a null channel?!"); }
     }
 
diff --git a/src/com/android/settings/notification/app/AppLinkPreferenceController.java b/src/com/android/settings/notification/app/AppLinkPreferenceController.java
index 043ae69..4b397d0 100644
--- a/src/com/android/settings/notification/app/AppLinkPreferenceController.java
+++ b/src/com/android/settings/notification/app/AppLinkPreferenceController.java
@@ -54,6 +54,9 @@
     }
 
     public void updateState(Preference preference) {
+        if (preference.getParent() != null) {
+            preference.getParent().setVisible(true);
+        }
         if (mAppRow != null) {
             preference.setIntent(mAppRow.settingsIntent);
         }
diff --git a/src/com/android/settings/notification/app/BadgePreferenceController.java b/src/com/android/settings/notification/app/BadgePreferenceController.java
index 9d55fa3..b5e65fc 100644
--- a/src/com/android/settings/notification/app/BadgePreferenceController.java
+++ b/src/com/android/settings/notification/app/BadgePreferenceController.java
@@ -82,6 +82,9 @@
 
     public void updateState(Preference preference) {
         if (mAppRow != null) {
+            if (preference.getParent() != null) {
+                preference.getParent().setVisible(true);
+            }
             RestrictedSwitchPreference pref = (RestrictedSwitchPreference) preference;
             pref.setDisabledByAdmin(mAdmin);
             if (mChannel != null) {
diff --git a/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java b/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java
index 8c22f92..e82fe0b 100644
--- a/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java
+++ b/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java
@@ -82,6 +82,9 @@
             intent.putExtra(Settings.EXTRA_APP_UID, mAppRow.uid);
             preference.setIntent(intent);
         }
+        if (preference.getParent() != null) {
+           preference.getParent().setVisible(true);
+        }
     }
 
     @Override
diff --git a/src/com/android/settings/notification/app/ChannelListPreferenceController.java b/src/com/android/settings/notification/app/ChannelListPreferenceController.java
index b8dfb6a..66094a0 100644
--- a/src/com/android/settings/notification/app/ChannelListPreferenceController.java
+++ b/src/com/android/settings/notification/app/ChannelListPreferenceController.java
@@ -58,6 +58,7 @@
 
     private List<NotificationChannelGroup> mChannelGroupList;
     private PreferenceCategory mPreference;
+    int mChannelCount;
 
     public ChannelListPreferenceController(Context context, NotificationBackend backend) {
         super(context, backend);
@@ -107,6 +108,7 @@
                 } else {
                     mChannelGroupList = mBackend.getGroups(mAppRow.pkg, mAppRow.uid).getList();
                 }
+                mChannelCount = mBackend.getChannelCount(mAppRow.pkg, mAppRow.uid);
                 Collections.sort(mChannelGroupList, CHANNEL_GROUP_COMPARATOR);
                 return null;
             }
@@ -116,6 +118,7 @@
                 if (mContext == null) {
                     return;
                 }
+
                 updateFullList(mPreference, mChannelGroupList);
             }
         }.execute();
@@ -129,25 +132,30 @@
     void updateFullList(@NonNull PreferenceCategory groupPrefsList,
                 @NonNull List<NotificationChannelGroup> channelGroups) {
         if (channelGroups.isEmpty()) {
-            if (groupPrefsList.getPreferenceCount() == 1
-                    && KEY_ZERO_CATEGORIES.equals(groupPrefsList.getPreference(0).getKey())) {
-                // Ensure the titles are correct for the current language, but otherwise leave alone
-                PreferenceGroup groupCategory = (PreferenceGroup) groupPrefsList.getPreference(0);
-                groupCategory.setTitle(R.string.notification_channels);
-                groupCategory.getPreference(0).setTitle(R.string.no_channels);
-            } else {
-                // Clear any contents and create the 'zero-categories' group.
+            if (mChannelCount > 0) {
                 groupPrefsList.removeAll();
+            } else {
+                if (groupPrefsList.getPreferenceCount() == 1
+                        && KEY_ZERO_CATEGORIES.equals(groupPrefsList.getPreference(0).getKey())) {
+                    // Ensure the titles are correct for the current language, but otherwise leave alone
+                    PreferenceGroup groupCategory = (PreferenceGroup) groupPrefsList.getPreference(
+                            0);
+                    groupCategory.setTitle(R.string.notification_channels);
+                    groupCategory.getPreference(0).setTitle(R.string.no_channels);
+                } else {
+                    // Clear any contents and create the 'zero-categories' group.
+                    groupPrefsList.removeAll();
 
-                PreferenceCategory groupCategory = new PreferenceCategory(mContext);
-                groupCategory.setTitle(R.string.notification_channels);
-                groupCategory.setKey(KEY_ZERO_CATEGORIES);
-                groupPrefsList.addPreference(groupCategory);
+                    PreferenceCategory groupCategory = new PreferenceCategory(mContext);
+                    groupCategory.setTitle(R.string.notification_channels);
+                    groupCategory.setKey(KEY_ZERO_CATEGORIES);
+                    groupPrefsList.addPreference(groupCategory);
 
-                Preference empty = new Preference(mContext);
-                empty.setTitle(R.string.no_channels);
-                empty.setEnabled(false);
-                groupCategory.addPreference(empty);
+                    Preference empty = new Preference(mContext);
+                    empty.setTitle(R.string.no_channels);
+                    empty.setEnabled(false);
+                    groupCategory.addPreference(empty);
+                }
             }
         } else {
             updateGroupList(groupPrefsList, channelGroups);
@@ -211,6 +219,11 @@
                 groupPrefsList.addPreference(group);
             }
         }
+        Preference otherGroup = groupPrefsList.findPreference(KEY_GENERAL_CATEGORY);
+        if (otherGroup != null) {
+            otherGroup.setTitle(numFinalGroups == 1
+                    ? R.string.notification_channels : R.string.notification_channels_other);
+        }
     }
 
     /**
@@ -248,8 +261,7 @@
         List<Preference> finalOrderedPrefs = new ArrayList<>();
         Preference appDefinedGroupToggle;
         if (group.getId() == null) {
-            // For the 'null' group, set the "Other" title.
-            groupPrefGroup.setTitle(R.string.notification_channels_other);
+            groupPrefGroup.setTitle(R.string.notification_channels);
             appDefinedGroupToggle = null;
         } else {
             // For an app-defined group, set their name and create a row to toggle 'isBlocked'.
diff --git a/src/com/android/settings/notification/app/DeletedChannelsPreferenceController.java b/src/com/android/settings/notification/app/DeletedChannelsPreferenceController.java
index 07b7fda..004afe2 100644
--- a/src/com/android/settings/notification/app/DeletedChannelsPreferenceController.java
+++ b/src/com/android/settings/notification/app/DeletedChannelsPreferenceController.java
@@ -63,6 +63,9 @@
     }
 
     public void updateState(Preference preference) {
+        if (preference.getParent() != null) {
+            preference.getParent().setVisible(true);
+        }
         if (mAppRow != null) {
             int deletedChannelCount = mBackend.getDeletedChannelCount(mAppRow.pkg, mAppRow.uid);
             preference.setTitle(StringUtil.getIcuPluralsString(mContext, deletedChannelCount,
diff --git a/src/com/android/settings/notification/app/DndPreferenceController.java b/src/com/android/settings/notification/app/DndPreferenceController.java
index b65928a..2533787 100644
--- a/src/com/android/settings/notification/app/DndPreferenceController.java
+++ b/src/com/android/settings/notification/app/DndPreferenceController.java
@@ -54,6 +54,9 @@
 
     public void updateState(Preference preference) {
         if (mChannel != null) {
+            if (preference.getParent() != null) {
+                preference.getParent().setVisible(true);
+            }
             RestrictedSwitchPreference pref = (RestrictedSwitchPreference) preference;
             pref.setDisabledByAdmin(mAdmin);
             pref.setEnabled(!pref.isDisabledByAdmin());
diff --git a/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceController.kt b/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceController.kt
index 4349b4c..6977a99 100644
--- a/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceController.kt
+++ b/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceController.kt
@@ -21,9 +21,9 @@
 import android.app.AppOpsManager.OP_USE_FULL_SCREEN_INTENT
 import android.content.AttributionSource
 import android.content.Context
-import android.content.pm.PackageManager.NameNotFoundException
 import android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET
 import android.content.pm.PackageManager.GET_PERMISSIONS
+import android.content.pm.PackageManager.NameNotFoundException
 import android.os.UserHandle
 import android.permission.PermissionManager
 import android.util.Log
@@ -65,6 +65,7 @@
         preference.setDisabledByAdmin(mAdmin)
         preference.isEnabled = !preference.isDisabledByAdmin
         preference.isChecked = isPermissionGranted()
+        preference.parent?.isVisible = true
     }
 
     override fun onPreferenceChange(preference: Preference, value: Any): Boolean {
diff --git a/src/com/android/settings/notification/app/HeaderPreferenceController.java b/src/com/android/settings/notification/app/HeaderPreferenceController.java
index 220e7b5..91abe81 100644
--- a/src/com/android/settings/notification/app/HeaderPreferenceController.java
+++ b/src/com/android/settings/notification/app/HeaderPreferenceController.java
@@ -81,9 +81,8 @@
             mHeaderController = EntityHeaderController.newInstance(
                     activity, mFragment, pref.findViewById(R.id.entity_header));
             pref = mHeaderController.setIcon(mAppRow.icon)
-                    .setLabel(getLabel())
-                    .setSummary(getSummary())
-                    .setSecondSummary(getSecondSummary())
+                    .setLabel(getSummary())
+                    .setSummary(getSecondSummary())
                     .setPackageName(mAppRow.pkg)
                     .setUid(mAppRow.uid)
                     .setButtonActions(EntityHeaderController.ActionType.ACTION_NOTIF_PREFERENCE,
@@ -95,14 +94,6 @@
         }
     }
 
-    public CharSequence getLabel() {
-        if (mChannel != null && !isDefaultChannel()) {
-            return mChannel.getName();
-        } else {
-            return mAppRow.label;
-        }
-    }
-
     @OnLifecycleEvent(Lifecycle.Event.ON_START)
     public void onStart() {
         mStarted = true;
@@ -113,15 +104,7 @@
         if (mChannel != null) {
             if (mChannelGroup != null
                     && !TextUtils.isEmpty(mChannelGroup.getName())) {
-                final SpannableStringBuilder summary = new SpannableStringBuilder();
-                BidiFormatter bidi = BidiFormatter.getInstance();
-                summary.append(bidi.unicodeWrap(mAppRow.label));
-                summary.append(bidi.unicodeWrap(mContext.getText(
-                        R.string.notification_header_divider_symbol_with_spaces)));
-                summary.append(bidi.unicodeWrap(mChannelGroup.getName().toString()));
-                return summary.toString();
-            } else {
-                return mAppRow.label.toString();
+                return mChannelGroup.getName().toString();
             }
         }
         return "";
diff --git a/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceController.java b/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceController.java
index 478607b..2194579 100644
--- a/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceController.java
+++ b/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceController.java
@@ -23,6 +23,7 @@
 
 import com.android.settings.R;
 import com.android.settings.notification.NotificationBackend;
+import com.android.settingslib.widget.SettingsThemeHelper;
 
 public class InvalidConversationInfoPreferenceController extends NotificationPreferenceController {
 
@@ -49,6 +50,9 @@
         if (mPreferenceFilter != null && !isIncludedInFilter()) {
             return false;
         }
+        if (SettingsThemeHelper.isExpressiveTheme(mContext)) {
+            return false;
+        }
         return mBackend.isInInvalidMsgState(mAppRow.pkg, mAppRow.uid);
     }
 
diff --git a/src/com/android/settings/notification/app/InvalidConversationPreferenceController.java b/src/com/android/settings/notification/app/InvalidConversationPreferenceController.java
index 5c502dc..57eaad9 100644
--- a/src/com/android/settings/notification/app/InvalidConversationPreferenceController.java
+++ b/src/com/android/settings/notification/app/InvalidConversationPreferenceController.java
@@ -24,6 +24,7 @@
 import com.android.settings.R;
 import com.android.settings.notification.NotificationBackend;
 import com.android.settingslib.RestrictedSwitchPreference;
+import com.android.settingslib.widget.SettingsThemeHelper;
 
 public class InvalidConversationPreferenceController extends NotificationPreferenceController
         implements Preference.OnPreferenceChangeListener {
@@ -67,7 +68,15 @@
         pref.setDisabledByAdmin(mAdmin);
         pref.setEnabled(!pref.isDisabledByAdmin());
         pref.setChecked(!mBackend.hasUserDemotedInvalidMsgApp(mAppRow.pkg, mAppRow.uid));
-        preference.setSummary(mContext.getString(R.string.conversation_section_switch_summary));
+        if (SettingsThemeHelper.isExpressiveTheme(mContext)) {
+            if (preference.getParent() != null) {
+                preference.getParent().setVisible(true);
+            }
+            preference.setSummary(mContext.getString(
+                    R.string.conversation_section_switch_complete_summary));
+        } else {
+            preference.setSummary(mContext.getString(R.string.conversation_section_switch_summary));
+        }
     }
 
     @Override
diff --git a/src/com/android/settings/notification/app/PriorityConversationsPreferenceController.java b/src/com/android/settings/notification/app/PriorityConversationsPreferenceController.java
index 18fc917..55b50df 100644
--- a/src/com/android/settings/notification/app/PriorityConversationsPreferenceController.java
+++ b/src/com/android/settings/notification/app/PriorityConversationsPreferenceController.java
@@ -23,6 +23,7 @@
 
 import com.android.settings.R;
 import com.android.settings.notification.NotificationBackend;
+import com.android.settingslib.widget.TopIntroPreference;
 
 public class PriorityConversationsPreferenceController extends
         ConversationListPreferenceController {
@@ -40,9 +41,9 @@
 
     @Override
     Preference getSummaryPreference() {
-        Preference pref = new Preference(mContext);
+        Preference pref = new TopIntroPreference(mContext);
         pref.setOrder(1);
-        pref.setSummary(R.string.important_conversations_summary_bubbles);
+        pref.setTitle(R.string.important_conversations_summary_bubbles);
         pref.setSelectable(false);
         return pref;
     }
diff --git a/src/com/android/settings/notification/app/PromotedNotificationsPreferenceController.java b/src/com/android/settings/notification/app/PromotedNotificationsPreferenceController.java
index 13417b2..bd8229e 100644
--- a/src/com/android/settings/notification/app/PromotedNotificationsPreferenceController.java
+++ b/src/com/android/settings/notification/app/PromotedNotificationsPreferenceController.java
@@ -20,14 +20,12 @@
 
 import androidx.annotation.NonNull;
 import androidx.preference.Preference;
-import androidx.preference.PreferenceCategory;
 
 import com.android.settings.notification.NotificationBackend;
 import com.android.settingslib.RestrictedSwitchPreference;
 
 public class PromotedNotificationsPreferenceController extends
         NotificationPreferenceController implements Preference.OnPreferenceChangeListener {
-    private static final String KEY_PROMOTED_CATEGORY = "promoted_category";
     protected static final String KEY_PROMOTED_SWITCH = "promoted_switch";
 
     public PromotedNotificationsPreferenceController(@NonNull Context context,
@@ -38,7 +36,7 @@
     @Override
     @NonNull
     public String getPreferenceKey() {
-        return KEY_PROMOTED_CATEGORY;
+        return KEY_PROMOTED_SWITCH;
     }
 
     @Override
@@ -56,12 +54,13 @@
     }
 
     /**
-     * Updates the state of the promoted notifications switch. Because this controller governs
-     * the full PreferenceCategory, we must find the switch preference within the category first.
+     * Updates the state of the promoted notifications switch.
      */
     public void updateState(@NonNull Preference preference) {
-        PreferenceCategory category = (PreferenceCategory) preference;
-        RestrictedSwitchPreference pref = category.findPreference(KEY_PROMOTED_SWITCH);
+        RestrictedSwitchPreference pref = (RestrictedSwitchPreference) preference;
+        if (pref.getParent() != null) {
+            pref.getParent().setVisible(true);
+        }
 
         if (pref != null && mAppRow != null) {
             pref.setDisabledByAdmin(mAdmin);
diff --git a/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java b/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
index f5f2e97..4fe0a87 100644
--- a/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
+++ b/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
@@ -40,6 +40,7 @@
 import com.android.settings.core.SubSettingLauncher;
 import com.android.settings.notification.NotificationBackend;
 import com.android.settingslib.core.AbstractPreferenceController;
+import com.android.settingslib.widget.ButtonPreference;
 import com.android.settingslib.widget.LayoutPreference;
 
 import java.text.Collator;
@@ -75,14 +76,12 @@
         return true;
     }
 
-    //TODO(b/233325816): Use ButtonPreference instead.
-    LayoutPreference getClearAll(PreferenceGroup parent) {
-        LayoutPreference pref = new LayoutPreference(
-                mContext, R.layout.conversations_clear_recents);
+    ButtonPreference getClearAll(PreferenceGroup parent) {
+        ButtonPreference pref = new ButtonPreference(mContext);
+        pref.setTitle(R.string.conversation_settings_clear_recents);
         pref.setKey(getPreferenceKey() + CLEAR_ALL_KEY_SUFFIX);
         pref.setOrder(1);
-        Button button = pref.findViewById(R.id.conversation_settings_clear_recents);
-        button.setOnClickListener(v -> {
+        pref.setOnClickListener(v -> {
             try {
                 mPs.removeAllRecentConversations();
                 // Removing recents is asynchronous, so we can't immediately reload the list from
@@ -97,7 +96,8 @@
                         }
                     }
                 }
-                button.announceForAccessibility(mContext.getString(R.string.recent_convos_removed));
+                pref.getButton().announceForAccessibility(
+                        mContext.getString(R.string.recent_convos_removed));
             } catch (RemoteException e) {
                 Slog.w(TAG, "Could not clear recents", e);
             }
@@ -160,25 +160,27 @@
                 .forEachOrdered(pref -> {
                     pref.setOrder(order.getAndIncrement());
                     mPreferenceGroup.addPreference(pref);
-                    if (pref.hasClearListener()) {
+                    if (pref instanceof RecentConversationPreference
+                            && ((RecentConversationPreference) pref).hasClearListener()) {
                         hasClearable.set(true);
                     }
                 });
         return hasClearable.get();
     }
 
-    protected RecentConversationPreference createConversationPref(
+    protected Preference createConversationPref(
             final ConversationChannel conversation) {
         final String pkg = conversation.getShortcutInfo().getPackage();
         final int uid = conversation.getUid();
         final String conversationId = conversation.getShortcutInfo().getId();
-        RecentConversationPreference pref = new RecentConversationPreference(mContext);
+        Preference pref = conversation.hasActiveNotifications() ? new Preference(mContext)
+                : new RecentConversationPreference(mContext);
 
         if (!conversation.hasActiveNotifications()) {
-            pref.setOnClearClickListener(() -> {
+            ((RecentConversationPreference) pref).setOnClearClickListener(() -> {
                 try {
                     mPs.removeRecentConversation(pkg, UserHandle.getUserId(uid), conversationId);
-                    pref.getClearView().announceForAccessibility(
+                    ((RecentConversationPreference) pref).getClearView().announceForAccessibility(
                             mContext.getString(R.string.recent_convo_removed));
                     mPreferenceGroup.removePreference(pref);
                 } catch (RemoteException e) {
diff --git a/src/com/android/settings/notification/app/ShowMorePreferenceController.java b/src/com/android/settings/notification/app/ShowMorePreferenceController.java
index dbc279a..f44a0c8 100644
--- a/src/com/android/settings/notification/app/ShowMorePreferenceController.java
+++ b/src/com/android/settings/notification/app/ShowMorePreferenceController.java
@@ -56,6 +56,9 @@
         if (mAppRow.banned || mAppRow.showAllChannels) {
             return false;
         }
+        if (mBackend.getChannelCount(mAppRow.pkg, mAppRow.uid) == 0) {
+            return false;
+        }
         return true;
     }
 
diff --git a/src/com/android/settings/notification/app/VisibilityPreferenceController.java b/src/com/android/settings/notification/app/VisibilityPreferenceController.java
index a2a1d76..0cec7e2 100644
--- a/src/com/android/settings/notification/app/VisibilityPreferenceController.java
+++ b/src/com/android/settings/notification/app/VisibilityPreferenceController.java
@@ -75,6 +75,10 @@
 
     public void updateState(Preference preference) {
         if (mChannel != null && mAppRow != null) {
+            if (preference.getParent() != null) {
+                preference.getParent().setVisible(true);
+            }
+
             RestrictedListPreference pref = (RestrictedListPreference) preference;
             ArrayList<CharSequence> entries = new ArrayList<>();
             ArrayList<CharSequence> values = new ArrayList<>();
diff --git a/src/com/android/settings/overlay/SurveyFeatureProvider.java b/src/com/android/settings/overlay/SurveyFeatureProvider.java
index ce5be98..85d123d 100644
--- a/src/com/android/settings/overlay/SurveyFeatureProvider.java
+++ b/src/com/android/settings/overlay/SurveyFeatureProvider.java
@@ -19,7 +19,10 @@
 import android.content.BroadcastReceiver;
 import android.content.Context;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
+import androidx.core.util.Consumer;
+import androidx.lifecycle.LifecycleOwner;
 import androidx.localbroadcastmanager.content.LocalBroadcastManager;
 
 /**
@@ -109,4 +112,14 @@
      * @param simpleKey The simple name of the key to get the surveyId for.
      */
     void sendActivityIfAvailable(String simpleKey);
+
+    /**
+     * Checks if a survey is available for the given key by binding to the survey service.
+     *
+     * @param lifecycleOwner The lifecycle owner to manage the service connection.
+     * @param simpleKey The simple name of the key to get the surveyId for.
+     * @param listener The callback to be invoked when the survey availability is checked.
+     */
+    void checkSurveyAvailable(@NonNull LifecycleOwner lifecycleOwner, @NonNull String simpleKey,
+            @NonNull Consumer<Boolean> listener);
 }
diff --git a/src/com/android/settings/regionalpreferences/NumberingSystemLocaleListFragment.java b/src/com/android/settings/regionalpreferences/NumberingSystemLocaleListFragment.java
index 6a39b23..5846403 100644
--- a/src/com/android/settings/regionalpreferences/NumberingSystemLocaleListFragment.java
+++ b/src/com/android/settings/regionalpreferences/NumberingSystemLocaleListFragment.java
@@ -16,8 +16,6 @@
 
 package com.android.settings.regionalpreferences;
 
-import static android.provider.Settings.ACTION_NUMBERING_SYSTEM_SETTINGS;
-
 import android.app.Activity;
 import android.app.settings.SettingsEnums;
 import android.content.Context;
@@ -49,10 +47,6 @@
             finish();
         }
 
-        if (getIntent().getAction().equals(ACTION_NUMBERING_SYSTEM_SETTINGS)) {
-          // TODO: Generically log action.
-        }
-
         getActivity().setTitle(R.string.numbers_preferences_title);
         getActivity().setResult(Activity.RESULT_OK);
     }
diff --git a/src/com/android/settings/restriction/UserRestrictionBindingHelper.kt b/src/com/android/settings/restriction/UserRestrictionBindingHelper.kt
index a1329c2..4dca003 100644
--- a/src/com/android/settings/restriction/UserRestrictionBindingHelper.kt
+++ b/src/com/android/settings/restriction/UserRestrictionBindingHelper.kt
@@ -20,8 +20,8 @@
 import com.android.settings.PreferenceRestrictionMixin
 import com.android.settingslib.datastore.HandlerExecutor
 import com.android.settingslib.datastore.KeyedObserver
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.preference.PreferenceScreenBindingHelper
-import com.android.settingslib.preference.PreferenceScreenBindingHelper.Companion.CHANGE_REASON_STATE
 
 /** Helper to rebind preference immediately when user restriction is changed. */
 class UserRestrictionBindingHelper(
@@ -55,7 +55,7 @@
 
     override fun onKeyChanged(restrictionKey: String, reason: Int) {
         val keys = restrictionKeysToPreferenceKeys[restrictionKey] ?: return
-        for (key in keys) screenBindingHelper.notifyChange(key, CHANGE_REASON_STATE)
+        for (key in keys) screenBindingHelper.notifyChange(key, PreferenceChangeReason.STATE)
     }
 
     override fun close() {
diff --git a/src/com/android/settings/restriction/UserRestrictions.kt b/src/com/android/settings/restriction/UserRestrictions.kt
index 880aa5d..3d78e8e 100644
--- a/src/com/android/settings/restriction/UserRestrictions.kt
+++ b/src/com/android/settings/restriction/UserRestrictions.kt
@@ -24,6 +24,7 @@
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
 import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.KeyedObserver
+import com.android.settingslib.metadata.PreferenceChangeReason
 import java.util.concurrent.Executor
 
 /** Helper class to monitor user restriction changes. */
@@ -46,7 +47,7 @@
         object : BroadcastReceiver() {
             override fun onReceive(context: Context, intent: Intent) {
                 // there is no way to get the changed keys, just notify all observers
-                observable.notifyChange(DataChangeReason.UPDATE)
+                observable.notifyChange(PreferenceChangeReason.STATE)
             }
         }
 
diff --git a/src/com/android/settings/spa/app/storage/StorageAppList.kt b/src/com/android/settings/spa/app/storage/StorageAppList.kt
index c33de33..be145e0 100644
--- a/src/com/android/settings/spa/app/storage/StorageAppList.kt
+++ b/src/com/android/settings/spa/app/storage/StorageAppList.kt
@@ -34,12 +34,12 @@
 import com.android.settingslib.spaprivileged.model.app.AppEntry
 import com.android.settingslib.spaprivileged.model.app.AppListModel
 import com.android.settingslib.spaprivileged.model.app.AppRecord
+import com.android.settingslib.spaprivileged.model.app.AppStorageRepositoryImpl
 import com.android.settingslib.spaprivileged.template.app.AppList
 import com.android.settingslib.spaprivileged.template.app.AppListInput
 import com.android.settingslib.spaprivileged.template.app.AppListItem
 import com.android.settingslib.spaprivileged.template.app.AppListItemModel
 import com.android.settingslib.spaprivileged.template.app.AppListPage
-import com.android.settingslib.spaprivileged.template.app.calculateSizeBytes
 import com.android.settingslib.spaprivileged.template.app.getStorageSize
 import kotlinx.coroutines.flow.Flow
 
@@ -109,9 +109,11 @@
         getStorageSize()
     }
 ) : AppListModel<AppRecordWithSize> {
+    private val appStorageRepository = AppStorageRepositoryImpl(context)
+
     override fun transform(userIdFlow: Flow<Int>, appListFlow: Flow<List<ApplicationInfo>>) =
-        appListFlow.mapItem {
-            AppRecordWithSize(it, it.calculateSizeBytes(context) ?: 0L)
+        appListFlow.mapItem { app ->
+            AppRecordWithSize(app, appStorageRepository.calculateSizeBytes(app) ?: 0L)
         }
 
     override fun filter(
diff --git a/src/com/android/settings/vpn2/OWNERS b/src/com/android/settings/vpn2/OWNERS
index 4135645..919c56e 100644
--- a/src/com/android/settings/vpn2/OWNERS
+++ b/src/com/android/settings/vpn2/OWNERS
@@ -1,13 +1,7 @@
 # People who can approve changes for submission.
-jchalard@google.com
-lorenzo@google.com
-maze@google.com
-reminv@google.com
+file:platform/packages/modules/Connectivity:main:/OWNERS_core_networking_xts
 xiaom@google.com
 hughchen@google.com
 robertluo@google.com
 timhypeng@google.com
 vincentwei@google.com
-
-# Emergency approvers in case the above are not available
-satk@google.com
diff --git a/src/com/android/settings/widget/MainSwitchBarMetadata.kt b/src/com/android/settings/widget/MainSwitchBarMetadata.kt
index f55cfd0..4fc89bc 100644
--- a/src/com/android/settings/widget/MainSwitchBarMetadata.kt
+++ b/src/com/android/settings/widget/MainSwitchBarMetadata.kt
@@ -27,6 +27,16 @@
 interface MainSwitchBarMetadata :
     TwoStatePreference, TwoStatePreferenceBinding, PreferenceBindingPlaceholder {
 
+    /**
+     * Disable main switch bar when user toggles the switch. By this way, user cannot toggle again
+     * before last operation is done.
+     *
+     * Side-effect: If the underlying operation is completed quickly, this will causes UI flicker.
+     * Override and return `false` to get rid of the flicker.
+     */
+    val disableWidgetOnCheckedChanged: Boolean
+        get() = true
+
     override fun createWidget(context: Context) = MainSwitchBarPreference(context, this)
 
     override fun bind(preference: Preference, metadata: PreferenceMetadata) {
diff --git a/src/com/android/settings/widget/MainSwitchBarPreference.kt b/src/com/android/settings/widget/MainSwitchBarPreference.kt
index b3b341c..a23409a 100644
--- a/src/com/android/settings/widget/MainSwitchBarPreference.kt
+++ b/src/com/android/settings/widget/MainSwitchBarPreference.kt
@@ -80,7 +80,7 @@
 
     override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
         // prevent user from toggling the switch before data store operation is done
-        isEnabled = false
+        if (metadata.disableWidgetOnCheckedChanged) isEnabled = false
         // once data store is updated, isEnabled will be reset due to rebind
         persistBoolean(isChecked)
     }
diff --git a/src/com/android/settings/wifi/WifiSwitchPreference.kt b/src/com/android/settings/wifi/WifiSwitchPreference.kt
index 627a78b..2b2b344 100644
--- a/src/com/android/settings/wifi/WifiSwitchPreference.kt
+++ b/src/com/android/settings/wifi/WifiSwitchPreference.kt
@@ -17,6 +17,8 @@
 package com.android.settings.wifi
 
 import android.Manifest
+import android.app.settings.SettingsEnums.ACTION_WIFI_OFF
+import android.app.settings.SettingsEnums.ACTION_WIFI_ON
 import android.content.BroadcastReceiver
 import android.content.Context
 import android.content.Intent
@@ -31,14 +33,16 @@
 import com.android.settings.R
 import com.android.settings.network.SatelliteRepository.Companion.isSatelliteOn
 import com.android.settings.network.SatelliteWarningDialogActivity
+import com.android.settings.overlay.FeatureFactory.Companion.featureFactory
+import com.android.settings.wifi.utils.isDefaultNetworkWifi
 import com.android.settings.wifi.utils.isWifiEnabled
 import com.android.settings.wifi.utils.wifiManager
 import com.android.settingslib.RestrictedSwitchPreference
 import com.android.settingslib.WirelessUtils
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.Permissions
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.metadata.PreferenceLifecycleProvider
 import com.android.settingslib.metadata.PreferenceMetadata
 import com.android.settingslib.metadata.ReadWritePermit
@@ -137,8 +141,15 @@
             context.isWifiEnabled as T?
 
         override fun <T : Any> setValue(key: String, valueType: Class<T>, value: T?) {
-            if (value is Boolean) {
-                context.isWifiEnabled = value
+            if (value !is Boolean) return
+
+            context.isWifiEnabled = value
+
+            val metricsFeature = featureFactory.metricsFeatureProvider
+            if (value) {
+                metricsFeature.action(context, ACTION_WIFI_ON)
+            } else {
+                metricsFeature.action(context, ACTION_WIFI_OFF, context.isDefaultNetworkWifi)
             }
         }
 
@@ -152,7 +163,7 @@
                             wifiState == WifiManager.WIFI_STATE_ENABLED ||
                                 wifiState == WifiManager.WIFI_STATE_DISABLED
                         ) {
-                            notifyChange(KEY, DataChangeReason.UPDATE)
+                            notifyChange(KEY, PreferenceChangeReason.VALUE)
                         }
                     }
                 }
diff --git a/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt b/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt
index c93099e..3877a02 100644
--- a/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt
+++ b/src/com/android/settings/wifi/tether/WifiHotspotSwitchPreference.kt
@@ -32,7 +32,6 @@
 import com.android.settings.R
 import com.android.settings.Utils
 import com.android.settings.core.SubSettingLauncher
-import com.android.settings.datausage.DataSaverMainSwitchPreference.Companion.KEY as DATA_SAVER_KEY
 import com.android.settings.wifi.WifiUtils.canShowWifiHotspot
 import com.android.settings.wifi.utils.tetheringManager
 import com.android.settings.wifi.utils.wifiApState
@@ -41,12 +40,12 @@
 import com.android.settingslib.PrimarySwitchPreference
 import com.android.settingslib.TetherUtil
 import com.android.settingslib.datastore.AbstractKeyedDataObservable
-import com.android.settingslib.datastore.DataChangeReason
 import com.android.settingslib.datastore.HandlerExecutor
 import com.android.settingslib.datastore.KeyValueStore
 import com.android.settingslib.datastore.KeyedObserver
 import com.android.settingslib.datastore.Permissions
 import com.android.settingslib.metadata.PreferenceAvailabilityProvider
+import com.android.settingslib.metadata.PreferenceChangeReason
 import com.android.settingslib.metadata.PreferenceMetadata
 import com.android.settingslib.metadata.PreferenceSummaryProvider
 import com.android.settingslib.metadata.ReadWritePermit
@@ -54,6 +53,7 @@
 import com.android.settingslib.metadata.SwitchPreference
 import com.android.settingslib.preference.PreferenceBinding
 import com.android.settingslib.wifi.WifiUtils.Companion.getWifiTetherSummaryForConnectedDevices
+import com.android.settings.datausage.DataSaverMainSwitchPreference.Companion.KEY as DATA_SAVER_KEY
 
 // LINT.IfChange
 class WifiHotspotSwitchPreference(context: Context, dataSaverStore: KeyValueStore) :
@@ -186,13 +186,13 @@
             Log.d(TAG, "onStateChanged(),state=$state,failureReason=$failureReason")
             sapFailureReason = failureReason
             if (state == WifiManager.WIFI_AP_STATE_DISABLED) sapClientsSize = null
-            notifyChange(KEY, DataChangeReason.UPDATE)
+            notifyChange(KEY, PreferenceChangeReason.VALUE)
         }
 
         override fun onConnectedClientsChanged(clients: List<WifiClient>?) {
             sapClientsSize = clients?.size ?: 0
             Log.d(TAG, "onConnectedClientsChanged(),sapClientsSize=$sapClientsSize")
-            notifyChange(KEY, DataChangeReason.UPDATE)
+            notifyChange(KEY, PreferenceChangeReason.STATE)
         }
 
         override fun onTetheringStarted() {}
@@ -202,7 +202,7 @@
         }
 
         override fun onKeyChanged(key: String, reason: Int) =
-            notifyChange(KEY, DataChangeReason.UPDATE)
+            notifyChange(KEY, reason)
     }
 
     override fun bind(preference: Preference, metadata: PreferenceMetadata) {
diff --git a/src/com/android/settings/wifi/utils/Contexts.kt b/src/com/android/settings/wifi/utils/Contexts.kt
index 42a6b98..bd8ecaa 100644
--- a/src/com/android/settings/wifi/utils/Contexts.kt
+++ b/src/com/android/settings/wifi/utils/Contexts.kt
@@ -19,6 +19,8 @@
 package com.android.settings.wifi.utils
 
 import android.content.Context
+import android.net.ConnectivityManager
+import android.net.NetworkCapabilities
 import android.net.TetheringManager
 import android.net.wifi.WifiManager
 
@@ -52,3 +54,18 @@
  */
 val Context.tetheringManager: TetheringManager?
     get() = applicationContext.getSystemService(TetheringManager::class.java)
+
+/**
+ * Gets the {@link android.net.ConnectivityManager} system service.
+ *
+ * Use application context to get system services to avoid memory leaks.
+ */
+val Context.connectivityManager: ConnectivityManager?
+    get() = applicationContext.getSystemService(ConnectivityManager::class.java)
+
+/** Return true if the default network is a Wi-Fi network */
+val Context.isDefaultNetworkWifi: Boolean
+    get() =
+        connectivityManager
+            ?.getNetworkCapabilities(connectivityManager?.activeNetwork)
+            ?.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) == true
diff --git a/tests/robotests/Android.bp b/tests/robotests/Android.bp
index 5bacbbe..935c687 100644
--- a/tests/robotests/Android.bp
+++ b/tests/robotests/Android.bp
@@ -113,7 +113,7 @@
         "testutils/**/*.kt",
     ],
     libs: [
-        "Robolectric_all-target_upstream",
+        "Robolectric_all-target",
         "Settings-core",
         "mockito-robolectric-prebuilt",
         "truth",
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
index 9315995..91d7d91 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
@@ -503,9 +503,8 @@
     }
 
     private String getPreferenceCategory(ComponentName componentName) {
-        return mFragment.mServicePreferenceToPreferenceCategoryMap.get(
-                        mFragment.getPreferenceScreen().findPreference(
-                                componentName.flattenToString())).getKey();
+        return mFragment.getPreferenceScreen().findPreference(
+                componentName.flattenToString()).getParent().getKey();
     }
 
     private AccessibilityServiceInfo getMockAccessibilityServiceInfo(ComponentName componentName) {
diff --git a/tests/robotests/src/com/android/settings/accessibility/MagnificationFeedbackPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/MagnificationFeedbackPreferenceControllerTest.java
new file mode 100644
index 0000000..389e127
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/MagnificationFeedbackPreferenceControllerTest.java
@@ -0,0 +1,121 @@
+/*
+ * 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.accessibility;
+
+import static com.android.settings.accessibility.MagnificationFeedbackPreferenceController.FEEDBACK_KEY;
+import static com.android.settings.accessibility.MagnificationFeedbackPreferenceController.PREF_KEY;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+
+import androidx.core.util.Consumer;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceManager;
+import androidx.preference.PreferenceScreen;
+import androidx.test.core.app.ApplicationProvider;
+
+import com.android.settings.R;
+import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.overlay.SurveyFeatureProvider;
+import com.android.settings.testutils.FakeFeatureFactory;
+
+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;
+import org.robolectric.RobolectricTestRunner;
+
+/** Tests for {@link MagnificationFeedbackPreferenceController}. */
+@RunWith(RobolectricTestRunner.class)
+public class MagnificationFeedbackPreferenceControllerTest {
+
+    @Rule
+    public MockitoRule mMockitoRule = MockitoJUnit.rule();
+
+    private final Context mContext = ApplicationProvider.getApplicationContext();
+    @Mock private PreferenceScreen mScreen;
+    @Mock private PreferenceManager mPreferenceManager;
+    @Mock private DashboardFragment mFragment;
+    private SurveyFeatureProvider mSurveyFeatureProvider;
+    private MagnificationFeedbackPreferenceController mController;
+    private Preference mPreference;
+
+    @Before
+    public void setUp() {
+        FakeFeatureFactory.setupForTest();
+        mSurveyFeatureProvider =
+                FakeFeatureFactory.getFeatureFactory().getSurveyFeatureProvider(mContext);
+        mController = new MagnificationFeedbackPreferenceController(mContext, mFragment, PREF_KEY);
+        mPreference = new Preference(mContext);
+        when(mFragment.getPreferenceManager()).thenReturn(mPreferenceManager);
+        when(mPreferenceManager.findPreference(PREF_KEY)).thenReturn(mPreference);
+        when(mFragment.getPreferenceScreen()).thenReturn(mScreen);
+    }
+
+    @Test
+    public void getAvailabilityStatus_shouldAlwaysBeAvailable() {
+        assertThat(mController.getAvailabilityStatus()).isEqualTo(
+                MagnificationFeedbackPreferenceController.AVAILABLE);
+    }
+
+    @Test
+    public void updateState_surveyAvailable_preferenceEnabledWithSummary() {
+        doAnswer(invocation -> {
+            Consumer<Boolean> consumer = invocation.getArgument(2);
+            consumer.accept(true);
+            return null;
+        }).when(mSurveyFeatureProvider).checkSurveyAvailable(any(), eq(FEEDBACK_KEY), any());
+
+        mController.updateState(mPreference);
+
+        assertThat(mPreference.isEnabled()).isTrue();
+        assertThat(mPreference.getSummary()).isEqualTo(
+                mContext.getString(R.string.accessibility_feedback_summary));
+    }
+
+    @Test
+    public void updateState_surveyUnavailable_preferenceDisabledWithSummary() {
+        doAnswer(invocation -> {
+            Consumer<Boolean> consumer = invocation.getArgument(2);
+            consumer.accept(false);
+            return null;
+        }).when(mSurveyFeatureProvider).checkSurveyAvailable(any(), eq(FEEDBACK_KEY), any());
+
+        mController.updateState(mPreference);
+
+        assertThat(mPreference.isEnabled()).isFalse();
+        assertThat(mPreference.getSummary()).isEqualTo(
+                mContext.getString(R.string.accessibility_feedback_disabled_summary));
+    }
+
+    @Test
+    public void handlePreferenceTreeClick_shouldStartSurvey() {
+        mController.handlePreferenceTreeClick(mPreference);
+
+        verify(mSurveyFeatureProvider).sendActivityIfAvailable(FEEDBACK_KEY);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeControllerTest.java
index 0a22e4a..f67053d 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ToggleAutoclickCursorAreaSizeControllerTest.java
@@ -16,6 +16,9 @@
 
 package com.android.settings.accessibility;
 
+import static android.view.accessibility.AccessibilityManager.AUTOCLICK_CURSOR_AREA_SIZE_MAX;
+import static android.view.accessibility.AccessibilityManager.AUTOCLICK_CURSOR_AREA_SIZE_MIN;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -32,9 +35,11 @@
 import android.provider.Settings;
 import android.view.accessibility.AccessibilityManager;
 
+import androidx.preference.PreferenceScreen;
 import androidx.test.core.app.ApplicationProvider;
 
 import com.android.settings.core.BasePreferenceController;
+import com.android.settingslib.widget.SliderPreference;
 
 import com.google.common.collect.ImmutableList;
 
@@ -106,21 +111,74 @@
     }
 
     @Test
-    public void getProgress_matchesSetting() {
-        assertThat(mController.getSliderPosition()).isEqualTo(readSetting());
+    public void getProgress_matchesSetting_inRangeValue() {
+        // TODO(388844952): Use parameter testing.
+        for (int size : ImmutableList.of(20, 40, 60, 80, 100)) {
+            updateSetting(size);
+
+            assertThat(mController.getSliderPosition()).isEqualTo(size);
+        }
     }
 
     @Test
-    public void setProgress_updatesSetting() {
-        for (int size : ImmutableList.of(20, 40, 60, 80, 100)) {
-            mController.setSliderPosition(size);
-            assertThat(readSetting()).isEqualTo(size);
+    public void getProgress_matchesSetting_aboveMaxValue() {
+        updateSetting(120);
+
+        assertThat(mController.getSliderPosition()).isEqualTo(AUTOCLICK_CURSOR_AREA_SIZE_MAX);
+    }
+
+    @Test
+    public void getProgress_matchesSetting_belowMinValue() {
+        updateSetting(0);
+
+        assertThat(mController.getSliderPosition()).isEqualTo(AUTOCLICK_CURSOR_AREA_SIZE_MIN);
+    }
+
+    @Test
+    public void setProgress_updatesSetting_inRangeValue() {
+        // TODO(388844952): Use parameter testing.
+        for (int position : ImmutableList.of(20, 40, 60, 80, 100)) {
+            mController.setSliderPosition(position);
+
+            assertThat(readSetting()).isEqualTo(position);
         }
     }
 
+    @Test
+    public void setProgress_updatesSetting_aboveMaxValue() {
+        mController.setSliderPosition(120);
+
+        assertThat(readSetting()).isEqualTo(AUTOCLICK_CURSOR_AREA_SIZE_MAX);
+    }
+
+    @Test
+    public void setProgress_updatesSetting_belowMinValue() {
+        mController.setSliderPosition(0);
+
+        assertThat(readSetting()).isEqualTo(AUTOCLICK_CURSOR_AREA_SIZE_MIN);
+    }
+
+    @Test
+    public void sliderPreference_setCorrectInitialValue() {
+        SliderPreference preference = mock(SliderPreference.class);
+        PreferenceScreen screen = mock(PreferenceScreen.class);
+        doReturn(preference).when(screen).findPreference(anyString());
+
+        mController.displayPreference(screen);
+
+        verify(preference).setValue(mController.getSliderPosition());
+    }
+
     private int readSetting() {
         return Settings.Secure.getInt(mContext.getContentResolver(),
                 Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE,
                 AccessibilityManager.AUTOCLICK_CURSOR_AREA_SIZE_DEFAULT);
     }
+
+    private void updateSetting(int value) {
+        Settings.Secure.putInt(
+                mContext.getContentResolver(),
+                Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE,
+                value);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
index 0b38594..863452f 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
@@ -337,6 +337,26 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_LOW_VISION_HATS)
+    public void onResume_enableLowVisionHaTS_feedbackPreferenceShouldReturnNotNull() {
+        mFragController.create(R.id.main_content, /* bundle= */ null).start().resume();
+
+        final Preference feedbackPreference = mFragController.get().findPreference(
+                MagnificationFeedbackPreferenceController.PREF_KEY);
+        assertThat(feedbackPreference).isNotNull();
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LOW_VISION_HATS)
+    public void onResume_disableLowVisionHaTS_feedbackPreferenceShouldReturnNull() {
+        mFragController.create(R.id.main_content, /* bundle= */ null).start().resume();
+
+        final Preference feedbackPreference = mFragController.get().findPreference(
+                MagnificationFeedbackPreferenceController.PREF_KEY);
+        assertThat(feedbackPreference).isNull();
+    }
+
+    @Test
     public void onResume_haveRegisterToSpecificUris() {
         ShadowContentResolver shadowContentResolver = Shadows.shadowOf(
                 mContext.getContentResolver());
@@ -893,13 +913,14 @@
     @Test
     @EnableFlags(com.android.settings.accessibility.Flags.FLAG_FIX_A11Y_SETTINGS_SEARCH)
     public void getRawDataToIndex_returnsAllPreferenceKeys() {
-        List<String> expectedSearchKeys = List.of(
+        final List<String> expectedSearchKeys = List.of(
                 KEY_MAGNIFICATION_SHORTCUT_PREFERENCE,
                 MagnificationModePreferenceController.PREF_KEY,
                 MagnificationFollowTypingPreferenceController.PREF_KEY,
                 MagnificationOneFingerPanningPreferenceController.PREF_KEY,
                 MagnificationAlwaysOnPreferenceController.PREF_KEY,
-                MagnificationJoystickPreferenceController.PREF_KEY);
+                MagnificationJoystickPreferenceController.PREF_KEY,
+                MagnificationFeedbackPreferenceController.PREF_KEY);
 
         final List<SearchIndexableRaw> rawData = ToggleScreenMagnificationPreferenceFragment
                 .SEARCH_INDEX_DATA_PROVIDER.getRawDataToIndex(mContext, true);
@@ -910,8 +931,7 @@
 
     @Test
     @EnableFlags(com.android.settings.accessibility.Flags.FLAG_FIX_A11Y_SETTINGS_SEARCH)
-    public void
-            getNonIndexableKeys_windowMagnificationNotSupported_onlyShortcutPreferenceSearchable() {
+    public void getNonIndexableKeys_windowMagnificationNotSupported_onlyShortcutSearchable() {
         setWindowMagnificationSupported(false, false);
 
         final List<String> niks = ToggleScreenMagnificationPreferenceFragment
@@ -920,7 +940,8 @@
                 .SEARCH_INDEX_DATA_PROVIDER.getRawDataToIndex(mContext, true);
         // Expect all search data, except the shortcut preference, to be in NIKs.
         final List<String> expectedNiks = rawData.stream().map(raw -> raw.key)
-                .filter(key -> !key.equals(KEY_MAGNIFICATION_SHORTCUT_PREFERENCE)).toList();
+                .filter(key -> !key.equals(KEY_MAGNIFICATION_SHORTCUT_PREFERENCE))
+                .toList();
 
         // In NonIndexableKeys == not searchable
         assertThat(niks).containsExactlyElementsIn(expectedNiks);
@@ -929,7 +950,32 @@
     @Test
     @EnableFlags({
             com.android.settings.accessibility.Flags.FLAG_FIX_A11Y_SETTINGS_SEARCH,
-            Flags.FLAG_ENABLE_MAGNIFICATION_ONE_FINGER_PANNING_GESTURE})
+            Flags.FLAG_ENABLE_LOW_VISION_HATS})
+    public void
+            getNonIndexableKeys_windowMagnificationNotSupportedHatsOn_shortcutFeedbackSearchable() {
+        setWindowMagnificationSupported(false, false);
+
+        final List<String> niks = ToggleScreenMagnificationPreferenceFragment
+                .SEARCH_INDEX_DATA_PROVIDER.getNonIndexableKeys(mContext);
+        final List<SearchIndexableRaw> rawData = ToggleScreenMagnificationPreferenceFragment
+                .SEARCH_INDEX_DATA_PROVIDER.getRawDataToIndex(mContext, true);
+        // Expect all search data, except the shortcut preference and feedback preference, to be in
+        // NIKs.
+        final List<String> expectedNiks = rawData.stream().map(raw -> raw.key)
+                .filter(key ->
+                        !key.equals(KEY_MAGNIFICATION_SHORTCUT_PREFERENCE)
+                        && !key.equals(MagnificationFeedbackPreferenceController.PREF_KEY))
+                .toList();
+
+        // In NonIndexableKeys == not searchable
+        assertThat(niks).containsExactlyElementsIn(expectedNiks);
+    }
+
+    @Test
+    @EnableFlags({
+            com.android.settings.accessibility.Flags.FLAG_FIX_A11Y_SETTINGS_SEARCH,
+            Flags.FLAG_ENABLE_MAGNIFICATION_ONE_FINGER_PANNING_GESTURE,
+            Flags.FLAG_ENABLE_LOW_VISION_HATS})
     public void getNonIndexableKeys_hasShortcutAndAllFeaturesEnabled_allItemsSearchable() {
         setMagnificationTripleTapEnabled(true);
         setAlwaysOnSupported(true);
@@ -991,6 +1037,16 @@
         assertThat(niks).contains(MagnificationJoystickPreferenceController.PREF_KEY);
     }
 
+    @Test
+    @DisableFlags(Flags.FLAG_ENABLE_LOW_VISION_HATS)
+    public void getNonIndexableKeys_hatsNotSupported_notSearchable() {
+        final List<String> niks = ToggleScreenMagnificationPreferenceFragment
+                .SEARCH_INDEX_DATA_PROVIDER.getNonIndexableKeys(mContext);
+
+        // In NonIndexableKeys == not searchable
+        assertThat(niks).contains(MagnificationFeedbackPreferenceController.PREF_KEY);
+    }
+
     private void putStringIntoSettings(String key, String componentName) {
         Settings.Secure.putString(mContext.getContentResolver(), key, componentName);
     }
diff --git a/tests/robotests/src/com/android/settings/applications/AppStorageSizesControllerTest.java b/tests/robotests/src/com/android/settings/applications/AppStorageSizesControllerTest.java
index 49d4aac..bd2579e 100644
--- a/tests/robotests/src/com/android/settings/applications/AppStorageSizesControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/AppStorageSizesControllerTest.java
@@ -83,10 +83,10 @@
         mController.setResult(result);
         mController.updateUi(mContext);
 
-        assertThat(mAppPreference.getSummary()).isEqualTo("1 B");
-        assertThat(mCachePreference.getSummary()).isEqualTo("10 B");
-        assertThat(mDataPreference.getSummary()).isEqualTo("90 B");
-        assertThat(mTotalPreference.getSummary()).isEqualTo("101 B");
+        assertThat(mAppPreference.getSummary()).isEqualTo("1 byte");
+        assertThat(mCachePreference.getSummary()).isEqualTo("10 byte");
+        assertThat(mDataPreference.getSummary()).isEqualTo("90 byte");
+        assertThat(mTotalPreference.getSummary()).isEqualTo("101 byte");
     }
 
     @Test
@@ -101,10 +101,10 @@
         mController.setCacheCleared(true);
         mController.updateUi(mContext);
 
-        assertThat(mAppPreference.getSummary()).isEqualTo("1 B");
-        assertThat(mCachePreference.getSummary()).isEqualTo("0 B");
-        assertThat(mDataPreference.getSummary()).isEqualTo("90 B");
-        assertThat(mTotalPreference.getSummary()).isEqualTo("91 B");
+        assertThat(mAppPreference.getSummary()).isEqualTo("1 byte");
+        assertThat(mCachePreference.getSummary()).isEqualTo("0 byte");
+        assertThat(mDataPreference.getSummary()).isEqualTo("90 byte");
+        assertThat(mTotalPreference.getSummary()).isEqualTo("91 byte");
     }
 
     @Test
@@ -119,9 +119,9 @@
         mController.setDataCleared(true);
         mController.updateUi(mContext);
 
-        assertThat(mAppPreference.getSummary()).isEqualTo("1 B");
-        assertThat(mCachePreference.getSummary()).isEqualTo("0 B");
-        assertThat(mDataPreference.getSummary()).isEqualTo("0 B");
-        assertThat(mTotalPreference.getSummary()).isEqualTo("1 B");
+        assertThat(mAppPreference.getSummary()).isEqualTo("1 byte");
+        assertThat(mCachePreference.getSummary()).isEqualTo("0 byte");
+        assertThat(mDataPreference.getSummary()).isEqualTo("0 byte");
+        assertThat(mTotalPreference.getSummary()).isEqualTo("1 byte");
     }
 }
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 4dc4dca..3075573 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceControllerTest.java
@@ -42,6 +42,7 @@
 import android.content.Context;
 import android.database.ContentObserver;
 import android.os.Looper;
+import android.platform.test.annotations.EnableFlags;
 import android.platform.test.flag.junit.SetFlagsRule;
 import android.provider.Settings;
 import android.view.View;
@@ -107,8 +108,11 @@
     private static final String PREF_KEY = "calls_and_alarms";
     private static final String TEST_DEVICE_NAME1 = "test1";
     private static final String TEST_DEVICE_NAME2 = "test2";
+    private static final String TEMP_BOND_METADATA =
+            "<TEMP_BOND_TYPE>le_audio_sharing</TEMP_BOND_TYPE>";
     private static final int TEST_DEVICE_GROUP_ID1 = 1;
     private static final int TEST_DEVICE_GROUP_ID2 = 2;
+    private static final int METADATA_FAST_PAIR_CUSTOMIZED_FIELDS = 25;
 
     private static final String TEST_SETTINGS_KEY =
             "bluetooth_le_broadcast_fallback_active_group_id";
@@ -441,6 +445,23 @@
     }
 
     @Test
+    @EnableFlags(Flags.FLAG_ENABLE_TEMPORARY_BOND_DEVICES_UI)
+    public void displayPreference_hasTemporaryBondDevice_doNotShow() {
+        Settings.Secure.putInt(mContentResolver, TEST_SETTINGS_KEY, TEST_DEVICE_GROUP_ID1);
+        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));
+        when(mDevice2.getMetadata(METADATA_FAST_PAIR_CUSTOMIZED_FIELDS)).thenReturn(
+                TEMP_BOND_METADATA.getBytes());
+
+        mController.displayPreference(mScreen);
+        shadowOf(Looper.getMainLooper()).idle();
+
+        assertThat(mController.mGroupedConnectedDevices).hasSize(0);
+    }
+
+    @Test
     public void displayPreference_clickToShowCorrectDialog() {
         AlertDialog latestAlertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
         if (latestAlertDialog != null) {
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedStateTest.java b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedStateTest.java
index 2b19e20..12125a4 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedStateTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/audiostreams/SyncedStateTest.java
@@ -30,6 +30,7 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.widget.Button;
+import android.widget.EditText;
 import android.widget.TextView;
 
 import androidx.preference.Preference;
@@ -59,6 +60,8 @@
         })
 public class SyncedStateTest {
     @Rule public final MockitoRule mMockitoRule = MockitoJUnit.rule();
+    private static final String INVALID_PASSWORD = "PAS";
+    private static final String VALID_PASSWORD = "PASSWORD";
     private static final String ENCRYPTED_METADATA =
             "BLUETOOTH:UUID:184F;BN:VGVzdA==;AT:1;AD:00A1A1A1A1A1;BI:1E240;BC:VGVzdENvZGU=;"
                     + "MD:BgNwVGVzdA==;AS:1;PI:A0;NS:1;BS:3;NB:2;SM:BQNUZXN0BARlbmc=;;";
@@ -143,15 +146,24 @@
 
         Button positiveButton = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
         assertThat(positiveButton).isNotNull();
+        assertThat(positiveButton.isEnabled()).isFalse();
         assertThat(positiveButton.getText().toString())
                 .isEqualTo(
                         mMockContext.getString(R.string.bluetooth_connect_access_dialog_positive));
 
+        ShadowAlertDialog shadowDialog = Shadow.extract(dialog);
+        EditText editText = shadowDialog.getView().findViewById(R.id.broadcast_edit_text);
+        assertThat(editText).isNotNull();
+        editText.setText(VALID_PASSWORD);
+        assertThat(positiveButton.isEnabled()).isTrue();
+        editText.setText(INVALID_PASSWORD);
+        assertThat(positiveButton.isEnabled()).isFalse();
+
+        editText.setText(VALID_PASSWORD);
         positiveButton.callOnClick();
         ShadowLooper.idleMainLooper();
         verify(mMockController).handleSourceAddRequest(any(), any());
 
-        ShadowAlertDialog shadowDialog = Shadow.extract(dialog);
         TextView title = shadowDialog.getView().findViewById(R.id.broadcast_name_text);
         assertThat(title).isNotNull();
         assertThat(title.getText().toString()).isEqualTo(BROADCAST_TITLE);
diff --git a/tests/robotests/src/com/android/settings/dream/DreamSettingsTest.java b/tests/robotests/src/com/android/settings/dream/DreamSettingsTest.java
index aeb3ba0..e6a3f0e 100644
--- a/tests/robotests/src/com/android/settings/dream/DreamSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/dream/DreamSettingsTest.java
@@ -59,6 +59,7 @@
             DreamSettings.WHILE_CHARGING_ONLY,
             DreamSettings.WHILE_DOCKED_ONLY,
             DreamSettings.EITHER_CHARGING_OR_DOCKED,
+            DreamSettings.WHILE_POSTURED_ONLY,
             DreamSettings.NEVER_DREAM
     );
 
@@ -66,7 +67,8 @@
     private static final int[] SETTINGS = {
             DreamBackend.WHILE_CHARGING,
             DreamBackend.WHILE_DOCKED,
-            DreamBackend.EITHER,
+            DreamBackend.WHILE_CHARGING_OR_DOCKED,
+            DreamBackend.WHILE_POSTURED,
             DreamBackend.NEVER,
     };
 
@@ -74,6 +76,7 @@
             R.string.screensaver_settings_summary_sleep,
             R.string.screensaver_settings_summary_dock,
             R.string.screensaver_settings_summary_either_long,
+            R.string.screensaver_settings_summary_postured,
             R.string.screensaver_settings_summary_never
     };
 
@@ -81,6 +84,7 @@
             R.string.screensaver_settings_summary_sleep,
             R.string.screensaver_settings_summary_dock_and_charging,
             R.string.screensaver_settings_summary_either_long,
+            R.string.screensaver_settings_summary_postured_and_charging,
             R.string.screensaver_settings_summary_never
     };
 
diff --git a/tests/robotests/src/com/android/settings/dream/WhenToDreamPickerTest.java b/tests/robotests/src/com/android/settings/dream/WhenToDreamPickerTest.java
index 91ec299..f2197e7 100644
--- a/tests/robotests/src/com/android/settings/dream/WhenToDreamPickerTest.java
+++ b/tests/robotests/src/com/android/settings/dream/WhenToDreamPickerTest.java
@@ -80,9 +80,13 @@
         assertThat(mPicker.getDefaultKey())
                 .isEqualTo(DreamSettings.getKeyFromSetting(DreamBackend.WHILE_DOCKED));
 
-        when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.EITHER);
+        when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.WHILE_CHARGING_OR_DOCKED);
         assertThat(mPicker.getDefaultKey())
-                .isEqualTo(DreamSettings.getKeyFromSetting(DreamBackend.EITHER));
+                .isEqualTo(DreamSettings.getKeyFromSetting(DreamBackend.WHILE_CHARGING_OR_DOCKED));
+
+        when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.WHILE_POSTURED);
+        assertThat(mPicker.getDefaultKey())
+                .isEqualTo(DreamSettings.getKeyFromSetting(DreamBackend.WHILE_POSTURED));
 
         when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.NEVER);
         assertThat(mPicker.getDefaultKey())
@@ -105,9 +109,16 @@
 
     @Test
     public void setDreamWhileChargingOrDocked() {
-        final String key = DreamSettings.getKeyFromSetting(DreamBackend.EITHER);
+        final String key = DreamSettings.getKeyFromSetting(DreamBackend.WHILE_CHARGING_OR_DOCKED);
         mPicker.setDefaultKey(key);
-        verify(mBackend).setWhenToDream(DreamBackend.EITHER);
+        verify(mBackend).setWhenToDream(DreamBackend.WHILE_CHARGING_OR_DOCKED);
+    }
+
+    @Test
+    public void setDreamWhilePostured() {
+        final String key = DreamSettings.getKeyFromSetting(DreamBackend.WHILE_POSTURED);
+        mPicker.setDefaultKey(key);
+        verify(mBackend).setWhenToDream(DreamBackend.WHILE_POSTURED);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/notification/app/AllowSoundPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/app/AllowSoundPreferenceControllerTest.java
index 5260ff6..86a3fe4 100644
--- a/tests/robotests/src/com/android/settings/notification/app/AllowSoundPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/app/AllowSoundPreferenceControllerTest.java
@@ -38,6 +38,8 @@
 import android.os.UserManager;
 
 import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceManager;
 import androidx.preference.PreferenceScreen;
 
 import com.android.settings.notification.NotificationBackend;
@@ -68,7 +70,6 @@
     private NotificationManager mNm;
     @Mock
     private UserManager mUm;
-    @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private PreferenceScreen mScreen;
 
     @Mock
@@ -83,6 +84,7 @@
         shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNm);
         shadowApplication.setSystemService(Context.USER_SERVICE, mUm);
         mContext = RuntimeEnvironment.application;
+        mScreen = new PreferenceManager(mContext).createPreferenceScreen(mContext);
         mController =
                 spy(new AllowSoundPreferenceController(mContext, mDependentFieldListener, mBackend));
     }
@@ -160,6 +162,7 @@
                 RestrictedLockUtils.EnforcedAdmin.class), null);
 
         Preference pref = new RestrictedSwitchPreference(mContext);
+        mScreen.addPreference(pref);
         mController.updateState(pref);
 
         assertFalse(pref.isEnabled());
@@ -173,6 +176,7 @@
         mController.onResume(appRow, channel, null, null, null, null, null);
 
         Preference pref = new RestrictedSwitchPreference(mContext);
+        mScreen.addPreference(pref);
         mController.updateState(pref);
 
         assertTrue(pref.isEnabled());
@@ -186,6 +190,7 @@
                 null);
 
         RestrictedSwitchPreference pref = new RestrictedSwitchPreference(mContext);
+        mScreen.addPreference(pref);
         mController.updateState(pref);
         assertTrue(pref.isChecked());
     }
@@ -198,6 +203,7 @@
                 null);
 
         RestrictedSwitchPreference pref = new RestrictedSwitchPreference(mContext);
+        mScreen.addPreference(pref);
         mController.updateState(pref);
         assertTrue(pref.isChecked());
     }
@@ -210,6 +216,7 @@
                 null);
 
         RestrictedSwitchPreference pref = new RestrictedSwitchPreference(mContext);
+        mScreen.addPreference(pref);
         mController.updateState(pref);
         assertFalse(pref.isChecked());
     }
@@ -222,7 +229,7 @@
                 null);
 
         RestrictedSwitchPreference pref = new RestrictedSwitchPreference(mContext);
-        when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(pref);
+        mScreen.addPreference(pref);
         mController.displayPreference(mScreen);
         mController.updateState(pref);
         pref.setChecked(true);
@@ -240,7 +247,7 @@
                 null);
 
         RestrictedSwitchPreference pref = new RestrictedSwitchPreference(mContext);
-        when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(pref);
+        mScreen.addPreference(pref);
         mController.displayPreference(mScreen);
         mController.updateState(pref);
 
diff --git a/tests/robotests/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceControllerTest.kt b/tests/robotests/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceControllerTest.kt
index 89e33ee..a9abf8b 100644
--- a/tests/robotests/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceControllerTest.kt
+++ b/tests/robotests/src/com/android/settings/notification/app/FullScreenIntentPermissionPreferenceControllerTest.kt
@@ -37,6 +37,7 @@
 import android.permission.PermissionManager.PERMISSION_SOFT_DENIED
 import android.permission.PermissionManager.PermissionResult
 import androidx.preference.Preference
+import androidx.preference.PreferenceManager
 import androidx.preference.PreferenceScreen
 import androidx.test.core.app.ApplicationProvider
 import com.android.settings.notification.NotificationBackend
@@ -80,7 +81,6 @@
 
     private lateinit var preference: RestrictedSwitchPreference
 
-    @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private lateinit var screen: PreferenceScreen
 
     private lateinit var controller: FullScreenIntentPermissionPreferenceController
@@ -94,7 +94,8 @@
 
         preference = RestrictedSwitchPreference(context).apply { key = KEY_FSI_PERMISSION }
 
-        whenever(screen.findPreference<Preference>(KEY_FSI_PERMISSION)).thenReturn(preference)
+        screen = PreferenceManager(context).createPreferenceScreen(context)
+        screen.addPreference(preference)
 
         controller = FullScreenIntentPermissionPreferenceController(
             context,
diff --git a/tests/robotests/src/com/android/settings/notification/app/HeaderPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/app/HeaderPreferenceControllerTest.java
index 05a41a6..b5190dd 100644
--- a/tests/robotests/src/com/android/settings/notification/app/HeaderPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/app/HeaderPreferenceControllerTest.java
@@ -114,27 +114,6 @@
     }
 
     @Test
-    public void testGetLabel() {
-        NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
-        appRow.label = "bananas";
-        mController.onResume(appRow, null, null, null, null, null, null);
-        assertEquals(appRow.label, mController.getLabel());
-
-        NotificationChannelGroup group = new NotificationChannelGroup("id", "name");
-        mController.onResume(appRow, null, group, null, null, null, null);
-        assertEquals(appRow.label, mController.getLabel());
-
-        NotificationChannel channel = new NotificationChannel("cid", "cname", IMPORTANCE_NONE);
-        mController.onResume(appRow, channel, group, null, null, null, null);
-        assertEquals(channel.getName(), mController.getLabel());
-
-        NotificationChannel defaultChannel = new NotificationChannel(
-                NotificationChannel.DEFAULT_CHANNEL_ID, "", IMPORTANCE_NONE);
-        mController.onResume(appRow, defaultChannel, null, null, null, null, null);
-        assertEquals(appRow.label, mController.getLabel());
-    }
-
-    @Test
     public void testGetSummary() {
         NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
         appRow.label = "bananas";
@@ -146,16 +125,14 @@
         NotificationChannel channel = new NotificationChannel("cid", "cname", IMPORTANCE_NONE);
         mController.onResume(appRow, channel, group, null, null, null, null);
         assertTrue(mController.getSummary().toString().contains(group.getName()));
-        assertTrue(mController.getSummary().toString().contains(appRow.label));
 
         mController.onResume(appRow, channel, null, null, null, null, null);
         assertFalse(mController.getSummary().toString().contains(group.getName()));
-        assertTrue(mController.getSummary().toString().contains(appRow.label));
 
         NotificationChannel defaultChannel = new NotificationChannel(
                 NotificationChannel.DEFAULT_CHANNEL_ID, "", IMPORTANCE_NONE);
         mController.onResume(appRow, defaultChannel, null, null, null, null, null);
-        assertEquals(appRow.label, mController.getSummary());
+        assertEquals("", mController.getSummary());
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceControllerTest.java
index eb80465..dcc9daf 100644
--- a/tests/robotests/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/app/InvalidConversationInfoPreferenceControllerTest.java
@@ -34,6 +34,7 @@
 
 import com.android.settings.notification.NotificationBackend;
 import com.android.settings.testutils.shadow.SettingsShadowResources;
+import com.android.settingslib.widget.SettingsThemeHelper;
 
 import com.google.common.collect.ImmutableList;
 
@@ -89,6 +90,18 @@
     }
 
     @Test
+    public void testIsAvailable_notIfExpressiveTheme() {
+        if (SettingsThemeHelper.isExpressiveTheme(mContext)) {
+            when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(true);
+            NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
+            appRow.pkg = "hi";
+            appRow.uid = 0;
+            mController.onResume(appRow, null, null, null, null, null, null);
+            assertFalse(mController.isAvailable());
+        }
+    }
+
+    @Test
     public void testIsAvailable_notIfAppBlocked() {
         when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(true);
         NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
@@ -111,6 +124,9 @@
 
     @Test
     public void testIsAvailable() {
+        if (SettingsThemeHelper.isExpressiveTheme(mContext)) {
+            return;
+        }
         when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(true);
         NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
         appRow.pkg = "hi";
diff --git a/tests/robotests/src/com/android/settings/notification/app/PromotedNotificationsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/app/PromotedNotificationsPreferenceControllerTest.java
index 917d469..8e0ab96 100644
--- a/tests/robotests/src/com/android/settings/notification/app/PromotedNotificationsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/app/PromotedNotificationsPreferenceControllerTest.java
@@ -18,13 +18,12 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 import android.app.Flags;
 import android.content.Context;
@@ -32,7 +31,7 @@
 import android.platform.test.annotations.EnableFlags;
 import android.platform.test.flag.junit.SetFlagsRule;
 
-import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceManager;
 import androidx.test.core.app.ApplicationProvider;
 
 import com.android.settings.notification.NotificationBackend;
@@ -55,8 +54,6 @@
     private NotificationBackend.AppRow mAppRow;
     @Mock
     private NotificationBackend mBackend;
-    @Mock
-    private PreferenceCategory mPrefCategory;
     private RestrictedSwitchPreference mSwitch;
 
     private PromotedNotificationsPreferenceController mPrefController;
@@ -66,7 +63,7 @@
         MockitoAnnotations.initMocks(this);
         mContext = ApplicationProvider.getApplicationContext();
         mSwitch = new RestrictedSwitchPreference(mContext);
-        when(mPrefCategory.findPreference("promoted_switch")).thenReturn(mSwitch);
+        new PreferenceManager(mContext).createPreferenceScreen(mContext).addPreference(mSwitch);
         mPrefController = new PromotedNotificationsPreferenceController(mContext, mBackend);
 
         mAppRow = new NotificationBackend.AppRow();
@@ -93,12 +90,12 @@
         mAppRow.canBePromoted = true;
         mPrefController.onResume(mAppRow, null, null, null, null, null, null);
 
-        mPrefController.updateState(mPrefCategory);
+        mPrefController.updateState(mSwitch);
         assertThat(mSwitch.isChecked()).isTrue();
 
         mAppRow.canBePromoted = false;
         mPrefController.onResume(mAppRow, null, null, null, null, null, null);
-        mPrefController.updateState(mPrefCategory);
+        mPrefController.updateState(mSwitch);
         assertThat(mSwitch.isChecked()).isFalse();
     }
 
diff --git a/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java
index 3c0a0f3..5388591 100644
--- a/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java
@@ -50,6 +50,7 @@
 import com.android.settings.R;
 import com.android.settings.applications.AppInfoBase;
 import com.android.settings.notification.NotificationBackend;
+import com.android.settingslib.widget.ButtonPreference;
 import com.android.settingslib.widget.LayoutPreference;
 
 import com.google.common.collect.ImmutableList;
@@ -232,14 +233,16 @@
                 new NotificationChannelGroup("hi", "group"), 7,
                 false);
 
-        RecentConversationPreference pref = mController.createConversationPref(ccw);
+        Preference pref = mController.createConversationPref(ccw);
         final View view = View.inflate(mContext, pref.getLayoutResource(), null);
         PreferenceViewHolder holder = spy(PreferenceViewHolder.createInstanceForTests(view));
-        View delete = View.inflate(mContext, pref.getSecondTargetResId(), null);
-        when(holder.findViewById(pref.getClearId())).thenReturn(delete);
+        View delete = View.inflate(mContext, ((RecentConversationPreference) pref)
+                .getSecondTargetResId(), null);
+        when(holder.findViewById(((RecentConversationPreference) pref).getClearId()))
+                .thenReturn(delete);
 
         pref.onBindViewHolder(holder);
-        pref.getClearView().performClick();
+        ((RecentConversationPreference) pref).getClearView().performClick();
 
         verify(mPs).removeRecentConversation(
                 si.getPackage(), UserHandle.getUserId(ccw.getUid()), si.getId());
@@ -260,24 +263,24 @@
                 new NotificationChannelGroup("hi", "group"), 7,
                 true);
 
-        RecentConversationPreference pref = mController.createConversationPref(ccw);
+        Preference pref = mController.createConversationPref(ccw);
         final View view = View.inflate(mContext, pref.getLayoutResource(), null);
         PreferenceViewHolder holder = spy(PreferenceViewHolder.createInstanceForTests(view));
-        View delete = View.inflate(mContext, pref.getSecondTargetResId(), null);
-        when(holder.findViewById(pref.getClearId())).thenReturn(delete);
+        View delete = View.inflate(mContext, ((RecentConversationPreference) pref).
+                getSecondTargetResId(), null);
+        when(holder.findViewById(((RecentConversationPreference) pref).getClearId()))
+                .thenReturn(delete);
         mPreferenceGroup.addPreference(pref);
 
-        RecentConversationPreference pref2 = mController.createConversationPref(ccw2);
-        final View view2 = View.inflate(mContext, pref2.getLayoutResource(), null);
-        PreferenceViewHolder holder2 = spy(PreferenceViewHolder.createInstanceForTests(view2));
-        View delete2 = View.inflate(mContext, pref2.getSecondTargetResId(), null);
-        when(holder2.findViewById(pref.getClearId())).thenReturn(delete2);
+        Preference pref2 = mController.createConversationPref(ccw2);
         mPreferenceGroup.addPreference(pref2);
 
-        LayoutPreference clearAll = mController.getClearAll(mPreferenceGroup);
+        ButtonPreference clearAll = mController.getClearAll(mPreferenceGroup);
+        final View rootView = View.inflate(mContext, clearAll.getLayoutResource(), null);
+        clearAll.onBindViewHolder(PreferenceViewHolder.createInstanceForTests(rootView));
         mPreferenceGroup.addPreference(clearAll);
 
-        clearAll.findViewById(R.id.conversation_settings_clear_recents).performClick();
+        clearAll.getButton().performClick();
 
         verify(mPs).removeAllRecentConversations();
         assertThat((Preference) mPreferenceGroup.findPreference("hi:person")).isNull();
@@ -294,9 +297,9 @@
                 new NotificationChannelGroup("hi", "group"), 7,
                 true);
 
-        RecentConversationPreference pref = mController.createConversationPref(ccw);
+        Preference pref = mController.createConversationPref(ccw);
 
-        assertThat(pref.hasClearListener()).isFalse();
+        assertThat(pref instanceof RecentConversationPreference).isFalse();
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java
index 8653d95..887a324 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java
@@ -71,7 +71,7 @@
     @Test
     public void updateState_dnd_enabled() {
         TwoStatePreference preference = mock(TwoStatePreference.class);
-        ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE;
+        ZenMode dnd = TestModeBuilder.MANUAL_DND;
 
         mController.updateState(preference, dnd);
 
@@ -81,7 +81,11 @@
     @Test
     public void updateState_specialDnd_disabled() {
         TwoStatePreference preference = mock(TwoStatePreference.class);
-        ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true);
+        ZenMode specialDnd = new TestModeBuilder()
+                .makeManualDnd()
+                .setInterruptionFilter(INTERRUPTION_FILTER_NONE)
+                .setActive(true)
+                .build();
 
         mController.updateState(preference, specialDnd);
 
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ManualDurationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ManualDurationPreferenceControllerTest.java
index 4edb0d5..12cd2d9 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ManualDurationPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ManualDurationPreferenceControllerTest.java
@@ -70,8 +70,7 @@
     @Test
     public void testIsAvailable_onlyForManualDnd() {
         assertThat(mPrefController.isAvailable(TestModeBuilder.EXAMPLE)).isFalse();
-        assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND_ACTIVE)).isTrue();
-        assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND_INACTIVE)).isTrue();
+        assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND)).isTrue();
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeAppsLinkPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeAppsLinkPreferenceControllerTest.java
index e747b42..1b54a60 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeAppsLinkPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeAppsLinkPreferenceControllerTest.java
@@ -63,7 +63,6 @@
 import com.android.settingslib.notification.modes.ZenMode;
 import com.android.settingslib.notification.modes.ZenModesBackend;
 
-import com.google.common.collect.ImmutableList;
 import com.google.common.util.concurrent.MoreExecutors;
 
 import org.junit.Before;
@@ -153,14 +152,18 @@
 
     @Test
     public void updateState_dnd_enabled() {
-        ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE;
+        ZenMode dnd = TestModeBuilder.MANUAL_DND;
         mController.updateState(mPreference, dnd);
         assertThat(mPreference.isEnabled()).isTrue();
     }
 
     @Test
     public void updateState_specialDnd_disabled() {
-        ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true);
+        ZenMode specialDnd = new TestModeBuilder()
+                .makeManualDnd()
+                .setInterruptionFilter(INTERRUPTION_FILTER_NONE)
+                .setActive(true)
+                .build();
         mController.updateState(mPreference, specialDnd);
         assertThat(mPreference.isEnabled()).isFalse();
     }
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeButtonPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeButtonPreferenceControllerTest.java
index 159dada..6427f7b 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeButtonPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeButtonPreferenceControllerTest.java
@@ -190,7 +190,7 @@
         Button button = new Button(mContext);
         LayoutPreference pref = mock(LayoutPreference.class);
         when(pref.findViewById(anyInt())).thenReturn(button);
-        ZenMode zenMode = TestModeBuilder.MANUAL_DND_INACTIVE;
+        ZenMode zenMode = TestModeBuilder.MANUAL_DND;
 
         mController.updateZenMode(pref, zenMode);
         button.callOnClick();
@@ -204,7 +204,7 @@
         Button button = new Button(mContext);
         LayoutPreference pref = mock(LayoutPreference.class);
         when(pref.findViewById(anyInt())).thenReturn(button);
-        ZenMode zenMode = TestModeBuilder.MANUAL_DND_INACTIVE;
+        ZenMode zenMode = TestModeBuilder.MANUAL_DND;
 
         mController.updateZenMode(pref, zenMode);
         button.callOnClick();
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeDisplayLinkPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeDisplayLinkPreferenceControllerTest.java
index 05486e0..bba24e5 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeDisplayLinkPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeDisplayLinkPreferenceControllerTest.java
@@ -68,7 +68,7 @@
     @Test
     public void updateState_dnd_enabled() {
         Preference preference = mock(Preference.class);
-        ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE;
+        ZenMode dnd = TestModeBuilder.MANUAL_DND;
 
         mController.updateState(preference, dnd);
 
@@ -78,7 +78,11 @@
     @Test
     public void updateState_specialDnd_disabled() {
         Preference preference = mock(Preference.class);
-        ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true);
+        ZenMode specialDnd = new TestModeBuilder()
+                .makeManualDnd()
+                .setInterruptionFilter(INTERRUPTION_FILTER_NONE)
+                .setActive(true)
+                .build();
 
         mController.updateState(preference, specialDnd);
 
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeOtherLinkPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeOtherLinkPreferenceControllerTest.java
index 38790b2..f20d18a 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeOtherLinkPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeOtherLinkPreferenceControllerTest.java
@@ -66,7 +66,7 @@
     @Test
     public void updateState_dnd_enabled() {
         CircularIconsPreference preference = mock(CircularIconsPreference.class);
-        ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE;
+        ZenMode dnd = TestModeBuilder.MANUAL_DND;
 
         mController.updateState(preference, dnd);
 
@@ -76,7 +76,11 @@
     @Test
     public void updateState_specialDnd_disabled() {
         CircularIconsPreference preference = mock(CircularIconsPreference.class);
-        ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true);
+        ZenMode specialDnd = new TestModeBuilder()
+                .makeManualDnd()
+                .setInterruptionFilter(INTERRUPTION_FILTER_NONE)
+                .setActive(true)
+                .build();
 
         mController.updateState(preference, specialDnd);
 
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModePeopleLinkPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModePeopleLinkPreferenceControllerTest.java
index 8a66253..72c8c6f 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModePeopleLinkPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModePeopleLinkPreferenceControllerTest.java
@@ -120,14 +120,18 @@
 
     @Test
     public void updateState_dnd_enabled() {
-        ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE;
+        ZenMode dnd = TestModeBuilder.MANUAL_DND;
         mController.updateState(mPreference, dnd);
         assertThat(mPreference.isEnabled()).isTrue();
     }
 
     @Test
     public void updateState_specialDnd_disabled() {
-        ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true);
+        ZenMode specialDnd = new TestModeBuilder()
+                .makeManualDnd()
+                .setInterruptionFilter(INTERRUPTION_FILTER_NONE)
+                .setActive(true)
+                .build();
         mController.updateState(mPreference, specialDnd);
         assertThat(mPreference.isEnabled()).isFalse();
     }
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeSummaryHelperTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeSummaryHelperTest.java
index d222a8b..e2d1595 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeSummaryHelperTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeSummaryHelperTest.java
@@ -529,7 +529,7 @@
     @Test
     public void getModesSummary_excludesImplicitModes() {
         ImmutableList<ZenMode> modes = ImmutableList.of(
-                TestModeBuilder.MANUAL_DND_INACTIVE,
+                TestModeBuilder.MANUAL_DND,
                 new TestModeBuilder().implicitForPackage("com.annoying.one").build(),
                 new TestModeBuilder().setName("Chirping").build()
         );
@@ -541,7 +541,7 @@
     @Test
     public void getModesSummary_oneModeActive_listsActiveMode() {
         ImmutableList<ZenMode> modes = ImmutableList.of(
-                TestModeBuilder.MANUAL_DND_ACTIVE,
+                new TestModeBuilder().makeManualDnd().setActive(true).build(),
                 new TestModeBuilder().setName("Inactive").setActive(false).build());
 
         String summary = mSummaryHelper.getModesSummary(modes);
@@ -551,7 +551,7 @@
     @Test
     public void getModesSummary_twoModesActive_listsActiveModes() {
         ImmutableList<ZenMode> modes = ImmutableList.of(
-                TestModeBuilder.MANUAL_DND_ACTIVE,
+                new TestModeBuilder().makeManualDnd().setActive(true).build(),
                 new TestModeBuilder().setName("Inactive").setActive(false).build(),
                 new TestModeBuilder().setName("Active #1").setActive(true).build());
 
@@ -562,7 +562,7 @@
     @Test
     public void getModesSummary_threeModesActive_listsActiveModes() {
         ImmutableList<ZenMode> modes = ImmutableList.of(
-                TestModeBuilder.MANUAL_DND_INACTIVE,
+                TestModeBuilder.MANUAL_DND,
                 new TestModeBuilder().setName("Inactive #1").setActive(false).build(),
                 new TestModeBuilder().setName("Active #1").setActive(true).build(),
                 new TestModeBuilder().setName("Active #2").setActive(true).build(),
@@ -576,7 +576,7 @@
     @Test
     public void getModesSummary_manyModesActive_listsSomeActiveModes() {
         ImmutableList<ZenMode> modes = ImmutableList.of(
-                TestModeBuilder.MANUAL_DND_ACTIVE,
+                new TestModeBuilder().makeManualDnd().setActive(true).build(),
                 new TestModeBuilder().setName("Inactive #1").setActive(false).build(),
                 new TestModeBuilder().setName("Active #1").setActive(true).build(),
                 new TestModeBuilder().setName("Active #2").setActive(true).build(),
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerAddPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerAddPreferenceControllerTest.java
index 0d20b19..0a8e400 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerAddPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerAddPreferenceControllerTest.java
@@ -123,7 +123,7 @@
 
     @Test
     public void isAvailable_manualDND_false() {
-        mController.setZenMode(TestModeBuilder.MANUAL_DND_INACTIVE);
+        mController.setZenMode(TestModeBuilder.MANUAL_DND);
         assertThat(mController.isAvailable()).isFalse();
     }
 
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerCategoryPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerCategoryPreferenceControllerTest.java
index bcafe47..64c7715 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerCategoryPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerCategoryPreferenceControllerTest.java
@@ -113,7 +113,7 @@
 
     @Test
     public void isAvailable_manualDND_false() {
-        mController.setZenMode(TestModeBuilder.MANUAL_DND_INACTIVE);
+        mController.setZenMode(TestModeBuilder.MANUAL_DND);
         assertThat(mController.isAvailable()).isFalse();
     }
 }
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerUpdatePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerUpdatePreferenceControllerTest.java
index 7f4f211..6e6485e 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerUpdatePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModeTriggerUpdatePreferenceControllerTest.java
@@ -148,7 +148,7 @@
 
     @Test
     public void isAvailable_manualDND_false() {
-        mController.setZenMode(TestModeBuilder.MANUAL_DND_INACTIVE);
+        mController.setZenMode(TestModeBuilder.MANUAL_DND);
         assertThat(mController.isAvailable()).isFalse();
     }
 
diff --git a/tests/robotests/src/com/android/settings/notification/modes/ZenModesListPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/ZenModesListPreferenceControllerTest.java
index 69568ce..24ec8fb 100644
--- a/tests/robotests/src/com/android/settings/notification/modes/ZenModesListPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/modes/ZenModesListPreferenceControllerTest.java
@@ -18,7 +18,7 @@
 
 import static android.app.NotificationManager.INTERRUPTION_FILTER_PRIORITY;
 
-import static com.android.settingslib.notification.modes.TestModeBuilder.MANUAL_DND_INACTIVE;
+import static com.android.settingslib.notification.modes.TestModeBuilder.MANUAL_DND;
 
 import static com.google.common.truth.Truth.assertThat;
 
@@ -150,7 +150,7 @@
     @DisableFlags(Flags.FLAG_MODES_UI)
     public void testModesUiOff_notAvailableAndNoSearchData() {
         // There exist modes
-        when(mBackend.getModes()).thenReturn(List.of(MANUAL_DND_INACTIVE, TEST_MODE));
+        when(mBackend.getModes()).thenReturn(List.of(MANUAL_DND, TEST_MODE));
 
         assertThat(mPrefController.isAvailable()).isFalse();
         List<SearchIndexableRaw> data = new ArrayList<>();
@@ -185,20 +185,20 @@
 
         // Changing mode data so there's a different one mode doesn't keep any previous data
         // (and setting that state up in the caller)
-        when(mBackend.getModes()).thenReturn(List.of(MANUAL_DND_INACTIVE));
+        when(mBackend.getModes()).thenReturn(List.of(MANUAL_DND));
         List<SearchIndexableRaw> newData = new ArrayList<>();
         mPrefController.updateDynamicRawDataToIndex(newData);
         assertThat(newData).hasSize(1);
 
         SearchIndexableRaw newItem = newData.get(0);
-        assertThat(newItem.key).isEqualTo(MANUAL_DND_INACTIVE.getId());
+        assertThat(newItem.key).isEqualTo(MANUAL_DND.getId());
         assertThat(newItem.title).isEqualTo("Do Not Disturb");  // set above
     }
 
     @Test
     @EnableFlags(Flags.FLAG_MODES_UI)
     public void testUpdateDynamicRawDataToIndex_multipleModes() {
-        when(mBackend.getModes()).thenReturn(List.of(MANUAL_DND_INACTIVE, TEST_MODE));
+        when(mBackend.getModes()).thenReturn(List.of(MANUAL_DND, TEST_MODE));
 
         List<SearchIndexableRaw> data = new ArrayList<>();
         mPrefController.updateDynamicRawDataToIndex(data);
@@ -206,7 +206,7 @@
 
         // Should keep the order presented by getModes()
         SearchIndexableRaw item0 = data.get(0);
-        assertThat(item0.key).isEqualTo(MANUAL_DND_INACTIVE.getId());
+        assertThat(item0.key).isEqualTo(MANUAL_DND.getId());
         assertThat(item0.title).isEqualTo("Do Not Disturb");  // set above
 
         SearchIndexableRaw item1 = data.get(1);
diff --git a/tests/spa_unit/src/com/android/settings/spa/app/appinfo/AppStoragePreferenceTest.kt b/tests/spa_unit/src/com/android/settings/spa/app/appinfo/AppStoragePreferenceTest.kt
index ebbd57a..5a29a7d 100644
--- a/tests/spa_unit/src/com/android/settings/spa/app/appinfo/AppStoragePreferenceTest.kt
+++ b/tests/spa_unit/src/com/android/settings/spa/app/appinfo/AppStoragePreferenceTest.kt
@@ -89,7 +89,7 @@
 
         composeTestRule.onNodeWithText(context.getString(R.string.storage_settings_for_app))
             .assertIsDisplayed()
-        composeTestRule.waitUntilExists(hasText("120 B used in internal storage"))
+        composeTestRule.waitUntilExists(hasText("120 byte used in internal storage"))
     }
 
     @Test
@@ -104,7 +104,7 @@
 
         composeTestRule.onNodeWithText(context.getString(R.string.storage_settings_for_app))
             .assertIsDisplayed()
-        composeTestRule.waitUntilExists(hasText("120 B used in external storage"))
+        composeTestRule.waitUntilExists(hasText("120 byte used in external storage"))
     }
 
     private fun setContent(app: ApplicationInfo) {
@@ -122,7 +122,6 @@
         private val STATS = StorageStats().apply {
             codeBytes = 100
             dataBytes = 20
-            cacheBytes = 3
         }
     }
 }
diff --git a/tests/unit/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceControllerTest.java b/tests/unit/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceControllerTest.java
index e1c0277..9cc118f 100644
--- a/tests/unit/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceControllerTest.java
@@ -24,20 +24,30 @@
 
 import android.content.Context;
 import android.content.res.Resources;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
+import android.platform.test.flag.junit.SetFlagsRule;
 import android.provider.Settings;
 
 import androidx.test.core.app.ApplicationProvider;
 import androidx.test.ext.junit.runners.AndroidJUnit4;
 
 import com.android.internal.R;
+import com.android.server.display.feature.flags.Flags;
 
 import org.junit.Before;
 import org.junit.Ignore;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+/** Tests for {@link ReduceBrightColorsPreferenceController} */
 @RunWith(AndroidJUnit4.class)
 public class ReduceBrightColorsPreferenceControllerTest {
+
+    @Rule
+    public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
+
     private static final String PREF_KEY = "rbc_preference";
 
     private Context mContext;
@@ -76,18 +86,123 @@
     }
 
     @Test
-    public void isAvailable_configuredRbcAvailable_shouldReturnTrue() {
+    @DisableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOffAndDisabled_RbcOnAndAvailable_returnTrue() {
+        doReturn(false).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 1);
         doReturn(true).when(mResources).getBoolean(
                 R.bool.config_reduceBrightColorsAvailable);
+
         assertThat(mController.isAvailable()).isTrue();
     }
+
     @Test
-    public void isAvailable_configuredRbcUnAvailable_shouldReturnFalse() {
+    @DisableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOffAndDisabled_RbcOffAndAvailable_returnTrue() {
+        doReturn(false).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 0);
+        doReturn(true).when(mResources).getBoolean(
+                R.bool.config_reduceBrightColorsAvailable);
+
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    @DisableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOffAndDisabled_RbcOnAndUnavailable_returnFalse() {
+        doReturn(false).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 1);
         doReturn(false).when(mResources).getBoolean(
                 R.bool.config_reduceBrightColorsAvailable);
+
         assertThat(mController.isAvailable()).isFalse();
     }
 
+    @Test
+    @EnableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOnAndDisabled_RbcOnAndAvailable_returnTrue() {
+        doReturn(false).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 1);
+        doReturn(true).when(mResources).getBoolean(
+                R.bool.config_reduceBrightColorsAvailable);
+
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOnAndDisabled_RbcOffAndAvailable_returnTrue() {
+        doReturn(false).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 0);
+        doReturn(true).when(mResources).getBoolean(
+                R.bool.config_reduceBrightColorsAvailable);
+
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOnAndDisabled_RbcOnAndUnavailable_returnFalse() {
+        doReturn(false).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 1);
+        doReturn(false).when(mResources).getBoolean(
+                R.bool.config_reduceBrightColorsAvailable);
+
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOnAndEnabled_RbcOnAndAvailable_returnFalse() {
+        doReturn(true).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 1);
+        doReturn(true).when(mResources).getBoolean(
+                R.bool.config_reduceBrightColorsAvailable);
+
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOnAndEnabled_RbcOffAndAvailable_returnFalse() {
+        doReturn(true).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 0);
+        doReturn(true).when(mResources).getBoolean(
+                R.bool.config_reduceBrightColorsAvailable);
+
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    @EnableFlags(Flags.FLAG_EVEN_DIMMER)
+    public void isAvailable_whenEvenDimmerOnAndEnabled_RbcOnAndUnavailable_returnFalse() {
+        doReturn(true).when(mResources).getBoolean(
+                com.android.internal.R.bool.config_evenDimmerEnabled);
+        Settings.Secure.putInt(mContext.getContentResolver(),
+                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 1);
+        doReturn(false).when(mResources).getBoolean(
+                R.bool.config_reduceBrightColorsAvailable);
+
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+
     private int resourceId(String type, String name) {
         return mContext.getResources().getIdentifier(name, type, mContext.getPackageName());
     }
diff --git a/tests/unit/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryControllerTest.java
index 82119f1..085a68d 100644
--- a/tests/unit/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/telephony/SatelliteSettingsPreferenceCategoryControllerTest.java
@@ -16,13 +16,12 @@
 
 package com.android.settings.network.telephony;
 
-import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_DATA;
-import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_SMS;
-
 import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE;
 
 import static com.google.common.truth.Truth.assertThat;
 
+import static junit.framework.Assert.assertEquals;
+
 import static org.mockito.Mockito.spy;
 
 import android.content.Context;
@@ -35,8 +34,6 @@
 import androidx.test.core.app.ApplicationProvider;
 import androidx.test.ext.junit.runners.AndroidJUnit4;
 
-import com.android.settings.R;
-
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Rule;
@@ -74,24 +71,6 @@
 
     @Test
     @Ignore("b/382664790")
-    public void setPreferenceTitle_hasDataService_showConnectivity() {
-        PreferenceManager preferenceManager = new PreferenceManager(mContext);
-        PreferenceScreen preferenceScreen = preferenceManager.createPreferenceScreen(mContext);
-        PreferenceCategory preferenceCategory = new PreferenceCategory(mContext);
-        preferenceCategory.setKey(KEY);
-        preferenceCategory.addPreference(new Preference(mContext));
-        preferenceScreen.addPreference(preferenceCategory);
-        mController.displayPreference(preferenceScreen);
-
-        mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged(
-                new int[]{SERVICE_TYPE_DATA});
-
-        assertThat(preferenceCategory.getTitle()).isEqualTo(
-                mContext.getString(R.string.title_satellite_setting_connectivity));
-    }
-
-    @Test
-    @Ignore("b/382664790")
     public void setPreferenceTitle_hasSmsService_showMessaging() {
         PreferenceManager preferenceManager = new PreferenceManager(mContext);
         PreferenceScreen preferenceScreen = preferenceManager.createPreferenceScreen(mContext);
@@ -101,10 +80,6 @@
         preferenceCategory.addPreference(new Preference(mContext));
         mController.displayPreference(preferenceScreen);
 
-        mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged(
-                new int[]{SERVICE_TYPE_SMS});
-
-        assertThat(preferenceCategory.getTitle()).isEqualTo(
-                mContext.getString(R.string.satellite_setting_title));
+        assertEquals(preferenceCategory.getTitle(), "Satellite connectivity");
     }
 }
diff --git a/tests/unit/src/com/android/settings/notification/app/ChannelListPreferenceControllerTest.java b/tests/unit/src/com/android/settings/notification/app/ChannelListPreferenceControllerTest.java
index daa2afb..f68ba05 100644
--- a/tests/unit/src/com/android/settings/notification/app/ChannelListPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/notification/app/ChannelListPreferenceControllerTest.java
@@ -91,6 +91,14 @@
             assertEquals("zeroCategories", mGroupList.getPreference(0).getKey());
         }
 
+        // Test the case with no groups but hidden channels
+        inGroups = new ArrayList<>();
+        mController.mChannelCount = 1;
+        mController.updateFullList(mGroupList, inGroups);
+        {
+            assertEquals(0, mGroupList.getPreferenceCount());
+        }
+
         // Test that adding a group clears the zero category and adds everything
         NotificationChannelGroup inGroup1 = new NotificationChannelGroup("group1", "Group 1");
         inGroup1.addChannel(new NotificationChannel("ch1a", "Channel 1A", IMPORTANCE_DEFAULT));
@@ -250,6 +258,7 @@
         }
 
         // Test that we go back to the empty state when clearing all groups and channels.
+        mController.mChannelCount = 0;
         inGroups.clear();
         mController.updateFullList(mGroupList, inGroups);
         {
diff --git a/tests/unit/src/com/android/settings/wifi/WifiSwitchPreferenceTest.kt b/tests/unit/src/com/android/settings/wifi/WifiSwitchPreferenceTest.kt
index ca2ae8e..eb437dd 100644
--- a/tests/unit/src/com/android/settings/wifi/WifiSwitchPreferenceTest.kt
+++ b/tests/unit/src/com/android/settings/wifi/WifiSwitchPreferenceTest.kt
@@ -16,11 +16,19 @@
 
 package com.android.settings.wifi
 
+import android.app.settings.SettingsEnums.ACTION_WIFI_OFF
+import android.app.settings.SettingsEnums.ACTION_WIFI_ON
 import android.content.ContextWrapper
+import android.net.ConnectivityManager
+import android.net.Network
+import android.net.NetworkCapabilities
+import android.net.NetworkCapabilities.TRANSPORT_CELLULAR
+import android.net.NetworkCapabilities.TRANSPORT_WIFI
 import android.net.wifi.WifiManager
 import androidx.preference.SwitchPreferenceCompat
 import androidx.test.core.app.ApplicationProvider
 import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.settings.testutils.FakeFeatureFactory
 import com.android.settingslib.preference.createAndBindWidget
 import com.google.common.truth.Truth.assertThat
 import org.junit.Test
@@ -28,11 +36,13 @@
 import org.mockito.kotlin.doReturn
 import org.mockito.kotlin.mock
 import org.mockito.kotlin.stub
+import org.mockito.kotlin.verify
 
 @RunWith(AndroidJUnit4::class)
 class WifiSwitchPreferenceTest {
 
     private val mockWifiManager = mock<WifiManager>()
+    private val mockConnectivityManager = mock<ConnectivityManager>()
 
     private val context =
         object : ContextWrapper(ApplicationProvider.getApplicationContext()) {
@@ -41,6 +51,7 @@
             override fun getSystemService(name: String): Any? =
                 when (name) {
                     getSystemServiceName(WifiManager::class.java) -> mockWifiManager
+                    getSystemServiceName(ConnectivityManager::class.java) -> mockConnectivityManager
                     else -> super.getSystemService(name)
                 }
         }
@@ -66,6 +77,35 @@
     }
 
     @Test
+    fun setValue_valueTrue_metricsActionWifiOn() {
+        val metricsFeatureProvider = FakeFeatureFactory.setupForTest().metricsFeatureProvider
+
+        wifiSwitchPreference.storage(context).setBoolean(WifiSwitchPreference.KEY, true)
+
+        verify(metricsFeatureProvider).action(context, ACTION_WIFI_ON)
+    }
+
+    @Test
+    fun setValue_valueFalseWithoutDefaultWifi_metricsActionWifiOffWithFalse() {
+        val metricsFeatureProvider = FakeFeatureFactory.setupForTest().metricsFeatureProvider
+        mockDefaultNetwork(TRANSPORT_CELLULAR)
+
+        wifiSwitchPreference.storage(context).setBoolean(WifiSwitchPreference.KEY, false)
+
+        verify(metricsFeatureProvider).action(context, ACTION_WIFI_OFF, false)
+    }
+
+    @Test
+    fun setValue_valueFalseWithDefaultWifi_metricsActionWifiOffWithTrue() {
+        val metricsFeatureProvider = FakeFeatureFactory.setupForTest().metricsFeatureProvider
+        mockDefaultNetwork(TRANSPORT_WIFI)
+
+        wifiSwitchPreference.storage(context).setBoolean(WifiSwitchPreference.KEY, false)
+
+        verify(metricsFeatureProvider).action(context, ACTION_WIFI_OFF, true)
+    }
+
+    @Test
     fun performClick_defaultOn_checkedIsFalse() {
         mockWifiManager.stub { on { isWifiEnabled } doReturn true }
 
@@ -85,4 +125,16 @@
 
     private fun getSwitchPreference(): SwitchPreferenceCompat =
         wifiSwitchPreference.createAndBindWidget(context)
+
+    private fun mockDefaultNetwork(transportType: Int) {
+        val mockNetwork = mock<Network>()
+        val networkCapabilities =
+            NetworkCapabilities.Builder.withoutDefaultCapabilities()
+                .addTransportType(transportType)
+                .build()
+        mockConnectivityManager.stub {
+            on { activeNetwork } doReturn mockNetwork
+            on { getNetworkCapabilities(mockNetwork) } doReturn networkCapabilities
+        }
+    }
 }
diff --git a/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java b/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java
index 1ce05f8..80a98fc 100644
--- a/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java
@@ -18,6 +18,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.when;
 
@@ -32,6 +33,10 @@
 import androidx.test.core.app.ApplicationProvider;
 import androidx.test.ext.junit.runners.AndroidJUnit4;
 
+import com.android.settings.testutils.FakeFeatureFactory;
+import com.android.settings.wifi.factory.WifiFeatureProvider;
+import com.android.settings.wifi.repository.WifiHotspotRepository;
+
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -70,6 +75,10 @@
                 .setPassphrase(null, SoftApConfiguration.SECURITY_TYPE_OPEN).build();
         when(context.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
         when(mWifiManager.getSoftApConfiguration()).thenReturn(mConfig);
+        WifiHotspotRepository repository = mock(WifiHotspotRepository.class);
+        when(repository.isSpeedFeatureAvailable()).thenReturn(false);
+        WifiFeatureProvider provider = FakeFeatureFactory.setupForTest().getWifiFeatureProvider();
+        when(provider.getWifiHotspotRepository()).thenReturn(repository);
 
         mController = new WifiTetherSecurityPreferenceController(context, mListener);
         if (Looper.myLooper() == null) {
