Merge "Developer option crashed when Bluetooth feature disabled" into main

This commit is contained in:
Yuanru Qian
2024-07-25 03:31:43 +00:00
committed by Gerrit Code Review

View File

@@ -45,9 +45,10 @@ public class BluetoothMaxConnectedAudioDevicesPreferenceController extends
super(context);
final BluetoothManager bluetoothManager = context.getSystemService(BluetoothManager.class);
mDefaultMaxConnectedAudioDevices =
bluetoothManager.getAdapter().getMaxConnectedAudioDevices();
if(bluetoothManager != null && bluetoothManager.getAdapter() != null) {
mDefaultMaxConnectedAudioDevices =
bluetoothManager.getAdapter().getMaxConnectedAudioDevices();
}
}
@Override