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

Commit e11e5c67 authored by Chen Xu's avatar Chen Xu Committed by android-build-merger
Browse files

Merge "trigger carrier identification on SIM OTA"

am: 5ab57320

Change-Id: Ided9faf285e64b420603852ac06e9ceacefcc0f4
parents 479b14e0 5ab57320
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -222,17 +222,18 @@ public class CarrierIdentifier extends Handler {
                }
                break;
            case ICC_CHANGED_EVENT:
                IccRecords newIccRecords = UiccController.getInstance().getIccRecords(
                        mPhone.getPhoneId(), UiccController.APP_FAM_3GPP);
                final IccRecords newIccRecords = mPhone.getIccRecords();
                if (mIccRecords != newIccRecords) {
                    if (mIccRecords != null) {
                        logd("Removing stale icc objects.");
                        mIccRecords.unregisterForSpnUpdate(this);
                        mIccRecords.unregisterForRecordsLoaded(this);
                        mIccRecords = null;
                    }
                    if (newIccRecords != null) {
                        logd("new Icc object");
                        newIccRecords.registerForSpnUpdate(this, SPN_OVERRIDE_EVENT, null);
                        newIccRecords.registerForRecordsLoaded(this, SIM_LOAD_EVENT, null);
                        mIccRecords = newIccRecords;
                    }
                }