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,12 +126,14 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
firstName = fn;
lastName = ln;
if (firstName != null && lastName != null && firstName.length() > 0 && lastName.length() > 0) {
fullName = firstName + " " + lastName;
} else if (firstName != null && firstName.length() > 0) {
fullName = firstName;
} else if (lastName != null && lastName.length() > 0) {
fullName = lastName;
if (fullName == null) {
if (firstName != null && lastName != null && firstName.length() > 0 && lastName.length() > 0) {
fullName = firstName + " " + lastName;
} else if (firstName != null && firstName.length() > 0) {
fullName = firstName;
} else if (lastName != null && lastName.length() > 0) {
fullName = lastName;
}
}
}