Another fix
This commit is contained in:
parent
ac73829739
commit
fce9b60de9
1 changed files with 4 additions and 2 deletions
|
@ -440,8 +440,10 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(LinphoneContact contact) {
|
public int compareTo(LinphoneContact contact) {
|
||||||
String firstLetter = getFullName().substring(0, 1).toUpperCase(Locale.getDefault());
|
String fullName = getFullName();
|
||||||
String contactfirstLetter = contact.getFullName().substring(0, 1).toUpperCase(Locale.getDefault());
|
String contactFullName = contact.getFullName();
|
||||||
|
String firstLetter = fullName == null || fullName.isEmpty() ? "" : fullName.substring(0, 1).toUpperCase(Locale.getDefault());
|
||||||
|
String contactfirstLetter = contactFullName == null || contactFullName.isEmpty() ? "" : contactFullName.substring(0, 1).toUpperCase(Locale.getDefault());
|
||||||
return firstLetter.compareTo(contactfirstLetter);
|
return firstLetter.compareTo(contactfirstLetter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue