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

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

Add logging and disconnect reason for null connections.

When a ConnectionService implementation returns a null connection, log this
and also set a unique disconnect reason to indicate in the telecom
dumpsys what happened.

Test: Manual
Bug: 70385625
Change-Id: Iff9846d434d400c4cf036e9ac46167cfb6f6b58c
parent 29f61c21
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1376,8 +1376,9 @@ public abstract class ConnectionService extends Service {
                : onCreateOutgoingConnection(callManagerAccount, request);
        Log.d(this, "createConnection, connection: %s", connection);
        if (connection == null) {
            Log.i(this, "createConnection, implementation returned null connection.");
            connection = Connection.createFailedConnection(
                    new DisconnectCause(DisconnectCause.ERROR));
                    new DisconnectCause(DisconnectCause.ERROR, "IMPL_RETURNED_NULL_CONNECTION"));
        }

        connection.setTelecomCallId(callId);