Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 023019e1 authored by Jayachandran Chinnakkannu's avatar Jayachandran Chinnakkannu Committed by Automerger Merge Worker
Browse files

Merge "Override equals and hashCode methods for EpsBearerQosSessionAttributes...

Merge "Override equals and hashCode methods for EpsBearerQosSessionAttributes and NrQosSessionAttributes" into sc-dev am: 65b0d73c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14815420

Change-Id: Id30987d95dd03c66500954e68dd595c455ece645
parents 13698586 65b0d73c
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -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>() {
+24 −0
Original line number Diff line number Diff line
@@ -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>() {