diff options
| author | 2024-07-31 03:00:32 +0000 | |
|---|---|---|
| committer | 2024-07-31 03:00:32 +0000 | |
| commit | adc9b66f1045e13142be97ba6d73fc3a76cf9a62 (patch) | |
| tree | 92895b656476139919b03d89b8693578f0c60eb8 | |
| parent | ca9a2f5d4baa62571e5a1ee3f017227bc8b96077 (diff) | |
| parent | 51db8c941cb415781087ba68cf96a12632f7b7c7 (diff) | |
Merge "Add nullability check to fix crash" into main
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java index 05431778301c..2573907f95e5 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java @@ -864,7 +864,7 @@ public class BluetoothUtils { if (localBtManager == null) return null; LocalBluetoothLeBroadcast broadcast = localBtManager.getProfileManager().getLeAudioBroadcastProfile(); - if (!broadcast.isEnabled(null)) return null; + if (broadcast == null || !broadcast.isEnabled(null)) return null; int primaryGroupId = getPrimaryGroupIdForBroadcast(contentResolver); if (primaryGroupId == BluetoothCsipSetCoordinator.GROUP_ID_INVALID) return null; LocalBluetoothLeBroadcastAssistant assistant = @@ -883,4 +883,4 @@ public class BluetoothUtils { } return null; } -}
\ No newline at end of file +} |