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

Commit 7a537e99 authored by fionaxu's avatar fionaxu
Browse files

Clear MWI notification for Sim removal

bug: 27650018
Change-Id: Ideda175a45d5c4f354303fb09d6001cc5a2b7174
parent 8b7c9964
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -2082,6 +2082,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    public void setVoiceMessageCount(int countWaiting) {
        mVmCount = countWaiting;
        int subId = getSubId();
        if (SubscriptionManager.isValidSubscriptionId(subId)) {

            Rlog.d(LOG_TAG, "setVoiceMessageCount: Storing Voice Mail Count = " + countWaiting +
                    " for mVmCountKey = " + VM_COUNT + subId + " in preferences.");
@@ -2090,7 +2091,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
            SharedPreferences.Editor editor = sp.edit();
            editor.putInt(VM_COUNT + subId, countWaiting);
            editor.apply();

        } else {
            Rlog.e(LOG_TAG, "setVoiceMessageCount in sharedPreference: invalid subId " + subId);
        }
        // notify listeners of voice mail
        notifyMessageWaitingIndicator();
    }
+2 −3
Original line number Diff line number Diff line
@@ -287,9 +287,6 @@ public class ServiceStateTracker extends Handler {

                    mPhone.notifyCallForwardingIndicator();

                    // update voicemail count and notify message waiting changed
                    mPhone.updateVoiceMail();

                    boolean restoreSelection = !context.getResources().getBoolean(
                            com.android.internal.R.bool.skip_restoring_network_selection);
                    mPhone.sendSubscriptionSettings(restoreSelection);
@@ -336,6 +333,8 @@ public class ServiceStateTracker extends Handler {
                    // MobileSignalController earlier were actually ignored due to invalid sub id.
                    updateSpnDisplay();
                }
                // update voicemail count and notify message waiting changed
                mPhone.updateVoiceMail();
            }
        }
    };