Kaydet (Commit) 79f94fee authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Tor Lillqvist

There is no java_uno library to load in the disable-dynloading case on Android

Change-Id: I350aeeb7fb1e00b201077883dd5fd601b42a626b
üst f09f52e4
// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* /*
* This file is part of the LibreOffice project. * This file is part of the LibreOffice project.
* *
...@@ -24,6 +25,22 @@ import com.sun.star.lib.util.NativeLibraryLoader; ...@@ -24,6 +25,22 @@ import com.sun.star.lib.util.NativeLibraryLoader;
public final class JNI_info_holder public final class JNI_info_holder
{ {
static { 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(), NativeLibraryLoader.loadLibrary(JNI_info_holder.class.getClassLoader(),
"java_uno"); "java_uno");
} }
...@@ -41,3 +58,5 @@ public final class JNI_info_holder ...@@ -41,3 +58,5 @@ public final class JNI_info_holder
finalize( s_jni_info_handle ); finalize( s_jni_info_handle );
} }
} }
// vim:set shiftwidth=4 softtabstop=4 expandtab:
// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* /*
* This file is part of the LibreOffice project. * This file is part of the LibreOffice project.
* *
...@@ -30,8 +31,24 @@ import com.sun.star.uno.IQueryInterface; ...@@ -30,8 +31,24 @@ import com.sun.star.uno.IQueryInterface;
public final class JNI_proxy implements java.lang.reflect.InvocationHandler public final class JNI_proxy implements java.lang.reflect.InvocationHandler
{ {
static { static {
NativeLibraryLoader.loadLibrary(JNI_proxy.class.getClassLoader(), if (System.getProperty("java.vendor") == "The Android Project") {
"java_uno"); // 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 = protected static ClassLoader s_classloader =
JNI_proxy.class.getClassLoader(); JNI_proxy.class.getClassLoader();
...@@ -204,3 +221,5 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler ...@@ -204,3 +221,5 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler
&& m_oid.equals(UnoRuntime.generateOid(obj))); && m_oid.equals(UnoRuntime.generateOid(obj)));
} }
} }
// vim:set shiftwidth=4 softtabstop=4 expandtab:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment