Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd34df0f authored by Sailesh Nepal's avatar Sailesh Nepal Committed by Android (Google) Code Review
Browse files

Merge "Don't set address for failed remote connections"

parents 041349f3 2d3ced75
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -60,11 +60,16 @@ final class RemoteConnectionService {
                mPendingConnections.remove(connection);
                // Unconditionally initialize the connection ...
                connection.setConnectionCapabilities(parcel.getConnectionCapabilities());
                connection.setAddress(
                        parcel.getHandle(), parcel.getHandlePresentation());
                if (parcel.getHandle() != null
                    || parcel.getState() != Connection.STATE_DISCONNECTED) {
                    connection.setAddress(parcel.getHandle(), parcel.getHandlePresentation());
                }
                if (parcel.getCallerDisplayName() != null
                    || parcel.getState() != Connection.STATE_DISCONNECTED) {
                    connection.setCallerDisplayName(
                            parcel.getCallerDisplayName(),
                            parcel.getCallerDisplayNamePresentation());
                }
                // Set state after handle so that the client can identify the connection.
                if (parcel.getState() == Connection.STATE_DISCONNECTED) {
                    connection.setDisconnected(parcel.getDisconnectCause());