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

Commit c8cab0ba authored by Abhishek Gilra's avatar Abhishek Gilra
Browse files

Suppress error pop-ups for single digit dials.

Change-Id: I83599c6556dec40faa74944c1fe13568b2b634fc
Issue-id: YAM-78
parent 44c80fdb
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.text.BidiFormatter;
import android.text.TextDirectionHeuristics;
import android.text.TextUtils;
import android.telephony.Rlog;
import android.util.Log;

import static com.android.internal.telephony.CommandsInterface.*;
import com.android.internal.telephony.gsm.SsData;
@@ -106,6 +107,8 @@ public final class GsmMmiCode extends Handler implements MmiCode {
    static final String SC_PUK          = "05";
    static final String SC_PUK2         = "052";

    static final int SINGLE_DIGIT_DIALED =    1;

    //***** Event Constants

    static final int EVENT_SET_COMPLETE         = 1;
@@ -1121,8 +1124,15 @@ public final class GsmMmiCode extends Handler implements MmiCode {

                if (ar.exception != null) {
                    mState = State.FAILED;
                    // suppress error pop-up for single dialed digits
                    if (mDialingNumber.length() == SINGLE_DIGIT_DIALED) {
                        Log.w(
                            LOG_TAG,
                            mContext.getText(com.android.internal.R.string.mmiError).toString()
                            );
                    } else {
                        mMessage = getErrorMessage(ar);

                    }
                    mPhone.onMMIDone(this);
                }