summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-09-21 14:33:25 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-09-21 14:46:44 +0300
commit79f94fee9ea3c223ddd4035916a0fb4f1a123fb3 (patch)
tree0e10b29d981778ff00e91a0e93e51bace701ca13 /bridges
parentf09f52e4add4999264bbf960a3a7af6a6b7a8285 (diff)
There is no java_uno library to load in the disable-dynloading case on Android
Change-Id: I350aeeb7fb1e00b201077883dd5fd601b42a626b
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java19
-rw-r--r--bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java23
2 files changed, 40 insertions, 2 deletions
diff --git a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
index bdde4f82d9ec..4285eccd95c2 100644
--- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
+++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
@@ -1,3 +1,4 @@
+// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/*
* This file is part of the LibreOffice project.
*
@@ -24,6 +25,22 @@ import com.sun.star.lib.util.NativeLibraryLoader;
public final class JNI_info_holder
{
static {
+ if (System.getProperty("java.vendor") == "The Android Project") {
+ // See corresponding code in
+ // javaunohelper/com/sun/star/comp/helper/Bootstrap.java for more
+ // comments.
+
+ boolean disable_dynloading = false;
+ try {
+ System.loadLibrary("lo-bootstrap");
+ } catch (UnsatisfiedLinkError e) {
+ disable_dynloading = true;
+ }
+
+ if (!disable_dynloading)
+ NativeLibraryLoader.loadLibrary(JNI_info_holder.class.getClassLoader(),
+ "java_uno");
+ } else
NativeLibraryLoader.loadLibrary(JNI_info_holder.class.getClassLoader(),
"java_uno");
}
@@ -41,3 +58,5 @@ public final class JNI_info_holder
finalize( s_jni_info_handle );
}
}
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
index 0b19ba60096f..31861d62a39c 100644
--- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
+++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
@@ -1,3 +1,4 @@
+// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/*
* This file is part of the LibreOffice project.
*
@@ -30,8 +31,24 @@ import com.sun.star.uno.IQueryInterface;
public final class JNI_proxy implements java.lang.reflect.InvocationHandler
{
static {
- NativeLibraryLoader.loadLibrary(JNI_proxy.class.getClassLoader(),
- "java_uno");
+ if (System.getProperty("java.vendor") == "The Android Project") {
+ // See corresponding code in
+ // javaunohelper/com/sun/star/comp/helper/Bootstrap.java for more
+ // comments.
+
+ boolean disable_dynloading = false;
+ try {
+ System.loadLibrary("lo-bootstrap");
+ } catch (UnsatisfiedLinkError e) {
+ disable_dynloading = true;
+ }
+
+ if (!disable_dynloading)
+ NativeLibraryLoader.loadLibrary(JNI_info_holder.class.getClassLoader(),
+ "java_uno");
+ } else
+ NativeLibraryLoader.loadLibrary(JNI_proxy.class.getClassLoader(),
+ "java_uno");
}
protected static ClassLoader s_classloader =
JNI_proxy.class.getClassLoader();
@@ -204,3 +221,5 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler
&& m_oid.equals(UnoRuntime.generateOid(obj)));
}
}
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab: