Do not add LinphoneFriend in LinphoneFriendList if already done before
This commit is contained in:
parent
9f1360d796
commit
3b885639d0
2 changed files with 12 additions and 9 deletions
|
@ -446,15 +446,18 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
|
||||||
}
|
}
|
||||||
friend.done();
|
friend.done();
|
||||||
|
|
||||||
try {
|
if (!friend.isAlreadyPresentInFriendList()) {
|
||||||
LinphoneManager.getLcIfManagerNotDestroyedOrNull().addFriend(friend);
|
try {
|
||||||
if (!ContactsManager.getInstance().hasContactsAccess()) {
|
LinphoneManager.getLcIfManagerNotDestroyedOrNull().addFriend(friend);
|
||||||
// This refresh is only needed if app has no contacts permission to refresh the list of LinphoneFriends.
|
} catch (LinphoneCoreException e) {
|
||||||
// Otherwise contacts will be refreshed due to changes in native contact and the handler in ContactsManager
|
Log.e(e);
|
||||||
ContactsManager.getInstance().fetchContactsAsync();
|
|
||||||
}
|
}
|
||||||
} catch (LinphoneCoreException e) {
|
}
|
||||||
Log.e(e);
|
|
||||||
|
if (!ContactsManager.getInstance().hasContactsAccess()) {
|
||||||
|
// This refresh is only needed if app has no contacts permission to refresh the list of LinphoneFriends.
|
||||||
|
// Otherwise contacts will be refreshed due to changes in native contact and the handler in ContactsManager
|
||||||
|
ContactsManager.getInstance().fetchContactsAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 61a3b8a98e6d35bff351b64e2c6717491792afb3
|
Subproject commit be38b3474cd4fc3ce48ebc09e645c71b2da857b3
|
Loading…
Reference in a new issue