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

Commit 60ed48f9 authored by Hall Liu's avatar Hall Liu
Browse files

Clear voicemail information if CDMA sim is inserted

When a new sim is inserted and we connect to a CDMA network, the
voicemail information may not be updated. This changes the behavior to
be the same as for GSM.

Change-Id: Ie8745832673a79b3ad88819cd82caa8569a20ad6
Fixes: 63615700
Test: manual
parent ff5b1b9f
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -2278,18 +2278,17 @@ public class GsmCdmaPhone extends Phone {
                break;

            case EVENT_SIM_RECORDS_LOADED:
                if (isPhoneTypeGsm()) {
                updateCurrentCarrierInProvider();

                // Check if this is a different SIM than the previous one. If so unset the
                // voice mail number.
                String imsi = getVmSimImsi();
                String imsiFromSIM = getSubscriberId();
                    if (imsi != null && imsiFromSIM != null && !imsiFromSIM.equals(imsi)) {
                if ((!isPhoneTypeGsm() || imsi != null) && imsiFromSIM != null
                        && !imsiFromSIM.equals(imsi)) {
                    storeVoiceMailNumber(null);
                    setVmSimImsi(null);
                }
                }

                mSimRecordsLoadedRegistrants.notifyRegistrants();
                break;