Merge "Fix multi-toggle flicker bug" into main
diff --git a/src/com/android/settings/bluetooth/ui/viewmodel/BluetoothDeviceDetailsViewModel.kt b/src/com/android/settings/bluetooth/ui/viewmodel/BluetoothDeviceDetailsViewModel.kt
index dd0012e..3b7a582 100644
--- a/src/com/android/settings/bluetooth/ui/viewmodel/BluetoothDeviceDetailsViewModel.kt
+++ b/src/com/android/settings/bluetooth/ui/viewmodel/BluetoothDeviceDetailsViewModel.kt
@@ -58,6 +58,8 @@
             deviceSettingRepository.getDeviceSettingsConfig(cachedDevice)
         }
 
+    private val spatialAudioModel by lazy { spatialAudioInteractor.getDeviceSetting(cachedDevice) }
+
     suspend fun getItems(fragment: FragmentTypeModel): List<DeviceSettingConfigItemModel>? =
         when (fragment) {
             is FragmentTypeModel.DeviceDetailsMainFragment -> items.await()?.mainItems
@@ -81,7 +83,7 @@
         }
         return when (settingId) {
             DeviceSettingId.DEVICE_SETTING_ID_SPATIAL_AUDIO_MULTI_TOGGLE ->
-                spatialAudioInteractor.getDeviceSetting(cachedDevice)
+                spatialAudioModel
             else -> deviceSettingRepository.getDeviceSetting(cachedDevice, settingId)
         }.map { it?.toPreferenceModel() }
     }