Detect when a native contact has been deleted and remove the matching LinphoneFriend if exists

This commit is contained in:
Sylvain Berfini 2016-07-19 11:34:02 +02:00
parent edb9896105
commit 97bf5ab864

View file

@ -261,9 +261,8 @@ public class ContactsManager extends ContentObserver {
} }
} }
if (!found) { if (!found) {
LinphoneContact contact = new LinphoneContact(); // If refkey != null but there isn't a native contact with this value, then this contact has been deleted. Let's do the same with the LinphoneFriend
contact.setFriend(friend); LinphoneManager.getLc().removeFriend(friend);
contacts.add(contact);
} }
} else { } else {
LinphoneContact contact = new LinphoneContact(); LinphoneContact contact = new LinphoneContact();