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

Commit 65b0d73c authored by Jayachandran Chinnakkannu's avatar Jayachandran Chinnakkannu Committed by Android (Google) Code Review
Browse files

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

Merge "Override equals and hashCode methods for EpsBearerQosSessionAttributes and NrQosSessionAttributes" into sc-dev
parents abbed5ae 3d749d67
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>() {