Fix bug with RLS presence
This commit is contained in:
parent
c4f1e2707a
commit
798282c980
6 changed files with 9 additions and 10 deletions
|
@ -12,8 +12,7 @@ register_only_when_network_is_up=1
|
|||
auto_net_state_mon=0
|
||||
auto_answer_replacing_calls=1
|
||||
ping_with_options=0
|
||||
rls_uri=sip:rls@sip.linphone.org
|
||||
use_rls_presence=1
|
||||
rls_uri=
|
||||
|
||||
[rtp]
|
||||
audio_rtp_port=7076
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<string name="default_domain">sip.linphone.org</string><!-- Set the default domain used for account creation/addresses -->
|
||||
<string name="sync_account_type">org.linphone</string> <!-- Change package ! -->
|
||||
<string name="sync_mimetype">vnd.android.cursor.item/org.linphone.profile</string> <!-- Change package, leave .profile at the end. Also change res/xml/contacts.xml ! -->
|
||||
<string name="rls_uri">sip:rls@sip.linphone.org</string>
|
||||
<bool name="orientation_portrait_only">false</bool>
|
||||
<bool name="show_statusbar_only_on_dialer">false</bool>
|
||||
<bool name="force_use_of_linphone_friends">false</bool>
|
||||
|
|
|
@ -423,7 +423,10 @@ public class ContactsManager extends ContentObserver {
|
|||
setContacts(contacts);
|
||||
setSipContacts(sipContacts);
|
||||
|
||||
LinphoneManager.getLc().getFriendLists()[0].updateSubscriptions();
|
||||
if (LinphonePreferences.instance() != null && LinphonePreferences.instance().isFriendlistsubscriptionEnabled()) {
|
||||
LinphoneManager.getLc().getFriendLists()[0].setRLSUri(getString(R.string.rls_uri));
|
||||
LinphoneManager.getLc().getFriendLists()[0].updateSubscriptions();
|
||||
}
|
||||
for (ContactsUpdatedListener listener : contactsUpdatedListeners) {
|
||||
listener.onContactsUpdated();
|
||||
}
|
||||
|
|
|
@ -1358,11 +1358,6 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
}
|
||||
|
||||
updateMissedChatCount();
|
||||
if(LinphonePreferences.instance().isFriendlistsubscriptionEnabled() && LinphoneManager.getLc().getDefaultProxyConfig() != null){
|
||||
LinphoneManager.getInstance().subscribeFriendList(true);
|
||||
} else {
|
||||
LinphoneManager.getInstance().subscribeFriendList(false);
|
||||
}
|
||||
|
||||
displayMissedCalls(LinphoneManager.getLc().getMissedCallsCount());
|
||||
|
||||
|
|
|
@ -467,6 +467,8 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
LinphoneFriendList mFriendList = (lc.getFriendLists())[0];
|
||||
Log.i("Presence list subscription is " + (enabled ? "enabled" : "disabled"));
|
||||
mFriendList.enableSubscriptions(enabled);
|
||||
if (ContactsManager.getInstance() != null)
|
||||
ContactsManager.getInstance().fetchContactsAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -789,7 +791,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
mLc.setCallLogsDatabasePath(mCallLogDatabaseFile);
|
||||
mLc.setFriendsDatabasePath(mFriendsDatabaseFile);
|
||||
mLc.setUserCertificatesPath(mUserCertificatePath);
|
||||
subscribeFriendList(false);
|
||||
//mLc.setCallErrorTone(Reason.NotFound, mErrorToneFile);
|
||||
enableDeviceRingtone(mPrefs.isDeviceRingtoneEnabled());
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9bea70ebe3069a9b7ccfc2b090ce8e8834a8cbee
|
||||
Subproject commit fb21732c38217f81887684e0cd42a9ebf44ba2c5
|
Loading…
Reference in a new issue