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

Commit 48ac5c05 authored by Allen Su's avatar Allen Su Committed by Gerrit Code Review
Browse files

Merge "[VoiceMail]Fix incorrect voice mail count as roaming"

parents 5cb7f6db b5e2f459
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2336,6 +2336,15 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        } else {
            Rlog.e(LOG_TAG, "setVoiceMessageCount in sharedPreference: invalid subId " + subId);
        }
        // store voice mail count in SIM
        IccRecords records = UiccController.getInstance().getIccRecords(
                mPhoneId, UiccController.APP_FAM_3GPP);
        if (records != null) {
            Rlog.d(LOG_TAG, "setVoiceMessageCount: updating SIM Records");
            records.setVoiceMessageWaiting(1, countWaiting);
        } else {
            Rlog.d(LOG_TAG, "setVoiceMessageCount: SIM Records not found");
        }
        // notify listeners of voice mail
        notifyMessageWaitingIndicator();
    }
+0 −11
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ import com.android.internal.telephony.SmsHeader;
import com.android.internal.telephony.SmsMessageBase;
import com.android.internal.telephony.SmsStorageMonitor;
import com.android.internal.telephony.VisualVoicemailSmsFilter;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.UiccController;
import com.android.internal.telephony.uicc.UsimServiceTable;

/**
@@ -154,15 +152,6 @@ public class GsmInboundSmsHandler extends InboundSmsHandler {
        }
        // update voice mail count in Phone
        mPhone.setVoiceMessageCount(voicemailCount);
        // store voice mail count in SIM & shared preferences
        IccRecords records = UiccController.getInstance().getIccRecords(
                mPhone.getPhoneId(), UiccController.APP_FAM_3GPP);
        if (records != null) {
            log("updateMessageWaitingIndicator: updating SIM Records");
            records.setVoiceMessageWaiting(1, voicemailCount);
        } else {
            log("updateMessageWaitingIndicator: SIM Records not found");
        }
    }

    /**