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

Commit b5a9aaad authored by Mengjun Leng's avatar Mengjun Leng
Browse files

Refresh SIM operator numeric for multi-mode SIM

Ensure API Phone#getOperatorNumeric and TelephonyManager#getSimOperator
return the same.

Bug: 79839088

Change-Id: If95f52dcbbf46121732928cc82fce3779c62812a
parent 6ca66f59
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -2652,10 +2652,21 @@ public class GsmCdmaPhone extends Phone {
                if (DBG) {
                    logd("New Uicc application found. type = " + newUiccApplication.getType());
                }
                final IccRecords iccRecords = newUiccApplication.getIccRecords();
                mUiccApplication.set(newUiccApplication);
                mIccRecords.set(newUiccApplication.getIccRecords());
                mIccRecords.set(iccRecords);
                registerForIccRecordEvents();
                mIccPhoneBookIntManager.updateIccRecords(mIccRecords.get());
                mIccPhoneBookIntManager.updateIccRecords(iccRecords);
                if (iccRecords != null) {
                    final String simOperatorNumeric = iccRecords.getOperatorNumeric();
                    if (DBG) {
                        logd("New simOperatorNumeric = " + simOperatorNumeric);
                    }
                    if (!TextUtils.isEmpty(simOperatorNumeric)) {
                        TelephonyManager.from(mContext).setSimOperatorNumericForPhone(mPhoneId,
                                simOperatorNumeric);
                    }
                }
            }
        }
    }