diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index f698874fd..6aa293d78 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -2061,6 +2061,10 @@ extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_exportFriendsToVCa env->ReleaseStringUTFChars(jpath, path); } +extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_enableSubscriptions(JNIEnv* env, jobject thiz, jlong list, jboolean enable) { + linphone_friend_list_enable_subscriptions((LinphoneFriendList*)list, enable); +} + extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addFriendList(JNIEnv* env ,jobject thiz ,jlong lc diff --git a/java/common/org/linphone/core/LinphoneFriendList.java b/java/common/org/linphone/core/LinphoneFriendList.java index a86b2a7f5..57a354e21 100644 --- a/java/common/org/linphone/core/LinphoneFriendList.java +++ b/java/common/org/linphone/core/LinphoneFriendList.java @@ -29,6 +29,7 @@ public interface LinphoneFriendList { public LinphoneFriend[] getFriendList(); public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered); public void closeSubscriptions(); + public void enableSubscriptions(boolean enable); public LinphoneFriend findFriendByUri(String uri); public void setUri(String uri); public void synchronizeFriendsFromServer(); diff --git a/java/impl/org/linphone/core/LinphoneFriendListImpl.java b/java/impl/org/linphone/core/LinphoneFriendListImpl.java index 0f4e197e3..4a531902d 100644 --- a/java/impl/org/linphone/core/LinphoneFriendListImpl.java +++ b/java/impl/org/linphone/core/LinphoneFriendListImpl.java @@ -31,6 +31,7 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable { private native LinphoneFriend[] getFriendList(long nativePtr); private native void updateSubscriptions(long nativePtr, long proxyConfigPtr, boolean onlyWhenRegistered); private native void closeSubscriptions(long nativePtr); + private native void enableSubscriptions(long nativePtr, boolean enable); private native Object getCore(long ptr); private native LinphoneFriend findFriendByUri(long nativePtr, String uri); private native void setListener(long ptr, LinphoneFriendListListener listener); @@ -81,6 +82,13 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable { } } + @Override + public void enableSubscriptions(boolean enable) { + synchronized(getSyncObject()) { + enableSubscriptions(nativePtr, enable); + } + } + @Override public LinphoneFriend findFriendByUri(String uri) { synchronized(getSyncObject()){