Cleaning friend list subscriptions related code
This commit is contained in:
parent
bacc3bb1a1
commit
0275b282a6
5 changed files with 5 additions and 18 deletions
|
@ -1763,7 +1763,6 @@ public class LinphoneActivity extends LinphoneGenericActivity
|
|||
status.setVisibility(View.GONE);
|
||||
address.setText("");
|
||||
mStatusFragment.resetAccountStatus();
|
||||
LinphoneManager.getInstance().subscribeFriendList(false);
|
||||
|
||||
mDefaultAccount.setOnClickListener(null);
|
||||
} else {
|
||||
|
|
|
@ -484,9 +484,9 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
|||
public void subscribeFriendList(boolean enabled) {
|
||||
Core lc = getLcIfManagerNotDestroyedOrNull();
|
||||
if (lc != null && lc.getFriendsLists() != null && lc.getFriendsLists().length > 0) {
|
||||
FriendList mFriendList = (lc.getFriendsLists())[0];
|
||||
FriendList friendList = (lc.getFriendsLists())[0];
|
||||
Log.i("[Manager] Presence list subscription is " + (enabled ? "enabled" : "disabled"));
|
||||
mFriendList.enableSubscriptions(enabled);
|
||||
friendList.enableSubscriptions(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1102,9 +1102,6 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
|||
final RegistrationState state,
|
||||
final String message) {
|
||||
Log.i("[Manager] New registration state [" + state + "]");
|
||||
if (LinphoneManager.getLc().getDefaultProxyConfig() == null) {
|
||||
subscribeFriendList(false);
|
||||
}
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
|
|
|
@ -488,13 +488,6 @@ public class AssistantActivity extends Activity
|
|||
if (LinphonePreferences.instance() != null)
|
||||
LinphonePreferences.instance().setPushNotificationEnabled(true);
|
||||
|
||||
if (LinphonePreferences.instance() != null)
|
||||
mPrefs.enabledFriendlistSubscription(
|
||||
getResources().getBoolean(R.bool.use_friendlist_subscription));
|
||||
|
||||
LinphoneManager.getInstance()
|
||||
.subscribeFriendList(getResources().getBoolean(R.bool.use_friendlist_subscription));
|
||||
|
||||
if (!mNewAccount) {
|
||||
displayRegistrationInProgressDialog();
|
||||
}
|
||||
|
|
|
@ -514,11 +514,10 @@ public class LinphonePreferences {
|
|||
}
|
||||
|
||||
public boolean isFriendlistsubscriptionEnabled() {
|
||||
boolean previousConfig =
|
||||
getConfig().getBool("app", "friendlist_subscription_enabled", false);
|
||||
if (previousConfig) {
|
||||
enabledFriendlistSubscription(previousConfig);
|
||||
if (getConfig().getBool("app", "friendlist_subscription_enabled", false)) {
|
||||
// Old setting, do migration
|
||||
getConfig().setBool("app", "friendlist_subscription_enabled", false);
|
||||
enabledFriendlistSubscription(true);
|
||||
}
|
||||
return getLc().isFriendListSubscriptionEnabled();
|
||||
}
|
||||
|
|
|
@ -84,7 +84,6 @@
|
|||
<bool name="disable_all_security_features_for_markets">false
|
||||
</bool> <!-- Disable TLS/SRTP/ZRTP -->
|
||||
<bool name="disable_all_patented_codecs_for_markets">false</bool> <!-- Disable MPEG4/H264 -->
|
||||
<bool name="use_friendlist_subscription">true</bool>
|
||||
<string name="default_stun">stun.linphone.org</string>
|
||||
<bool name="hide_accounts">false</bool>
|
||||
|
||||
|
|
Loading…
Reference in a new issue