diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index de7408496..650975b5f 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -4316,8 +4316,8 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getConferenceSize(JNIEnv } extern "C" jobject Jave_org_linphone_core_LinphoneCoreImpl_getConference(JNIEnv *env, jobject thiz, jlong pCore) { - jclass conference_class = env->FindClass("org/linphone/core/LinphoneConference"); - jmethodID conference_constructor = env->GetMethodID(conference_class, "", "(J)"); + jclass conference_class = env->FindClass("org/linphone/core/LinphoneConferenceImpl"); + jmethodID conference_constructor = env->GetMethodID(conference_class, "", "(J)V"); LinphoneConference *conf = linphone_core_get_conference((LinphoneCore *)pCore); if(conf) return env->NewObject(conference_class, conference_constructor, conf); else return NULL; @@ -4457,9 +4457,9 @@ extern "C" void Java_org_linphone_core_LinphoneCallImpl_setAuthenticationTokenVe linphone_call_set_authentication_token_verified(call, verified); } -extern "C" jobject Java_org_linphnoe_core_LinphoneCallImpl_getConference(JNIEnv *env, jobject thiz, jlong ptr) { - jclass conference_class = env->FindClass("org/linphone/core/LinphoneConference"); - jmethodID conference_constructor = env->GetMethodID(conference_class, "", "(J)"); +extern "C" jobject Java_org_linphone_core_LinphoneCallImpl_getConference(JNIEnv *env, jobject thiz, jlong ptr) { + jclass conference_class = env->FindClass("org/linphone/core/LinphoneConferenceImpl"); + jmethodID conference_constructor = env->GetMethodID(conference_class, "", "(J)V"); LinphoneConference *conf = linphone_call_get_conference((LinphoneCall *)ptr); if(conf) return env->NewObject(conference_class, conference_constructor, conf); return NULL; diff --git a/java/common/org/linphone/core/LinphoneCall.java b/java/common/org/linphone/core/LinphoneCall.java index 3ab28d437..793b09b60 100644 --- a/java/common/org/linphone/core/LinphoneCall.java +++ b/java/common/org/linphone/core/LinphoneCall.java @@ -280,10 +280,11 @@ public interface LinphoneCall { */ boolean isInConference(); /** - * Get the pointer on the C conference instance associated to that call. - * @return A positive value if the call is part of a conference, 0 if not. + * Get the conference instance which the call is part of. + * @return An instance of #LinphoneConference if the call is part + * of a conference. null instead. */ - long getConference(); + LinphoneConference getConference(); /** * Indicates whether an operation is in progress at the media side. diff --git a/java/impl/org/linphone/core/LinphoneCallImpl.java b/java/impl/org/linphone/core/LinphoneCallImpl.java index 28f6302d1..40226a4d3 100644 --- a/java/impl/org/linphone/core/LinphoneCallImpl.java +++ b/java/impl/org/linphone/core/LinphoneCallImpl.java @@ -165,10 +165,10 @@ class LinphoneCallImpl implements LinphoneCall { } public boolean isInConference() { - return getConference() != 0; + return getConference() != null; } - private native long getConference(long nativePtr); - public long getConference() { + public native LinphoneConference getConference(long nativePtr); + public LinphoneConference getConference() { return getConference(nativePtr); }