Fixed friend list subscription setting not disabling subscription if disabled
This commit is contained in:
parent
3fa0f1c774
commit
748df246b1
2 changed files with 5 additions and 8 deletions
|
@ -66,8 +66,7 @@ class AsyncContactsLoader extends AsyncTask<Void, Void, AsyncContactsLoader.Asyn
|
|||
mContext = LinphoneService.instance().getApplicationContext();
|
||||
}
|
||||
|
||||
if (LinphonePreferences.instance() != null
|
||||
&& LinphonePreferences.instance().isFriendlistsubscriptionEnabled()) {
|
||||
if (LinphonePreferences.instance().isFriendlistsubscriptionEnabled()) {
|
||||
String rls = mContext.getString(R.string.rls_uri);
|
||||
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
||||
if (rls != null
|
||||
|
@ -217,8 +216,10 @@ class AsyncContactsLoader extends AsyncTask<Void, Void, AsyncContactsLoader.Asyn
|
|||
|
||||
// Now that contact fetching is asynchronous, this is required to ensure
|
||||
// presence subscription event will be sent with all friends
|
||||
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
||||
list.updateSubscriptions();
|
||||
if (LinphonePreferences.instance().isFriendlistsubscriptionEnabled()) {
|
||||
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
||||
list.updateSubscriptions();
|
||||
}
|
||||
}
|
||||
|
||||
ContactsManager.getInstance().setContacts(data.contacts);
|
||||
|
|
|
@ -701,10 +701,6 @@ public class LinphonePreferences {
|
|||
return getConfig().getBool("app", "java_logger", false);
|
||||
}
|
||||
|
||||
public boolean isBackgroundModeEnabled() {
|
||||
return getConfig().getBool("app", "background_mode", true);
|
||||
}
|
||||
|
||||
public boolean isAutoStartEnabled() {
|
||||
return getConfig().getBool("app", "auto_start", false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue