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

Commit e5788ffd authored by Shuo Qian's avatar Shuo Qian Committed by Gerrit Code Review
Browse files

Merge "Fix MVNO override feature"

parents 0624b77b 26e421a7
Loading
Loading
Loading
Loading
+28 −16
Original line number Diff line number Diff line
@@ -919,6 +919,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;

@@ -940,6 +951,7 @@ public class SIMRecords extends IccRecords {

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

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