diff options
author | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2020-12-09 17:04:35 -0500 |
---|---|---|
committer | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2020-12-09 17:04:35 -0500 |
commit | 6419e93f12f4210936e31524abf8b78832f7acb1 (patch) | |
tree | 5a2372e0f7d08dce831034be2232c02252ee3e21 | |
parent | b70b6103b3f1fc83d5c3afe77c68293f62ecc625 (diff) | |
download | sdl_android-feature/issue_116_RPC_Response.tar.gz |
add override methods for missed rpc responsesfeature/issue_116_RPC_Response
-rw-r--r-- | base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteWindowResponse.java | 23 | ||||
-rw-r--r-- | base/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java | 23 |
2 files changed, 46 insertions, 0 deletions
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteWindowResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteWindowResponse.java index 4c1551300..c50418cf9 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteWindowResponse.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteWindowResponse.java @@ -1,6 +1,7 @@ package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCResponse;
@@ -44,4 +45,26 @@ public class DeleteWindowResponse extends RPCResponse { setSuccess(success);
setResultCode(resultCode);
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of DeleteWindowResponse, not the same
+ if (!(obj instanceof DeleteWindowResponse)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
\ No newline at end of file diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java index e0862d2c7..0749fb630 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCResponse;
@@ -76,4 +77,26 @@ public class SetAppIconResponse extends RPCResponse { setSuccess(success);
setResultCode(resultCode);
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of SetAppIconResponse, not the same
+ if (!(obj instanceof SetAppIconResponse)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
\ No newline at end of file |