diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 35ee7f26d..d45f6009b 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1152,6 +1152,11 @@ extern "C" jstring Java_org_linphone_core_LinphoneCallLogImpl_getStartDate(JNIEn jstring jvalue =env->NewStringUTF(((LinphoneCallLog*)ptr)->start_date); return jvalue; } +extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getCallDuration(JNIEnv* env + ,jobject thiz + ,jlong ptr) { + return ((LinphoneCallLog*)ptr)->duration; +} /*payloadType*/ extern "C" jstring Java_org_linphone_core_PayloadTypeImpl_toString(JNIEnv* env,jobject thiz,jlong ptr) { diff --git a/java/common/org/linphone/core/LinphoneCallLog.java b/java/common/org/linphone/core/LinphoneCallLog.java index fa1bc2ae5..98bf40c50 100644 --- a/java/common/org/linphone/core/LinphoneCallLog.java +++ b/java/common/org/linphone/core/LinphoneCallLog.java @@ -101,4 +101,9 @@ public interface LinphoneCallLog { * @return a human readble String with the start date/time of the call */ public String getStartDate(); + + /** + * @return the call duration, in seconds + */ + public int getCallDuration(); }