summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2019-05-02 11:38:53 -0400
committerJoey Grover <joeygrover@gmail.com>2019-05-02 11:38:53 -0400
commit5e852f74581a836b650d7076dcdd876ca9beb512 (patch)
tree07414234fa9de8040436fcf84134205c9ee34884
parent349bca1ecd3fa6a39f0c2f3ee8248c2cd759ae3f (diff)
downloadsdl_android-5e852f74581a836b650d7076dcdd876ca9beb512.tar.gz
Handle RPCv1.0.0 that doesn’t accept max RPC ver
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
index 1cabf9b89..41a173ee9 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
@@ -6302,8 +6302,14 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
if (sdlMsgVersion == null) {
sdlMsgVersion = new SdlMsgVersion();
- sdlMsgVersion.setMajorVersion(MAX_SUPPORTED_RPC_VERSION.getMajor());
- sdlMsgVersion.setMinorVersion(MAX_SUPPORTED_RPC_VERSION.getMinor());
+ if(protocolVersion.getMajor() == 1) {
+ DebugTool.logInfo("Connected to an older module, must send 1.0.0 as RPC spec");
+ sdlMsgVersion.setMajorVersion(1);
+ sdlMsgVersion.setMinorVersion(0);
+ }else {
+ sdlMsgVersion.setMajorVersion(MAX_SUPPORTED_RPC_VERSION.getMajor());
+ sdlMsgVersion.setMinorVersion(MAX_SUPPORTED_RPC_VERSION.getMinor());
+ }
}
if (languageDesired == null) {
languageDesired = Language.EN_US;