summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2018-09-17 17:07:16 -0400
committerJoey Grover <joeygrover@gmail.com>2018-09-17 17:07:16 -0400
commit81e7a0bf0ee607e435f9ee7850d6509b4be2022f (patch)
tree3378f6a317e52d12977d27c20817d53cae375d4a
parenta432169e3d3d38dc31d9bbe216404e6b589e74d6 (diff)
downloadsdl_android-81e7a0bf0ee607e435f9ee7850d6509b4be2022f.tar.gz
Fix logic during RPC startserviceACK
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java b/sdl_android/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java
index d8a8de86f..983ea10a0 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java
@@ -815,7 +815,6 @@ public class SdlProtocol {
return;
}
- boolean activeTransportsHandled = false;
// This enables custom behavior based on protocol version specifics
if (protocolVersion.isNewerThan(new Version("5.1.0")) >= 0) {
@@ -868,22 +867,19 @@ public class SdlProtocol {
setTransportPriorityForService(SessionType.PCM, audio);
setTransportPriorityForService(SessionType.NAV, video);
- activeTransportsHandled = true;
-
} else {
Log.w(TAG, "Received a start service ack for RPC service while already active on a different transport.");
return;
}
- }
+ }else {
- //Version is either not included or lower than 5.1.0
- if(requiresHighBandwidth
- && TransportType.BLUETOOTH.equals(transportRecord.getType())){
- //transport can't support high bandwidth
- onTransportNotAccepted(transportRecord.getType() + " can't support high bandwidth requirement, and secondary transport not supported in this protocol version: " + version);
- return;
- }
- if(!activeTransportsHandled) {
+ //Version is either not included or lower than 5.1.0
+ if (requiresHighBandwidth
+ && TransportType.BLUETOOTH.equals(transportRecord.getType())) {
+ //transport can't support high bandwidth
+ onTransportNotAccepted(transportRecord.getType() + " can't support high bandwidth requirement, and secondary transport not supported in this protocol version: " + version);
+ return;
+ }
activeTransports.put(SessionType.RPC, transportRecord);
activeTransports.put(SessionType.BULK_DATA, transportRecord);