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

Commit 6e8a220a authored by giseok.seo's avatar giseok.seo Committed by Amit Mahajan
Browse files

Fix voice mail number to modify for some carrier card.

1.H3G Denmark SIM Card is set to "not available" in UST(Usim service Table) to
  EF_MBDN file of SIM CARD. so do not edit voicemail number.

2.AOSP default voicemail number is empty.
  so if inserted H3G Denmark SIM card,
  User can't edit voicemail number and do not use voicemail service.

Bug: 14093735
Change-Id: I2469ef8e8bda376adcdc9549bf4227bc4c0ddb2e
parent f3e102d8
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.telephony.PhoneNumberUtils;
import android.telephony.SmsMessage;
import android.text.TextUtils;
import android.telephony.Rlog;
import android.content.res.Resources;

import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.MccTable;
@@ -1055,6 +1056,7 @@ public class SIMRecords extends IccRecords {
                isRecordLoadResponse = false;
                ar = (AsyncResult)msg.obj;

                if (DBG) log("EVENT_SET_MBDN_DONE ex:" + ar.exception);
                if (ar.exception == null) {
                    mVoiceMailNum = mNewVoiceMailNum;
                    mVoiceMailTag = mNewVoiceMailTag;
@@ -1087,8 +1089,18 @@ public class SIMRecords extends IccRecords {
                                    onCphsCompleted));
                } else {
                    if (ar.userObj != null) {
                        Resources resource = Resources.getSystem();
                        if (ar.exception != null && resource.getBoolean(com.android.internal.
                                    R.bool.editable_voicemailnumber)) {
                            // GSMPhone will store vm number on device
                            // when IccVmNotSupportedException occurred
                            AsyncResult.forMessage(((Message) ar.userObj)).exception
                                = new IccVmNotSupportedException(
                                        "Update SIM voice mailbox error");
                        } else {
                            AsyncResult.forMessage(((Message) ar.userObj)).exception
                                = ar.exception;
                        }
                        ((Message) ar.userObj).sendToTarget();
                    }
                }