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

Commit 41e92ba6 authored by Hyunho's avatar Hyunho
Browse files

Add the hashCode API to EuiccRulesAuthTable

A bug in Metalava (b/311690008) means that many API Lint problems are ignored.
Even though there was no hasCode API in the EuiccRulesAuthTable, there was no warning due to b/311690008.

By the way, Bug b/311690008 is currently fixed, so I'm removing warning by adding hashCode API to EuiccRulesAuthTable.

Bug: 341152843
Test: m checkapi
Change-Id: I6e5cc35e51ab1098a52cfe3be117189b1361e4fd
parent 0df789ab
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -242,6 +242,16 @@ public final class EuiccRulesAuthTable implements Parcelable {
                && Arrays.equals(mPolicyRuleFlags, that.mPolicyRuleFlags);
                && Arrays.equals(mPolicyRuleFlags, that.mPolicyRuleFlags);
    }
    }


    @Override
    public int hashCode() {
        int result = Arrays.hashCode(mPolicyRules);
        result = 31 * result + Arrays.hashCode(mPolicyRuleFlags);
        for (int i = 0; i < mCarrierIds.length; i++) {
            result = 31 * result + Arrays.hashCode(mCarrierIds[i]);
        }
        return result;
    }

    private EuiccRulesAuthTable(Parcel source) {
    private EuiccRulesAuthTable(Parcel source) {
        mPolicyRules = source.createIntArray();
        mPolicyRules = source.createIntArray();
        int len = mPolicyRules.length;
        int len = mPolicyRules.length;