Customization to display only username in history activity.
This commit is contained in:
parent
4224a5b7dc
commit
288fa28143
2 changed files with 8 additions and 9 deletions
|
@ -14,6 +14,7 @@
|
||||||
<bool name="use_video_activity">true</bool>
|
<bool name="use_video_activity">true</bool>
|
||||||
<bool name="autostart_video_activity">false</bool>
|
<bool name="autostart_video_activity">false</bool>
|
||||||
<bool name="show_full_remote_address_on_incoming_call">true</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>
|
<bool name="allow_transfers">true</bool>
|
||||||
|
|
||||||
|
|
|
@ -159,12 +159,10 @@ public class HistoryActivity extends ListActivity {
|
||||||
|
|
||||||
LinphoneCore lc = LinphoneManager.getLc();
|
LinphoneCore lc = LinphoneManager.getLc();
|
||||||
LinphoneProxyConfig lProxyConfig = lc.getDefaultProxyConfig();
|
LinphoneProxyConfig lProxyConfig = lc.getDefaultProxyConfig();
|
||||||
|
boolean showOnlyUsername = getResources().getBoolean(R.bool.show_only_username_in_history);
|
||||||
String lDetailedName=null;
|
String lDetailedName=null;
|
||||||
String lDisplayName = lAddress.getDisplayName();
|
String lDisplayName = !showOnlyUsername ? lAddress.getDisplayName() : null;
|
||||||
if (lDisplayName == null)
|
if (showOnlyUsername || (lProxyConfig != null && lProxyConfig.getDomain().equals(lAddress.getDomain()))) {
|
||||||
lDisplayName = LinphoneUtils.findDisplayNameOfContact(lAddress, getContentResolver());
|
|
||||||
|
|
||||||
if (lProxyConfig != null && lProxyConfig.getDomain().equals(lAddress.getDomain())) {
|
|
||||||
lDetailedName = lAddress.getUserName();
|
lDetailedName = lAddress.getUserName();
|
||||||
} else {
|
} else {
|
||||||
lDetailedName = lAddress.asStringUriOnly();
|
lDetailedName = lAddress.asStringUriOnly();
|
||||||
|
|
Loading…
Reference in a new issue