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

Commit eafc952d authored by Holly Jiuyu Sun's avatar Holly Jiuyu Sun
Browse files

Add hashCode() in UiccAccessRule.

hashCode() and equals() should appear together.

Bug: 73785903
Test: test on phone
Change-Id: I7f9d8943f6a0e1039815e21ff6dfe035bd674639
parent f7227aee
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -220,6 +220,15 @@ public final class UiccAccessRule implements Parcelable {
                && mAccessType == that.mAccessType;
    }

    @Override
    public int hashCode() {
        int result = 1;
        result = 31 * result + Arrays.hashCode(mCertificateHash);
        result = 31 * result + Objects.hashCode(mPackageName);
        result = 31 * result + Objects.hashCode(mAccessType);
        return result;
    }

    @Override
    public String toString() {
        return "cert: " + IccUtils.bytesToHexString(mCertificateHash) + " pkg: " +