diff options
author | Joey Grover <joeygrover@gmail.com> | 2019-05-02 11:38:53 -0400 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2019-05-02 11:38:53 -0400 |
commit | 5e852f74581a836b650d7076dcdd876ca9beb512 (patch) | |
tree | 07414234fa9de8040436fcf84134205c9ee34884 | |
parent | 349bca1ecd3fa6a39f0c2f3ee8248c2cd759ae3f (diff) | |
download | sdl_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.java | 10 |
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;
|