Fixed deadlock between contacts fetching async task & contacts presence notify
This commit is contained in:
parent
a42d7a47ae
commit
21c3b89652
1 changed files with 9 additions and 9 deletions
|
@ -24,23 +24,23 @@ import android.content.Context;
|
|||
import android.database.Cursor;
|
||||
import android.os.AsyncTask;
|
||||
import android.provider.ContactsContract;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.R;
|
||||
import org.linphone.compatibility.Compatibility;
|
||||
import org.linphone.core.Core;
|
||||
import org.linphone.core.Friend;
|
||||
import org.linphone.core.FriendList;
|
||||
import org.linphone.core.PresenceBasicStatus;
|
||||
import org.linphone.core.PresenceModel;
|
||||
import org.linphone.core.tools.Log;
|
||||
import org.linphone.settings.LinphonePreferences;
|
||||
import org.linphone.utils.LinphoneUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
class AsyncContactsLoader extends AsyncTask<Void, Void, AsyncContactsLoader.AsyncContactsData> {
|
||||
@SuppressLint("InlinedApi")
|
||||
public static final String[] PROJECTION = {
|
||||
|
@ -226,7 +226,7 @@ class AsyncContactsLoader extends AsyncTask<Void, Void, AsyncContactsLoader.Asyn
|
|||
}
|
||||
}
|
||||
|
||||
if (contact.getFriend() != null) {
|
||||
/*if (contact.getFriend() != null) {
|
||||
for (LinphoneNumberOrAddress noa : contact.getNumbersOrAddresses()) {
|
||||
PresenceModel pm =
|
||||
contact.getFriend().getPresenceModelForUriOrTel(noa.getValue());
|
||||
|
@ -235,7 +235,7 @@ class AsyncContactsLoader extends AsyncTask<Void, Void, AsyncContactsLoader.Asyn
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (!mContext.getResources().getBoolean(R.bool.hide_sip_contacts_without_presence)) {
|
||||
if (contact.hasAddress() && !data.sipContacts.contains(contact)) {
|
||||
|
|
Loading…
Reference in a new issue