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

Commit c67708d5 authored by Shuo Qian's avatar Shuo Qian Committed by android-build-merger
Browse files

Merge "Fix MVNO override feature"

am: e5788ffd

Change-Id: I67134fe4d1b8d4492dbb21631a976481ececfaa7
parents 0eaa5dec e5788ffd
Loading
Loading
Loading
Loading
+28 −16
Original line number Diff line number Diff line
@@ -918,6 +918,17 @@ public class SIMRecords extends IccRecords {
                    try {
                        isRecordLoadResponse = true;

                        if (mCarrierTestOverride.isInTestMode() && getIMSI() != null) {
                            imsi = getIMSI();
                            try {
                                int mcc = Integer.parseInt(imsi.substring(0, 3));
                                mMncLength = MccTable.smallestDigitsMccForMnc(mcc);
                                log("[TestMode] mMncLength=" + mMncLength);
                            } catch (NumberFormatException e) {
                                mMncLength = UNKNOWN;
                                loge("[TestMode] Corrupt IMSI! mMncLength=" + mMncLength);
                            }
                        } else {
                            ar = (AsyncResult) msg.obj;
                            data = (byte[]) ar.result;

@@ -939,6 +950,7 @@ public class SIMRecords extends IccRecords {

                            mMncLength = data[3] & 0xf;
                            log("setting4 mMncLength=" + mMncLength);
                        }

                        if (mMncLength == 0xf) {
                            mMncLength = UNKNOWN;