summaryrefslogtreecommitdiff
path: root/javaunohelper/com/sun
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-09-20 14:16:40 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-09-20 14:24:55 +0300
commit4b326ea35cb9193dbb530b9445a778d61bf8273d (patch)
treec4dfb5b4a6e4ea1597787bb2082d32a7873164a8 /javaunohelper/com/sun
parente7c9b468f364fd4796f0ff6fc6b76045ad58b26f (diff)
No need for the juh/juhx dance when DISABLE_DYNLOADING
Change-Id: Ifc2bfb278947344d14b855ebf5527b603e333f15
Diffstat (limited to 'javaunohelper/com/sun')
-rw-r--r--javaunohelper/com/sun/star/comp/helper/Bootstrap.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 120217febea3..2087aeca5689 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -1,3 +1,5 @@
+// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+
/*
* This file is part of the LibreOffice project.
*
@@ -191,7 +193,33 @@ public class Bootstrap {
if (! m_loaded_juh)
{
- NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" );
+ if (System.getProperty("java.vendor") == "The Android Project")
+ {
+ // Find out if we are configured with DISABLE_DYNLOADING or
+ // not. Try to load the lo-bootstrap shared library which
+ // won't exist in the DISABLE_DYNLOADING case. (And which will
+ // be already loaded otherwise, so nothing unexpected happens
+ // that case.) Yeah, this would be simpler if I just could be
+ // bothered to keep a separate branch for DISABLE_DYNLOADING
+ // on Android, merging in master periodically, until I know
+ // for sure whether it is what I want, or not.
+
+ boolean disable_dynloading = false;
+ try {
+ System.loadLibrary( "lo-bootstrap" );
+ } catch ( UnsatisfiedLinkError e ) {
+ disable_dynloading = true;
+ }
+
+ if (!disable_dynloading)
+ {
+ NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" );
+ }
+ }
+ else
+ {
+ NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" );
+ }
m_loaded_juh = true;
}
return UnoRuntime.queryInterface(
@@ -318,3 +346,5 @@ public class Bootstrap {
}.start();
}
}
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab: