Fix field reordering on toggle switch

Every field needs an explicit order.

Test: manual
Change-Id: Iae533db9e9d240bd0dc14da04a1831fe23005f9e
Fixes: 79749266
diff --git a/res/xml/channel_notification_settings.xml b/res/xml/channel_notification_settings.xml
index e16a74f..5afc70d 100644
--- a/res/xml/channel_notification_settings.xml
+++ b/res/xml/channel_notification_settings.xml
@@ -22,32 +22,38 @@
 
     <com.android.settings.applications.LayoutPreference
         android:key="pref_app_header"
+        android:order="1"
         android:layout="@layout/settings_entity_header" />
 
     <com.android.settings.applications.LayoutPreference
         android:key="block"
+        android:order="2"
         android:layout="@layout/styled_switch_bar" />
 
+    <!-- Importance toggle -->
+    <com.android.settingslib.RestrictedSwitchPreference
+        android:key="allow_sound"
+        android:order="3"
+        android:title="@string/allow_interruption"
+        android:summary="@string/allow_interruption_summary" />
+
+    <!-- Importance -->
+    <com.android.settings.RestrictedListPreference
+        android:key="importance"
+        android:order="10"
+        android:title="@string/notification_importance_title" />
+
     <PreferenceCategory
         android:key="channel_advanced"
         android:order="50"
-        settings:initialExpandedChildrenCount="1">
-        <!-- Importance -->
-        <com.android.settings.RestrictedListPreference
-            android:key="importance"
-            android:title="@string/notification_importance_title" />
-
-        <!-- Importance toggle -->
-        <com.android.settingslib.RestrictedSwitchPreference
-            android:key="allow_sound"
-            android:title="@string/allow_interruption"
-            android:summary="@string/allow_interruption_summary" />
+        settings:initialExpandedChildrenCount="0">
 
         <!-- Default ringtone -->
         <com.android.settings.notification.NotificationSoundPreference
             android:key="ringtone"
             android:title="@string/notification_channel_sound_title"
             android:dialogTitle="@string/notification_channel_sound_title"
+            android:order="11"
             android:showSilent="true"
             android:showDefault="true"
             android:ringtoneType="notification" />
@@ -55,23 +61,27 @@
         <!-- Vibration -->
         <com.android.settingslib.RestrictedSwitchPreference
             android:key="vibrate"
+            android:order="12"
             android:title="@string/notification_vibrate_title"
             settings:useAdditionalSummary="true" />
 
         <!-- Visibility Override -->
         <com.android.settings.RestrictedListPreference
             android:key="visibility_override"
+            android:order="13"
             android:title="@string/app_notification_visibility_override_title"/>
 
         <!-- Lights -->
         <com.android.settingslib.RestrictedSwitchPreference
             android:key="lights"
+            android:order="14"
             android:title="@string/notification_show_lights_title"
             settings:useAdditionalSummary="true"/>
 
         <!-- Show badge -->
         <com.android.settingslib.RestrictedSwitchPreference
             android:key="badge"
+            android:order="15"
             android:title="@string/notification_channel_badge_title"
             settings:useAdditionalSummary="true"
             settings:restrictedSwitchSummary="@string/enabled_by_admin"/>
@@ -79,12 +89,14 @@
         <!-- Bypass DND -->
         <com.android.settingslib.RestrictedSwitchPreference
             android:key="bypass_dnd"
+            android:order="16"
             android:title="@string/app_notification_override_dnd_title"
             android:summary="@string/app_notification_override_dnd_summary"
             settings:useAdditionalSummary="true"/>
 
         <Preference
             android:key="app_link"
+            android:order="17"
             android:title="@string/app_settings_link"
             settings:allowDividerAbove="true"/>
     </PreferenceCategory>