summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-02-18 13:25:40 +0100
committerJan Holesovsky <kendy@collabora.com>2019-06-05 22:19:30 +0200
commitfc5199b098afe06234c9fb812f67102a20e69b35 (patch)
tree2d323aeb65bb3ca0a5ee3e3c171515dd2748bf37
parent683376af231091fd6b14c37eab1d1364d8270f2a (diff)
android: Expose setting of the JavaVM.
Needed when we use the liblo-native-code as a library. Change-Id: Ia4d1d72f2203a96d1196d015b521201919bbb165 Reviewed-on: https://gerrit.libreoffice.org/67965 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--include/osl/detail/android-bootstrap.h4
-rw-r--r--sal/android/lo-bootstrap.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/include/osl/detail/android-bootstrap.h b/include/osl/detail/android-bootstrap.h
index 5a5c7fcbd82d..169f3efaf282 100644
--- a/include/osl/detail/android-bootstrap.h
+++ b/include/osl/detail/android-bootstrap.h
@@ -35,6 +35,10 @@ int lo_apk_closedir(lo_apk_dir *dirp);
int lo_apk_lstat(const char *path, struct stat *statp);
+/// "libreofficekit_" prefix, because it is exported from the .so, when we are
+/// initializing the JNI externally.
+void libreofficekit_set_javavm(JavaVM *vm);
+
JavaVM *lo_get_javavm(void);
const char *lo_get_app_data_dir(void);
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index d1ecd810ab19..0af8cfbb4cd3 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -898,6 +898,13 @@ Java_org_libreoffice_android_Bootstrap_address_1of_1direct_1byte_1buffer(JNIEnv
}
__attribute__ ((visibility("default")))
+void
+libreofficekit_set_javavm(JavaVM *vm)
+{
+ the_java_vm = vm;
+}
+
+__attribute__ ((visibility("default")))
JavaVM *
lo_get_javavm(void)
{