android: Need the the JavaVM in LibreOfficeKit too.

Change-Id: Ice4a25be0e6eb8a2aa8e571bd22847e5fda1e8a2
This commit is contained in:
Jan Holesovsky 2019-02-18 13:38:19 +01:00
parent d18cb90a68
commit 91280ea905

View file

@ -20,7 +20,9 @@
#include <Protocol.hpp> #include <Protocol.hpp>
#include <Util.hpp> #include <Util.hpp>
#include "Poco/Base64Encoder.h" #include <osl/detail/android-bootstrap.h>
#include <Poco/Base64Encoder.h>
const int SHOW_JS_MAXLEN = 70; const int SHOW_JS_MAXLEN = 70;
@ -35,6 +37,7 @@ static JavaVM* javaVM = nullptr;
extern "C" JNIEXPORT jint JNICALL extern "C" JNIEXPORT jint JNICALL
JNI_OnLoad(JavaVM* vm, void*) { JNI_OnLoad(JavaVM* vm, void*) {
javaVM = vm; javaVM = vm;
libreofficekit_set_javavm(vm);
JNIEnv* env; JNIEnv* env;
if (vm->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK) { if (vm->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK) {