prevent NPE
This commit is contained in:
parent
534b27cb71
commit
d300a95e39
1 changed files with 7 additions and 5 deletions
|
@ -81,11 +81,13 @@ public class QueueThread extends Thread {
|
|||
pump.stopConnecting();
|
||||
pump.disconnect("watchdog");
|
||||
SystemClock.sleep(1000);
|
||||
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
mBluetoothAdapter.disable();
|
||||
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
if (bluetoothAdapter != null) {
|
||||
bluetoothAdapter.disable();
|
||||
SystemClock.sleep(1000);
|
||||
mBluetoothAdapter.enable();
|
||||
bluetoothAdapter.enable();
|
||||
SystemClock.sleep(1000);
|
||||
}
|
||||
//start over again once after watchdog barked
|
||||
//Notification notification = new Notification(Notification.OLD_NSCLIENT, "Watchdog", Notification.URGENT);
|
||||
//rxBus.send(new EventNewNotification(notification));
|
||||
|
|
Loading…
Reference in a new issue