diff options
author | Bilal <bilal@Bilals-MBP.localdomain> | 2018-08-27 13:26:20 -0400 |
---|---|---|
committer | Bilal <bilal@Bilals-MBP.localdomain> | 2018-08-27 13:26:20 -0400 |
commit | 4b1ee727df653c41a0f618f1af13710ddaf11bf8 (patch) | |
tree | fb98414de60cf32bf0576e885ed26fc0f223d8dd | |
parent | 18602e53c43d4fc6d8f06021e50e4a8ac4afff87 (diff) | |
download | sdl_android-4b1ee727df653c41a0f618f1af13710ddaf11bf8.tar.gz |
Set the fullAppId using fomrat method only when rpcVersion is equal or more than 5
-rw-r--r-- | sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java index 3fe41f972..ea939a86a 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java @@ -622,8 +622,8 @@ public class RegisterAppInterface extends RPCRequest { }
/**
- * Sets a unique ID, which an app will be given when approved
- *
+ * Sets a unique ID, which an app will be given when approved <br>
+ * Note: this will automatically parse the fullAppID into the smaller appId and set the appId value as well
* @param fullAppID
* a String value representing a unique ID, which an app will be
* given when approved
@@ -649,8 +649,10 @@ public class RegisterAppInterface extends RPCRequest { @Override
public void format(Version rpcVersion, boolean formatParams) {
- if (getFullAppID() == null){
- setFullAppID(getAppID());
+ if(rpcVersion == null || rpcVersion.getMajor() >= 5) {
+ if (getFullAppID() == null) {
+ setFullAppID(getAppID());
+ }
}
super.format(rpcVersion, formatParams);
}
|