Customization to display only username in history activity.

This commit is contained in:
Guillaume Beraudo 2011-11-08 12:15:42 +01:00
parent 4224a5b7dc
commit 288fa28143
2 changed files with 8 additions and 9 deletions

View file

@ -14,6 +14,7 @@
<bool name="use_video_activity">true</bool>
<bool name="autostart_video_activity">false</bool>
<bool name="show_full_remote_address_on_incoming_call">true</bool>
<bool name="show_only_username_in_history">false</bool>
<bool name="allow_transfers">true</bool>

View file

@ -159,12 +159,10 @@ public class HistoryActivity extends ListActivity {
LinphoneCore lc = LinphoneManager.getLc();
LinphoneProxyConfig lProxyConfig = lc.getDefaultProxyConfig();
boolean showOnlyUsername = getResources().getBoolean(R.bool.show_only_username_in_history);
String lDetailedName=null;
String lDisplayName = lAddress.getDisplayName();
if (lDisplayName == null)
lDisplayName = LinphoneUtils.findDisplayNameOfContact(lAddress, getContentResolver());
if (lProxyConfig != null && lProxyConfig.getDomain().equals(lAddress.getDomain())) {
String lDisplayName = !showOnlyUsername ? lAddress.getDisplayName() : null;
if (showOnlyUsername || (lProxyConfig != null && lProxyConfig.getDomain().equals(lAddress.getDomain()))) {
lDetailedName = lAddress.getUserName();
} else {
lDetailedName = lAddress.asStringUriOnly();