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);
|
status.setVisibility(View.GONE);
|
||||||
address.setText("");
|
address.setText("");
|
||||||
mStatusFragment.resetAccountStatus();
|
mStatusFragment.resetAccountStatus();
|
||||||
LinphoneManager.getInstance().subscribeFriendList(false);
|
|
||||||
|
|
||||||
mDefaultAccount.setOnClickListener(null);
|
mDefaultAccount.setOnClickListener(null);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -484,9 +484,9 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
||||||
public void subscribeFriendList(boolean enabled) {
|
public void subscribeFriendList(boolean enabled) {
|
||||||
Core lc = getLcIfManagerNotDestroyedOrNull();
|
Core lc = getLcIfManagerNotDestroyedOrNull();
|
||||||
if (lc != null && lc.getFriendsLists() != null && lc.getFriendsLists().length > 0) {
|
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"));
|
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 RegistrationState state,
|
||||||
final String message) {
|
final String message) {
|
||||||
Log.i("[Manager] New registration state [" + state + "]");
|
Log.i("[Manager] New registration state [" + state + "]");
|
||||||
if (LinphoneManager.getLc().getDefaultProxyConfig() == null) {
|
|
||||||
subscribeFriendList(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Context getContext() {
|
public Context getContext() {
|
||||||
|
|
|
@ -488,13 +488,6 @@ public class AssistantActivity extends Activity
|
||||||
if (LinphonePreferences.instance() != null)
|
if (LinphonePreferences.instance() != null)
|
||||||
LinphonePreferences.instance().setPushNotificationEnabled(true);
|
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) {
|
if (!mNewAccount) {
|
||||||
displayRegistrationInProgressDialog();
|
displayRegistrationInProgressDialog();
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,11 +514,10 @@ public class LinphonePreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFriendlistsubscriptionEnabled() {
|
public boolean isFriendlistsubscriptionEnabled() {
|
||||||
boolean previousConfig =
|
if (getConfig().getBool("app", "friendlist_subscription_enabled", false)) {
|
||||||
getConfig().getBool("app", "friendlist_subscription_enabled", false);
|
// Old setting, do migration
|
||||||
if (previousConfig) {
|
|
||||||
enabledFriendlistSubscription(previousConfig);
|
|
||||||
getConfig().setBool("app", "friendlist_subscription_enabled", false);
|
getConfig().setBool("app", "friendlist_subscription_enabled", false);
|
||||||
|
enabledFriendlistSubscription(true);
|
||||||
}
|
}
|
||||||
return getLc().isFriendListSubscriptionEnabled();
|
return getLc().isFriendListSubscriptionEnabled();
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,6 @@
|
||||||
<bool name="disable_all_security_features_for_markets">false
|
<bool name="disable_all_security_features_for_markets">false
|
||||||
</bool> <!-- Disable TLS/SRTP/ZRTP -->
|
</bool> <!-- Disable TLS/SRTP/ZRTP -->
|
||||||
<bool name="disable_all_patented_codecs_for_markets">false</bool> <!-- Disable MPEG4/H264 -->
|
<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>
|
<string name="default_stun">stun.linphone.org</string>
|
||||||
<bool name="hide_accounts">false</bool>
|
<bool name="hide_accounts">false</bool>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue