diff options
author | yanas <yana@jitsi.org> | 2013-05-08 13:50:13 +0200 |
---|---|---|
committer | yanas <yana@jitsi.org> | 2013-05-08 13:50:13 +0200 |
commit | 2f1e5d452c7093509b6c741a37e2bf56ee13f5d9 (patch) | |
tree | 3d7c0885471539847831c3d8389b46a229a60f66 /src/net/java/sip/communicator/impl/gui/main/call/CallManager.java | |
parent | 972d72fcfb32903bbfe80376b242947d73f68f58 (diff) | |
download | jitsi-2f1e5d452c7093509b6c741a37e2bf56ee13f5d9.zip jitsi-2f1e5d452c7093509b6c741a37e2bf56ee13f5d9.tar.gz jitsi-2f1e5d452c7093509b6c741a37e2bf56ee13f5d9.tar.bz2 |
Implements support for CUSAX peer display name in call panel.
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/call/CallManager.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/CallManager.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java index b948caf..47b07ee 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java @@ -1311,7 +1311,15 @@ public class CallManager */ public static String getPeerDisplayName(CallPeer peer) { - String displayName = peer.getDisplayName(); + String displayName = null; + + // We try to find the <tt>UIContact</tt>, to which the call was + // created if this was an outgoing call. + UIContactImpl uiContact + = CallManager.getCallUIContact(peer.getCall()); + + if (uiContact != null) + displayName = uiContact.getDisplayName(); // We search for a contact corresponding to this call peer and // try to get its display name. @@ -1321,17 +1329,6 @@ public class CallManager displayName = peer.getContact().getDisplayName(); } - // We try to find the <tt>UIContact</tt>, to which the call was - // created if this was an outgoing call. - if (StringUtils.isNullOrEmpty(displayName, true)) - { - UIContactImpl uiContact - = CallManager.getCallUIContact(peer.getCall()); - - if (uiContact != null) - displayName = uiContact.getDisplayName(); - } - // We try to find the an alternative peer address. if (StringUtils.isNullOrEmpty(displayName, true)) { @@ -1371,7 +1368,10 @@ public class CallManager } if (StringUtils.isNullOrEmpty(displayName, true)) - displayName = peer.getAddress(); + displayName = (!StringUtils.isNullOrEmpty + (peer.getDisplayName(), true)) + ? peer.getDisplayName() + : peer.getAddress(); return displayName; } |