From fba1a8e61a92c13e431b8b3dd36ecaa6eb500168 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Tue, 19 Dec 2017 15:23:59 -0800 Subject: 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 --- telecomm/java/android/telecom/ConnectionService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index da8ac5ec00d7..eca35997d043 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -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); -- cgit v1.2.3-59-g8ed1b