diff options
author | Sailesh Nepal <sail@google.com> | 2014-09-20 18:23:05 -0700 |
---|---|---|
committer | Sailesh Nepal <sail@google.com> | 2014-09-20 18:23:05 -0700 |
commit | c2a978dba31f0fc83a7d472e6a78bed165eca610 (patch) | |
tree | 0ccba0f387ec0cce880f1b2b76c080e1fcf7cf71 /telecomm/java/android/telecom/RemoteConnectionService.java | |
parent | 1a74dc45473fe5d15dc1b52458e33b91def370c2 (diff) | |
download | frameworks_base-c2a978dba31f0fc83a7d472e6a78bed165eca610.zip frameworks_base-c2a978dba31f0fc83a7d472e6a78bed165eca610.tar.gz frameworks_base-c2a978dba31f0fc83a7d472e6a78bed165eca610.tar.bz2 |
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
Diffstat (limited to 'telecomm/java/android/telecom/RemoteConnectionService.java')
-rw-r--r-- | telecomm/java/android/telecom/RemoteConnectionService.java | 6 |
1 files changed, 5 insertions, 1 deletions
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 @@ final class RemoteConnectionService { 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)) { |