Do not compute display name using first and last name if display name exists

This commit is contained in:
Sylvain Berfini 2018-09-12 14:54:17 +02:00
parent 8b5a52a8b1
commit 1e550b5a74

View file

@ -126,6 +126,7 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
firstName = fn; firstName = fn;
lastName = ln; lastName = ln;
if (fullName == null) {
if (firstName != null && lastName != null && firstName.length() > 0 && lastName.length() > 0) { if (firstName != null && lastName != null && firstName.length() > 0 && lastName.length() > 0) {
fullName = firstName + " " + lastName; fullName = firstName + " " + lastName;
} else if (firstName != null && firstName.length() > 0) { } else if (firstName != null && firstName.length() > 0) {
@ -134,6 +135,7 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
fullName = lastName; fullName = lastName;
} }
} }
}
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;