Pass disconnect reason for failed remote connections

If a remote connection fails to create call setDisconnected
instead of setState. This allows us to pass the disconnect
reason.

Note, this CL is very low risk since it only impacts remote
connections.

Bug: 17594857
Change-Id: Id296f3f5a4bb9168b358d3bfda94e04623a6b99c
diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java
index 03b38c2..d959e50 100644
--- a/telecomm/java/android/telecom/RemoteConnectionService.java
+++ b/telecomm/java/android/telecom/RemoteConnectionService.java
@@ -65,7 +65,11 @@
                         parcel.getCallerDisplayName(),
                         parcel.getCallerDisplayNamePresentation());
                 // Set state after handle so that the client can identify the connection.
-                connection.setState(parcel.getState());
+                if (parcel.getState() == Connection.STATE_DISCONNECTED) {
+                    connection.setDisconnected(parcel.getDisconnectCause());
+                } else {
+                    connection.setState(parcel.getState());
+                }
                 List<RemoteConnection> conferenceable = new ArrayList<>();
                 for (String confId : parcel.getConferenceableConnectionIds()) {
                     if (mConnectionById.containsKey(confId)) {