diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-09-21 14:23:24 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-09-21 14:42:57 +0300 |
commit | 41e8c36d09c865f21feb465337e56e3e524c9e29 (patch) | |
tree | 53fead9ee5a2acdb69e46802607d307f295119f2 /javaunohelper/com/sun | |
parent | b247950eeeb2ea2345633ee018fbe2c55c1942c0 (diff) |
No juh library to load in the disable-dynloading case (on Android)
Change-Id: I6a5eefe86e23499b555b34c6ba2ebe131e109304
Diffstat (limited to 'javaunohelper/com/sun')
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java | 19 | ||||
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java | 19 |
2 files changed, 36 insertions, 2 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java index 44fcb4a8f5b1..8f0bc291d750 100644 --- a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java +++ b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.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. * @@ -31,7 +32,22 @@ import com.sun.star.uno.RuntimeException; */ public class RegistryServiceFactory { static { - System.loadLibrary("juh"); + 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) + System.loadLibrary("juh"); + } else + System.loadLibrary("juh"); } private static native Object createRegistryServiceFactory( @@ -157,3 +173,4 @@ public class RegistryServiceFactory { } } +// vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java index c5918e6d000e..a9cfe46e7d8f 100644 --- a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java +++ b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.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. * @@ -45,7 +46,22 @@ public class SharedLibraryLoader { public static final String DEFAULT_IMPLEMENTATION = "com.sun.star.comp.stoc.DLLComponentLoader"; static { - System.loadLibrary("juh"); + 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) + System.loadLibrary("juh"); + } else + System.loadLibrary("juh"); } private static native boolean component_writeInfo( @@ -148,3 +164,4 @@ public class SharedLibraryLoader { } } +// vim:set shiftwidth=4 softtabstop=4 expandtab: |