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