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

Commit 86c78ada authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Clear voicemail information if CDMA sim is inserted"

am: 68133d95

Change-Id: Idae1e98167fa147e0eb9520552bda1a79f46e82d
parents d6cf8ef9 68133d95
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -2273,18 +2273,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;