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

Commit d41cd9cb authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Re-register for IccRecordEvents on phone type change.

Re-registration otherwise happens only on uicc application change.
However, it is possible that application does not change on phone
type change, thus it should be done on phone type change as well.

Test: basic sanity
Bug: 120264510
Change-Id: I9521632e856d83c55dede03ff582751b220bfa94
parent c6645cd8
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -440,6 +440,15 @@ public class GsmCdmaPhone extends Phone {
        mSST.updatePhoneType();
        setPhoneName(precisePhoneType == PhoneConstants.PHONE_TYPE_GSM ? "GSM" : "CDMA");
        onUpdateIccAvailability();
        // if is possible that onUpdateIccAvailability() does not unregister and re-register for
        // ICC events, for example if mUiccApplication does not change which can happen if phone
        // type is transitioning from CDMA to GSM but 3gpp2 application was not available.
        // To handle such cases, unregister and re-register here. They still need to be called in
        // onUpdateIccAvailability(), since in normal cases register/unregister calls can be on
        // different IccRecords objects. Here they are on the same IccRecords object.
        unregisterForIccRecordEvents();
        registerForIccRecordEvents();

        mCT.updatePhoneType();

        int radioState = mCi.getRadioState();