diff options
author | Joey Grover <joeygrover@gmail.com> | 2018-09-17 17:07:16 -0400 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2018-09-17 17:07:16 -0400 |
commit | 81e7a0bf0ee607e435f9ee7850d6509b4be2022f (patch) | |
tree | 3378f6a317e52d12977d27c20817d53cae375d4a | |
parent | a432169e3d3d38dc31d9bbe216404e6b589e74d6 (diff) | |
download | sdl_android-81e7a0bf0ee607e435f9ee7850d6509b4be2022f.tar.gz |
Fix logic during RPC startserviceACK
-rw-r--r-- | sdl_android/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java | 20 |
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); |