Do not call setName on the friend if there is no address

This commit is contained in:
Sylvain Berfini 2016-07-28 11:30:25 +02:00
parent 338a6c730c
commit f015c0330f
2 changed files with 3 additions and 2 deletions

View file

@ -443,7 +443,9 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
friend.addPhoneNumber(noa.getValue()); friend.addPhoneNumber(noa.getValue());
} }
} }
friend.setName(fullName); if (friend.getAddress() != null) {
friend.setName(fullName);
}
friend.done(); friend.done();
if (friend.getAddress() != null) { if (friend.getAddress() != null) {

View file

@ -1413,7 +1413,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
if (sExited || instance == null) { if (sExited || instance == null) {
// Can occur if the UI thread play a posted event but in the meantime the LinphoneManager was destroyed // Can occur if the UI thread play a posted event but in the meantime the LinphoneManager was destroyed
// Ex: stop call and quickly terminate application. // Ex: stop call and quickly terminate application.
Log.w("Trying to get linphone core while LinphoneManager already destroyed or not created");
return null; return null;
} }
return getLc(); return getLc();