Fix NPE in Bluetooth Settings.

Bug: 230347816
Test: Manual
Change-Id: I210ce81217466897c59509a31fb53d57eed71118
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
index b7f8909..9069fea 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
@@ -479,7 +479,7 @@
     @Override
     protected void refresh() {
         for (LocalBluetoothProfile profile : getProfiles()) {
-            if (profile != null && !profile.isProfileReady()) {
+            if (profile == null || !profile.isProfileReady()) {
                 continue;
             }
             SwitchPreference pref = mProfilesContainer.findPreference(