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

Commit c345cf26 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Clear postdial digits on failed outgoing call.

The Postdial digits are populated when a call is created in Telecom; the
connectionservice strips the postdial digits and edits the outgoing
connection back to Telecom once its created, removing them from the
Telecom call.  When a call fails fast in Telephony, a failed connection
is sent to Telecom without the stripped postdial digits; further even if
it were sent the failed connection is simply used as a placeholder to stop
the connection creation process.

To solve this issue, clearing the postdial digits on the telecom call when
a connection creation failure occurs.  The result is the call log entry
will not have postdial digits separated from the dial digits.  However
given this is such an edgecase this workaround is reasonable.

Test: Remove sim and verify this is not an issue.
Bug: 123622080
Change-Id: I78970c747cf83aba8bd9211d7b326ed84433479b
parent 691fe1da
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
    /**
     * The post-dial digits that were dialed after the network portion of the number
     */
    private final String mPostDialDigits;
    private String mPostDialDigits;

    /**
     * The secondary line number that an incoming call has been received on if the SIM subscription
@@ -1005,6 +1005,10 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        return mPostDialDigits;
    }

    public void clearPostDialDigits() {
        mPostDialDigits = null;
    }

    public String getViaNumber() {
        return mViaNumber;
    }
+8 −0
Original line number Diff line number Diff line
@@ -1662,6 +1662,14 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        if (connection.getState() == Connection.STATE_DISCONNECTED) {
            // A connection that begins in the DISCONNECTED state is an indication of
            // failure to connect; we handle all failures uniformly
            Call foundCall = mCallIdMapper.getCall(callId);
            if (foundCall != null) {
                // The post-dial digits are created when the call is first created.  Normally
                // the ConnectionService is responsible for stripping them from the address, but
                // since a failed connection will not have done this, we could end up with duplicate
                // post-dial digits.
                foundCall.clearPostDialDigits();
            }
            removeCall(callId, connection.getDisconnectCause());
        } else {
            // Successful connection