summaryrefslogtreecommitdiff
path: root/telephony/java/android
diff options
context:
space:
mode:
authorJayachandran Chinnakkannu <jayachandranc@google.com>2021-06-03 19:35:44 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-06-03 19:35:44 +0000
commit65b0d73c8105e5b83879d34e7ee015ada05d78b2 (patch)
tree3823757063c8056c33f840de3843d06640c190a3 /telephony/java/android
parentabbed5aeaa31f7604d377370c88084d1c6284be1 (diff)
parent3d749d67ae4ff2430b3ef36af840e70d63b12d30 (diff)
Merge "Override equals and hashCode methods for EpsBearerQosSessionAttributes and NrQosSessionAttributes" into sc-dev
Diffstat (limited to 'telephony/java/android')
-rw-r--r--telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java20
-rw-r--r--telephony/java/android/telephony/data/NrQosSessionAttributes.java24
2 files changed, 44 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java b/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java
index 9bc7a5c6cf96..fe4453081362 100644
--- a/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java
+++ b/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java
@@ -206,6 +206,26 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi
}
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ EpsBearerQosSessionAttributes epsBearerAttr = (EpsBearerQosSessionAttributes) o;
+ return mQci == epsBearerAttr.mQci
+ && mMaxUplinkBitRate == epsBearerAttr.mMaxUplinkBitRate
+ && mMaxDownlinkBitRate == epsBearerAttr.mMaxDownlinkBitRate
+ && mGuaranteedUplinkBitRate == epsBearerAttr.mGuaranteedUplinkBitRate
+ && mGuaranteedDownlinkBitRate == epsBearerAttr.mGuaranteedDownlinkBitRate
+ && mRemoteAddresses.size() == epsBearerAttr.mRemoteAddresses.size()
+ && mRemoteAddresses.containsAll(epsBearerAttr.mRemoteAddresses);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mQci, mMaxUplinkBitRate, mMaxDownlinkBitRate,
+ mGuaranteedUplinkBitRate, mGuaranteedDownlinkBitRate, mRemoteAddresses);
+ }
+
@NonNull
public static final Creator<EpsBearerQosSessionAttributes> CREATOR =
new Creator<EpsBearerQosSessionAttributes>() {
diff --git a/telephony/java/android/telephony/data/NrQosSessionAttributes.java b/telephony/java/android/telephony/data/NrQosSessionAttributes.java
index 4c37687910a1..c3a0eedf3d7d 100644
--- a/telephony/java/android/telephony/data/NrQosSessionAttributes.java
+++ b/telephony/java/android/telephony/data/NrQosSessionAttributes.java
@@ -241,6 +241,30 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
}
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ NrQosSessionAttributes nrQosAttr = (NrQosSessionAttributes) o;
+ return m5Qi == nrQosAttr.m5Qi
+ && mQfi == nrQosAttr.mQfi
+ && mMaxUplinkBitRate == nrQosAttr.mMaxUplinkBitRate
+ && mMaxDownlinkBitRate == nrQosAttr.mMaxDownlinkBitRate
+ && mGuaranteedUplinkBitRate == nrQosAttr.mGuaranteedUplinkBitRate
+ && mGuaranteedDownlinkBitRate == nrQosAttr.mGuaranteedDownlinkBitRate
+ && mAveragingWindow == nrQosAttr.mAveragingWindow
+ && mRemoteAddresses.size() == nrQosAttr.mRemoteAddresses.size()
+ && mRemoteAddresses.containsAll(nrQosAttr.mRemoteAddresses);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(m5Qi, mQfi, mMaxUplinkBitRate,
+ mMaxDownlinkBitRate, mGuaranteedUplinkBitRate,
+ mGuaranteedDownlinkBitRate, mAveragingWindow, mRemoteAddresses);
+ }
+
+
@NonNull
public static final Creator<NrQosSessionAttributes> CREATOR =
new Creator<NrQosSessionAttributes>() {