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

Commit 6c428457 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 8f92f958 on remote branch

Change-Id: Id2ca217045065ef3431253db8500c93287be46c6
parents b3881559 8f92f958
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ public abstract class IccPhoneBookInterfaceManager extends IIccPhoneBook.Stub {
        UiccCardApplication validApp = null;
        int numApps = card.getNumApplications();
        boolean isCurrentAppFound = false;

        mIs3gCard = false;
        for (int i = 0; i < numApps; i++) {
            UiccCardApplication app = card.getApplicationIndex(i);
            if (app != null) {
+3 −2
Original line number Diff line number Diff line
@@ -817,6 +817,7 @@ public abstract class InboundSmsHandler extends StateMachine {
        // Store the voice mail count in persistent memory.
        String imsi = mPhone.getSubscriberId();
        int mwi = mPhone.getVoiceMessageCount();
        int sub = mPhone.getSubscription();

        log("Storing Voice Mail Count = " + mwi
                    + " for imsi = " + imsi
@@ -826,8 +827,8 @@ public abstract class InboundSmsHandler extends StateMachine {

        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
        SharedPreferences.Editor editor = sp.edit();
        editor.putInt(mPhone.VM_COUNT, mwi);
        editor.putString(mPhone.VM_ID, imsi);
        editor.putInt(mPhone.VM_COUNT + sub, mwi);
        editor.putString(mPhone.VM_ID + sub, imsi);
        editor.commit();
    }

+26 −0
Original line number Diff line number Diff line
@@ -1080,6 +1080,32 @@ public abstract class PhoneBase extends Handler implements Phone {
        notifyMessageWaitingIndicator();
    }

    /**
     * Gets the voice mail count from preferences
     */
    public int getStoredVoiceMessageCount() {
        int countVoiceMessages = 0;
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
        int sub = getSubscription();
        String imsi = sp.getString(VM_ID + sub, null);
        String currentImsi = getSubscriberId();

        if (DEBUG_PHONE) {
            Rlog.d(LOG_TAG, "Voicemail count retrieval for Imsi = " + imsi +
                    " current Imsi = " + currentImsi + " sub = " + sub);
        }

        if ((imsi != null) && (currentImsi != null)
                && (currentImsi.equals(imsi))) {
            // get voice mail count from preferences
            countVoiceMessages = sp.getInt(VM_COUNT + sub, 0);
            if (DEBUG_PHONE) {
                Rlog.d(LOG_TAG, "Voice Mail Count from preference = " + countVoiceMessages);
            }
        }
        return countVoiceMessages;
    }

    /**
     * Returns the CDMA ERI icon index to display
     */
+1 −7
Original line number Diff line number Diff line
@@ -868,16 +868,10 @@ public class CDMAPhone extends PhoneBase {
    }

    // pending voice mail count updated after phone creation
    private void updateVoiceMail() {
    protected void updateVoiceMail() {
        setVoiceMessageCount(getStoredVoiceMessageCount());
    }

    /** gets the voice mail count from preferences */
    private int getStoredVoiceMessageCount() {
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
        return (sp.getInt(VM_COUNT, 0));
    }

    @Override
    public String getVoiceMailAlphaTag() {
        // TODO: Where can we get this value has to be clarified with QC.
+0 −19
Original line number Diff line number Diff line
@@ -1862,25 +1862,6 @@ public class GSMPhone extends PhoneBase {
        mCi.changeBarringPassword(facility, oldPwd, newPwd, result);
    }

    /** gets the voice mail count from preferences */
    private int getStoredVoiceMessageCount() {
        int countVoiceMessages = 0;
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
        String imsi = sp.getString(VM_ID, null);
        String currentImsi = getSubscriberId();

        Rlog.d(LOG_TAG, "Voicemail count retrieval for Imsi = " + imsi +
                " current Imsi = " + currentImsi );

        if ((imsi != null) && (currentImsi != null)
                && (currentImsi.equals(imsi))) {
            // get voice mail count from preferences
            countVoiceMessages = sp.getInt(VM_COUNT, 0);
            Rlog.d(LOG_TAG, "Voice Mail Count from preference = " + countVoiceMessages );
        }
        return countVoiceMessages;
    }

     /**
     * Sets the SIM voice message waiting indicator records.
     * @param line GSM Subscriber Profile Number, one-based. Only '1' is supported