From 04fd4c5a1301545419fb72533c57e4253085bdc0 Mon Sep 17 00:00:00 2001 From: pedroGitt Date: Mon, 14 Nov 2016 11:56:37 +0100 Subject: Fix the decrypt issue (crash on V5.1.1) when the message to decrypt contains emojis: - add an internal specific JNI function (javaCStringToUtf8()) to perform the UTF-8 conversion - the SDK is configured to enable/disable the use of javaCStringToUtf8() --- java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_inbound_group_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_inbound_group_session.h') diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_inbound_group_session.h b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_inbound_group_session.h index 897ef46..ec402fd 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_inbound_group_session.h +++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_inbound_group_session.h @@ -33,7 +33,7 @@ JNIEXPORT jlong OLM_INBOUND_GROUP_SESSION_FUNC_DEF(createNewSessionJni)(JNIEnv * JNIEXPORT jint OLM_INBOUND_GROUP_SESSION_FUNC_DEF(initInboundGroupSessionWithSessionKeyJni)(JNIEnv *env, jobject thiz, jstring aSessionKey); JNIEXPORT jstring OLM_INBOUND_GROUP_SESSION_FUNC_DEF(sessionIdentifierJni)(JNIEnv *env, jobject thiz); -JNIEXPORT jstring OLM_INBOUND_GROUP_SESSION_FUNC_DEF(decryptMessageJni)(JNIEnv *env, jobject thiz, jstring aEncryptedMsg); +JNIEXPORT jstring OLM_INBOUND_GROUP_SESSION_FUNC_DEF(decryptMessageJni)(JNIEnv *env, jobject thiz, jstring aEncryptedMsg, jboolean aIsUtf8ConversionRequired); // serialization JNIEXPORT jstring OLM_INBOUND_GROUP_SESSION_FUNC_DEF(serializeDataWithKeyJni)(JNIEnv *env, jobject thiz, jstring aKey, jobject aErrorMsg); -- cgit v1.2.3