Fix possibly a duplicate of contacts

This commit is contained in:
Erwan Croze 2017-02-28 17:38:46 +01:00
parent 0d16e8d7b7
commit 88fe4dd3f8

View file

@ -270,6 +270,7 @@ public class ContactsManager extends ContentObserver {
List<LinphoneContact> contacts = new ArrayList<LinphoneContact>(); List<LinphoneContact> contacts = new ArrayList<LinphoneContact>();
List<LinphoneContact> sipContacts = new ArrayList<LinphoneContact>(); List<LinphoneContact> sipContacts = new ArrayList<LinphoneContact>();
Date contactsTime = new Date(); Date contactsTime = new Date();
androidContactsCache.clear();
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null) { if (lc != null) {
@ -306,7 +307,6 @@ public class ContactsManager extends ContentObserver {
Log.i("[ContactsManager] Step 0 for " + contacts.size() + " contacts: " + time + " elapsed since starting"); Log.i("[ContactsManager] Step 0 for " + contacts.size() + " contacts: " + time + " elapsed since starting");
if (hasContactsAccess()) { if (hasContactsAccess()) {
androidContactsCache.clear();
List<String> nativeIds = new ArrayList<String>(); List<String> nativeIds = new ArrayList<String>();
Cursor c = getContactsCursor(contentResolver); Cursor c = getContactsCursor(contentResolver);
if (c != null) { if (c != null) {