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

Commit 5ab57320 authored by Chen Xu's avatar Chen Xu Committed by Gerrit Code Review
Browse files

Merge "trigger carrier identification on SIM OTA"

parents b61885fe ba3cd5d9
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;
                    }
                }