diff options
Diffstat (limited to 'telecomm/java/android/telecom/RemoteConnectionService.java')
-rw-r--r-- | telecomm/java/android/telecom/RemoteConnectionService.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java index 43a92cb576e7..a9b725be133f 100644 --- a/telecomm/java/android/telecom/RemoteConnectionService.java +++ b/telecomm/java/android/telecom/RemoteConnectionService.java @@ -60,11 +60,16 @@ final class RemoteConnectionService { mPendingConnections.remove(connection); // Unconditionally initialize the connection ... connection.setConnectionCapabilities(parcel.getConnectionCapabilities()); - connection.setAddress( - parcel.getHandle(), parcel.getHandlePresentation()); - connection.setCallerDisplayName( - parcel.getCallerDisplayName(), - parcel.getCallerDisplayNamePresentation()); + 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()); |