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
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user