Fix bug when bluetooth profile is not in more settings

BUG: 343317785
Test: local tested
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: I3f53c3b0b60997aa3a1685fe2512ff2f37b32d18
diff --git a/src/com/android/settings/bluetooth/ui/view/DeviceDetailsFragmentFormatter.kt b/src/com/android/settings/bluetooth/ui/view/DeviceDetailsFragmentFormatter.kt
index 5418a04..de2d864 100644
--- a/src/com/android/settings/bluetooth/ui/view/DeviceDetailsFragmentFormatter.kt
+++ b/src/com/android/settings/bluetooth/ui/view/DeviceDetailsFragmentFormatter.kt
@@ -139,7 +139,7 @@
             viewModel
                 .getItems(fragmentType)
                 ?.filterIsInstance<DeviceSettingConfigItemModel.BuiltinItem.BluetoothProfilesItem>()
-                ?.first()
+                ?.firstOrNull()
                 ?.invisibleProfiles
         }