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

Commit bc6cc803 authored by Nancy Chen's avatar Nancy Chen Committed by Gerrit - the friendly Code Review server
Browse files

Enable account selection for MMI codes that involve "dialing".

Some MMI codes (specifically a small set of GSM codes) involve pressing
"dial" to send the code. The connection service identifies that this is
an MMI code and responds accordingly, including canceling the call. In
the multi-SIM case, we want to bring up a dialog to select a SIM
"connect" through. We can use the current PRE_DIAL_WAIT state and select
account dialog to do this.

Bug: 17573147
Change-Id: Id765e595f3149c088ae5de72a97cc2034338b6ee
parent c248574a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -575,7 +575,10 @@ public final class CallsManager extends Call.ListenerBase {
            return null;
        }

        if (phoneAccountHandle == null && accounts.size() > 1 && !isEmergencyCall) {
        boolean needsAccountSelection = phoneAccountHandle == null && accounts.size() > 1 &&
                !isEmergencyCall;

        if (needsAccountSelection) {
            // This is the state where the user is expected to select an account
            call.setState(CallState.PRE_DIAL_WAIT);
            extras.putParcelableList(android.telecom.Call.AVAILABLE_PHONE_ACCOUNTS, accounts);
@@ -586,7 +589,7 @@ public final class CallsManager extends Call.ListenerBase {
        call.setExtras(extras);

        // Do not add the call if it is a potential MMI code.
        if (isPotentialMMICode(handle) || isPotentialInCallMMICode) {
        if ((isPotentialMMICode(handle) || isPotentialInCallMMICode) && !needsAccountSelection) {
            call.addListener(this);
        } else {
            addCall(call);