From 7bf7a7e4158df882028df510e8d76009f2640d96 Mon Sep 17 00:00:00 2001 From: ylecollen Date: Mon, 9 Jan 2017 13:55:58 +0100 Subject: use the same way to name the creation method i.e. createNewXX. Avoid the initWithXX. --- java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp') diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp index c4e6811..b26cfae 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp +++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp @@ -37,20 +37,21 @@ OlmUtility* initializeUtilityMemory() return utilityPtr; } -JNIEXPORT jlong OLM_UTILITY_FUNC_DEF(initUtilityJni)(JNIEnv *env, jobject thiz) +JNIEXPORT jlong OLM_UTILITY_FUNC_DEF(createUtilityJni)(JNIEnv *env, jobject thiz) { OlmUtility* utilityPtr = initializeUtilityMemory(); - LOGD("## initUtilityJni(): IN"); + LOGD("## createUtilityJni(): IN"); // init account memory allocation if (!utilityPtr) { - LOGE(" ## initUtilityJni(): failure - init OOM"); + LOGE(" ## createUtilityJni(): failure - init OOM"); + env->ThrowNew(env->FindClass("java/lang/Exception"), "init OOM"); } else { - LOGD(" ## initUtilityJni(): success"); + LOGD(" ## createUtilityJni(): success"); } return (jlong)(intptr_t)utilityPtr; -- cgit v1.2.3