|
@@ -299,7 +299,7 @@ class AudioModeModule extends ReactContextBaseJavaModule {
|
299
|
299
|
* Only used on Android < M. Runs on the main thread.
|
300
|
300
|
*/
|
301
|
301
|
void onBluetoothDeviceChange() {
|
302
|
|
- if (bluetoothHeadsetMonitor.isHeadsetAvailable()) {
|
|
302
|
+ if (bluetoothHeadsetMonitor != null && bluetoothHeadsetMonitor.isHeadsetAvailable()) {
|
303
|
303
|
availableDevices.add(DEVICE_BLUETOOTH);
|
304
|
304
|
} else {
|
305
|
305
|
availableDevices.remove(DEVICE_BLUETOOTH);
|