diff options
| author | 2017-10-27 19:09:47 +0000 | |
|---|---|---|
| committer | 2017-10-27 19:09:47 +0000 | |
| commit | 47b23176bdf97ab2e4c50da70499d811899a83ac (patch) | |
| tree | 7dc7cd07c8b37d3789536629f637a327d666002a | |
| parent | 6ac8f42d9ea1388f20400f7609b62d858ef6b7a9 (diff) | |
| parent | 0a88f2e21b3e3ed8a3a953e572a1eea6b572cb3e (diff) | |
Merge "Ensure CallId is not null when connection creation is complete."
| -rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 6f970fa8e0b5..a81fba95c4ed 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -1449,6 +1449,12 @@ public abstract class ConnectionService extends Service { */ private void notifyCreateConnectionComplete(final String callId) { Log.i(this, "notifyCreateConnectionComplete %s", callId); + if (callId == null) { + // This could happen if the connection fails quickly and is removed from the + // ConnectionService before Telecom sends the create connection complete callback. + Log.w(this, "notifyCreateConnectionComplete: callId is null."); + return; + } onCreateConnectionComplete(findConnectionForAction(callId, "notifyCreateConnectionComplete")); } @@ -2177,7 +2183,7 @@ public abstract class ConnectionService extends Service { } private Connection findConnectionForAction(String callId, String action) { - if (mConnectionById.containsKey(callId)) { + if (callId != null && mConnectionById.containsKey(callId)) { return mConnectionById.get(callId); } Log.w(this, "%s - Cannot find Connection %s", action, callId); |