Use new method to delete linphone friend
This commit is contained in:
parent
28caf7a5b0
commit
e422b41704
1 changed files with 1 additions and 12 deletions
|
@ -405,19 +405,8 @@ public class LinphoneContact extends AndroidContact
|
||||||
Core core = LinphoneManager.getCore();
|
Core core = LinphoneManager.getCore();
|
||||||
if (core == null) return;
|
if (core == null) return;
|
||||||
|
|
||||||
boolean found = false;
|
|
||||||
Log.i("[Contact] Deleting friend ", mFriend.getName(), " for contact ", this);
|
Log.i("[Contact] Deleting friend ", mFriend.getName(), " for contact ", this);
|
||||||
for (FriendList list : core.getFriendsLists()) {
|
mFriend.remove();
|
||||||
FriendList.Status status = list.removeFriend(mFriend);
|
|
||||||
if (status == FriendList.Status.OK) {
|
|
||||||
Log.w("[Contact] Friend found in list " + list.getDisplayName());
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found) {
|
|
||||||
Log.w("[Contact] Friend removal failed, friend doesn't belong to any friend list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createOrUpdateFriendFromNativeContact() {
|
public void createOrUpdateFriendFromNativeContact() {
|
||||||
|
|
Loading…
Reference in a new issue