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

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

Merge "trigger carrier identification on SIM OTA" am: 5ab57320

am: e11e5c67

Change-Id: Ibc0d9e8ca44a607a0c4c10a6c4f2d204eed36023
parents 951479fd e11e5c67
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;
                    }
                }