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

Commit b2c6b7c0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Read the voice message count properly"

parents 48a27a48 c82b1ab6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ public class GSMPhone extends PhoneBase {
            // get voice mail count from SIM
            countVoiceMessages = r.getVoiceMessageCount();
        }
        if (countVoiceMessages == -1) {
        if (countVoiceMessages == IccRecords.DEFAULT_VOICE_MESSAGE_COUNT) {
            countVoiceMessages = getStoredVoiceMessageCount();
        }
        Rlog.d(LOG_TAG, "updateVoiceMail countVoiceMessages = " + countVoiceMessages
+3 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ public abstract class IccRecords extends Handler implements IccConstants {

    private boolean mOEMHookSimRefresh = false;

    public static final int DEFAULT_VOICE_MESSAGE_COUNT = -2;
    public static final int UNKNOWN_VOICE_MESSAGE_COUNT = -1;

    @Override
    public String toString() {
        return "mDestroyed=" + mDestroyed
+3 −3
Original line number Diff line number Diff line
@@ -463,7 +463,7 @@ public class SIMRecords extends IccRecords {

    public int getVoiceMessageCount() {
        boolean voiceMailWaiting = false;
        int countVoiceMessages = -1;
        int countVoiceMessages = DEFAULT_VOICE_MESSAGE_COUNT;
        if (mEfMWIS != null) {
            // Use this data if the EF[MWIS] exists and
            // has been loaded
@@ -473,7 +473,7 @@ public class SIMRecords extends IccRecords {

            if (voiceMailWaiting && countVoiceMessages == 0) {
                // Unknown count = -1
                countVoiceMessages = -1;
                countVoiceMessages = UNKNOWN_VOICE_MESSAGE_COUNT;
            }
            if(DBG) log(" VoiceMessageCount from SIM MWIS = " + countVoiceMessages);
        } else if (mEfCPHS_MWI != null) {
@@ -483,7 +483,7 @@ public class SIMRecords extends IccRecords {
            // Refer CPHS4_2.WW6 B4.2.3
            if (indicator == 0xA) {
                // Unknown count = -1
                countVoiceMessages = -1;
                countVoiceMessages = UNKNOWN_VOICE_MESSAGE_COUNT;
            } else if (indicator == 0x5) {
                countVoiceMessages = 0;
            }