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

Commit dfdc501f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Expose a way to create a test network cell in MobileCountries" into main

parents e63e0b7a 035f4c4b
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -32,6 +32,12 @@ public final class MobileCountries {
    @NonNull
    private final com.android.i18n.timezone.MobileCountries mDelegate;

    /** Create a {@link MobileCountries} entity. This can be used for test networks. */
    public static MobileCountries createTestCell(String mcc) {
        return new MobileCountries(
                com.android.i18n.timezone.MobileCountries.create(mcc, Set.of(""), ""));
    }

    MobileCountries(@NonNull com.android.i18n.timezone.MobileCountries delegate) {
        mDelegate = Objects.requireNonNull(delegate);
    }
@@ -74,4 +80,20 @@ public final class MobileCountries {
                + "mDelegate=" + mDelegate
                + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o instanceof MobileCountries that) {
            return mDelegate.equals(that.mDelegate);
        }
        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hash(mDelegate);
    }
}