Fixed contact never found if a change in the native addressbook happens after the first fetch
This commit is contained in:
parent
b4e5b5c0d7
commit
0fd4c17f28
1 changed files with 1 additions and 2 deletions
|
@ -328,8 +328,6 @@ public class ContactsManager extends ContentObserver {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (LinphoneContact contact : contacts) {
|
for (LinphoneContact contact : contacts) {
|
||||||
if (refkey.equals(contact.getAndroidId())) {
|
if (refkey.equals(contact.getAndroidId())) {
|
||||||
// Native matching contact found, link the friend to it
|
|
||||||
contact.setFriend(friend);
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -341,6 +339,7 @@ public class ContactsManager extends ContentObserver {
|
||||||
} else {
|
} else {
|
||||||
// Refkey not null but no contact access => can't link it to native contact so display it on is own
|
// Refkey not null but no contact access => can't link it to native contact so display it on is own
|
||||||
LinphoneContact contact = new LinphoneContact();
|
LinphoneContact contact = new LinphoneContact();
|
||||||
|
// Native matching contact found, link the friend to it
|
||||||
contact.setFriend(friend);
|
contact.setFriend(friend);
|
||||||
contact.refresh();
|
contact.refresh();
|
||||||
if (contact.hasAddress()) {
|
if (contact.hasAddress()) {
|
||||||
|
|
Loading…
Reference in a new issue