Merge "Developer option crashed when Bluetooth feature disabled" into main
This commit is contained in:
@@ -45,9 +45,10 @@ public class BluetoothMaxConnectedAudioDevicesPreferenceController extends
|
|||||||
super(context);
|
super(context);
|
||||||
|
|
||||||
final BluetoothManager bluetoothManager = context.getSystemService(BluetoothManager.class);
|
final BluetoothManager bluetoothManager = context.getSystemService(BluetoothManager.class);
|
||||||
|
if(bluetoothManager != null && bluetoothManager.getAdapter() != null) {
|
||||||
mDefaultMaxConnectedAudioDevices =
|
mDefaultMaxConnectedAudioDevices =
|
||||||
bluetoothManager.getAdapter().getMaxConnectedAudioDevices();
|
bluetoothManager.getAdapter().getMaxConnectedAudioDevices();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user