diff options
author | Sailesh Nepal <sail@google.com> | 2015-02-04 17:23:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-04 17:23:43 +0000 |
commit | fd34df0f2073a3d84bd1f339031f99f9ef0b974e (patch) | |
tree | de07d673f41480f31b562ecfce6e6b587566cb61 /telecomm | |
parent | 041349f3388fd268d757786dd17e676f8256bfa5 (diff) | |
parent | 2d3ced758fa42d8a7cf941998355f655ed0bf0b8 (diff) | |
download | frameworks_base-fd34df0f2073a3d84bd1f339031f99f9ef0b974e.zip frameworks_base-fd34df0f2073a3d84bd1f339031f99f9ef0b974e.tar.gz frameworks_base-fd34df0f2073a3d84bd1f339031f99f9ef0b974e.tar.bz2 |
Merge "Don't set address for failed remote connections"
Diffstat (limited to 'telecomm')
-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 43a92cb..a9b725b 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()); |