From e0b19d93452e4f4ee645985ead1513f413539948 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 22 Mar 2016 17:15:55 +0100 Subject: [PATCH] Disable subscribes in friends for now --- src/org/linphone/LinphoneContact.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/org/linphone/LinphoneContact.java b/src/org/linphone/LinphoneContact.java index ef6b497f2..3e58db616 100644 --- a/src/org/linphone/LinphoneContact.java +++ b/src/org/linphone/LinphoneContact.java @@ -27,6 +27,7 @@ import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCoreException; import org.linphone.core.LinphoneCoreFactory; import org.linphone.core.LinphoneFriend; +import org.linphone.core.LinphoneFriend.SubscribePolicy; import org.linphone.mediastream.Log; import android.content.ContentProviderOperation; @@ -389,6 +390,9 @@ public class LinphoneContact implements Serializable { if (friend == null) { friend = LinphoneCoreFactory.instance().createLinphoneFriend(); friend.setRefKey(id); + // Disable subscribes for now + friend.enableSubscribes(false); + friend.setIncSubscribePolicy(SubscribePolicy.SPDeny); friend.setName(fullName); if (hasSipAddress) { for (LinphoneNumberOrAddress noa : getAddressesAndNumbersForAndroidContact(id)) { @@ -550,6 +554,9 @@ public class LinphoneContact implements Serializable { private static LinphoneContact createLinphoneFriend() { LinphoneContact contact = new LinphoneContact(); LinphoneFriend friend = LinphoneCoreFactory.instance().createLinphoneFriend(); + // Disable subscribes for now + friend.enableSubscribes(false); + friend.setIncSubscribePolicy(SubscribePolicy.SPDeny); contact.friend = friend; return contact; }