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

Commit a1a741e5 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

am: ce6e0309

Change-Id: I7251434996c21fdadd17935fce0ee69e92ff4d62
parents 7c845dbc ce6e0309
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;
                    }
                }