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

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

Merge "Expect MCC/MNC to be an empty or null string" into main

parents c7c29d54 6b80adec
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -618,9 +618,9 @@ public class SubscriptionInfo implements Parcelable {
    @Deprecated
    public int getMcc() {
        try {
            return mMcc == null ? 0 : Integer.parseInt(mMcc);
            return TextUtils.isEmpty(mMcc) ? 0 : Integer.parseInt(mMcc);
        } catch (NumberFormatException e) {
            Log.w(SubscriptionInfo.class.getSimpleName(), "MCC string is not a number");
            Log.w(SubscriptionInfo.class.getSimpleName(), "MCC string is not a number: " + mMcc);
            return 0;
        }
    }
@@ -633,9 +633,9 @@ public class SubscriptionInfo implements Parcelable {
    @Deprecated
    public int getMnc() {
        try {
            return mMnc == null ? 0 : Integer.parseInt(mMnc);
            return TextUtils.isEmpty(mMnc) ? 0 : Integer.parseInt(mMnc);
        } catch (NumberFormatException e) {
            Log.w(SubscriptionInfo.class.getSimpleName(), "MNC string is not a number");
            Log.w(SubscriptionInfo.class.getSimpleName(), "MNC string is not a number: " + mMnc);
            return 0;
        }
    }