Merge "Fix display contact name in toast while responding call via sms" into atel.lnx.2.0-dev
diff --git a/src/com/android/server/telecom/ConnectionServiceWrapper.java b/src/com/android/server/telecom/ConnectionServiceWrapper.java
index bd01eb4..338d1c3 100644
--- a/src/com/android/server/telecom/ConnectionServiceWrapper.java
+++ b/src/com/android/server/telecom/ConnectionServiceWrapper.java
@@ -920,12 +920,12 @@
     }
 
     void removeCall(String callId, DisconnectCause disconnectCause) {
+        mCallIdMapper.removeCall(callId);
+
         CreateConnectionResponse response = mPendingResponses.remove(callId);
         if (response != null) {
             response.handleCreateConnectionFailure(disconnectCause);
         }
-
-        mCallIdMapper.removeCall(callId);
     }
 
     void removeCall(Call call, DisconnectCause disconnectCause) {