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

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

Merge "Allow ECT MMI Command to be dialled in Alerting State"

parents 20edac3c 4daffca5
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.os.RegistrantList;
import android.os.Registrant;
import android.os.SystemProperties;
import android.telephony.MSimTelephonyManager;
import android.telephony.PhoneNumberUtils;
import android.telephony.PhoneStateListener;
import android.telephony.Rlog;
import android.telephony.ServiceState;
@@ -112,6 +113,8 @@ public class CallManager {
    // save a cached copy of Ims Phone
    private Phone mImsPhone;

    protected String mDialString;

    private boolean mSpeedUpAudioForMtCall = false;

    protected CmHandler mHandler;
@@ -909,6 +912,7 @@ public class CallManager {

        Phone basePhone = getPhoneBase(phone);
        Connection result;
        mDialString = dialString;

        if (VDBG) {
            Rlog.d(LOG_TAG, " dial(" + basePhone + ", "+ dialString + ")");
@@ -952,6 +956,18 @@ public class CallManager {
        return result;
    }

    protected boolean isExplicitCallTransferMMI (String dialString) {
        boolean result = false;
        String newDialString = PhoneNumberUtils.stripSeparators(dialString);
        if ((newDialString != null) && (newDialString.length() == 1)) {
            char ch = newDialString.charAt(0);
            if (ch == '4') {
                result = true;
            }
        }
        return result;
    }

    /**
     * Initiate a new voice connection. This happens asynchronously, so you
     * cannot assume the audio path is connected (or a call index has been
@@ -993,6 +1009,11 @@ public class CallManager {
                && !hasRingingCall
                && ((fgCallState == Call.State.ACTIVE)
                    || (fgCallState == Call.State.IDLE)
                    /*As per 3GPP TS 51.010-1 section 31.13.1.4
                    call should be alowed when the foreground
                    call is in ALERTING state*/
                    || ((fgCallState == Call.State.ALERTING) &&
                            isExplicitCallTransferMMI(mDialString))
                    || (fgCallState == Call.State.DISCONNECTED)));

        if (result == false) {
+6 −0
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@ public class ExtCallManager extends CallManager {
        Phone basePhone = getPhoneBase(phone);
        int subscription = phone.getSubscription();
        Connection result;
        mDialString = dialString;

        if (VDBG) {
            Rlog.d(LOG_TAG, " dial(" + basePhone + ", "+ dialString + ")" +
@@ -516,6 +517,11 @@ public class ExtCallManager extends CallManager {
                && !hasRingingCall
                && ((fgCallState == Call.State.ACTIVE)
                    || (fgCallState == Call.State.IDLE)
                    /*As per 3GPP TS 51.010-1 section 31.13.1.4
                    call should be alowed when the foreground
                    call is in ALERTING state*/
                    || ((fgCallState == Call.State.ALERTING) &&
                            isExplicitCallTransferMMI(mDialString))
                    || (fgCallState == Call.State.DISCONNECTED)));

        if (result == false) {