Fix friends and parse error
This commit is contained in:
parent
82173a8985
commit
2262c2e90a
2 changed files with 14 additions and 8 deletions
|
@ -258,6 +258,9 @@ public class ContactsManager {
|
|||
List<String> ids = new ArrayList<String>();
|
||||
if(LinphoneManager.getLc().getFriendList() == null) return null;
|
||||
for(LinphoneFriend friend : LinphoneManager.getLc().getFriendList()) {
|
||||
friend.edit();
|
||||
friend.enableSubscribes(false);
|
||||
friend.done();
|
||||
if(!ids.contains(friend.getRefKey())){
|
||||
ids.add(friend.getRefKey());
|
||||
}
|
||||
|
@ -268,15 +271,18 @@ public class ContactsManager {
|
|||
//End linphone Friend
|
||||
|
||||
public boolean removeContactTagIsNeeded(Contact contact){
|
||||
contact.refresh(contentResolver);
|
||||
boolean onlyNumbers = true;
|
||||
for(String address: contact.getNumbersOrAddresses()){
|
||||
if(LinphoneUtils.isSipAddress(address)){
|
||||
onlyNumbers = false;
|
||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||
if (lc != null) {
|
||||
LinphoneProxyConfig lpc = lc.createProxyConfig();
|
||||
contact.refresh(contentResolver);
|
||||
for (String address : contact.getNumbersOrAddresses()) {
|
||||
if (!lpc.isPhoneNumber(address)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return onlyNumbers;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void removeLinphoneContactTag(Contact contact){
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 5913eff7a5ff4516c745669b6bedb87f367a84fa
|
||||
Subproject commit 594774d9919ccef61467afc5a71d5fdf81b8183c
|
Loading…
Reference in a new issue