Make sure we aren't trying to send a message when the telem service is
shut down and the pointer is null.
Signed-off-by: Keith Packard <keithp@keithp.com>
}
private void bluetoothEnabled(Intent data) {
}
private void bluetoothEnabled(Intent data) {
- try {
- mService.send(Message.obtain(null, TelemetryService.MSG_BLUETOOTH_ENABLED, null));
- } catch (RemoteException e) {
- AltosDebug.debug("send BT enabled message failed");
+ if (mService != null) {
+ try {
+ mService.send(Message.obtain(null, TelemetryService.MSG_BLUETOOTH_ENABLED, null));
+ } catch (RemoteException e) {
+ AltosDebug.debug("send BT enabled message failed");
+ }