summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Kast <julian@livio.com>2021-11-16 09:45:27 -0500
committerJulian Kast <julian@livio.com>2021-11-16 09:45:27 -0500
commit03880c444b47e72320194265237302a5fb3de946 (patch)
tree089307a4247aacd994358e00176898e1a4bfb1e7
parent0bda03437ed79d1e4890060ff9a816db3ccd5251 (diff)
downloadsdl_android-bugfix/issue_1661.tar.gz
Add check to see if bluetooth adapter is available before we send the spp notificationbugfix/issue_1661
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java
index 9d24ddfec..4be83a7bc 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java
@@ -1942,7 +1942,7 @@ public class SdlRouterService extends Service {
bluetoothTransport.setStateManually(MultiplexBluetoothTransport.STATE_NONE);
bluetoothTransport = null;
}
- if (errorBundle != null && errorBundle.getByte(MultiplexBaseTransport.ERROR_REASON_KEY) == MultiplexBaseTransport.REASON_SPP_ERROR) {
+ if (errorBundle != null && errorBundle.getByte(MultiplexBaseTransport.ERROR_REASON_KEY) == MultiplexBaseTransport.REASON_SPP_ERROR && bluetoothAvailable()) {
notifySppError();
}
break;