Developer option crashed when Bluetooth feature disabled

When Bluetooth feature is disabled, crash observed with developer option
is selected

Bug: 352864331
Change-Id: If4239f710847f2e01a3b419e1ce6f783f0522219
This commit is contained in:
chayemme
2024-07-14 20:50:56 +05:30
committed by chaneswar yemme
parent 9a492ca3cb
commit ec6e93f3f4

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