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();
|
mContext = LinphoneService.instance().getApplicationContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LinphonePreferences.instance() != null
|
if (LinphonePreferences.instance().isFriendlistsubscriptionEnabled()) {
|
||||||
&& LinphonePreferences.instance().isFriendlistsubscriptionEnabled()) {
|
|
||||||
String rls = mContext.getString(R.string.rls_uri);
|
String rls = mContext.getString(R.string.rls_uri);
|
||||||
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
||||||
if (rls != null
|
if (rls != null
|
||||||
|
@ -217,9 +216,11 @@ class AsyncContactsLoader extends AsyncTask<Void, Void, AsyncContactsLoader.Asyn
|
||||||
|
|
||||||
// Now that contact fetching is asynchronous, this is required to ensure
|
// Now that contact fetching is asynchronous, this is required to ensure
|
||||||
// presence subscription event will be sent with all friends
|
// presence subscription event will be sent with all friends
|
||||||
|
if (LinphonePreferences.instance().isFriendlistsubscriptionEnabled()) {
|
||||||
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
||||||
list.updateSubscriptions();
|
list.updateSubscriptions();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ContactsManager.getInstance().setContacts(data.contacts);
|
ContactsManager.getInstance().setContacts(data.contacts);
|
||||||
ContactsManager.getInstance().setSipContacts(data.sipContacts);
|
ContactsManager.getInstance().setSipContacts(data.sipContacts);
|
||||||
|
|
|
@ -701,10 +701,6 @@ public class LinphonePreferences {
|
||||||
return getConfig().getBool("app", "java_logger", false);
|
return getConfig().getBool("app", "java_logger", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBackgroundModeEnabled() {
|
|
||||||
return getConfig().getBool("app", "background_mode", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAutoStartEnabled() {
|
public boolean isAutoStartEnabled() {
|
||||||
return getConfig().getBool("app", "auto_start", false);
|
return getConfig().getBool("app", "auto_start", false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue