diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-12-13 19:33:42 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-02-21 22:54:36 +0200 |
commit | 52a8744afee2cd589813f0377d93f821fce7aedd (patch) | |
tree | 1c68647d4a31559e77e8b8be98e15bb9af18f76a /sal/osl | |
parent | f68cd77923ed996c372e6814d615c6faf635626a (diff) |
Revert "Clean up remains of NativeActivity-based Android app support"
This reverts commit cecc926070ee3d2ad6296fc5e0cfcde8642bb140.
Conflicts:
sal/android/lo-bootstrap.c
sal/inc/osl/detail/android-bootstrap.h
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 723d10bcd436..4a10af514557 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -104,10 +104,26 @@ oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl ( { oslProcessError result = osl_Process_E_NotFound; -#ifdef ANDROID - /* Now with just a single DSO, this one from lo-bootstrap.c is as good as - * any */ - void * addr = dlsym (RTLD_DEFAULT, "JNI_OnLoad"); +#if defined(ANDROID) && !defined(DISABLE_DYNLOADING) + /* On Android we in theory want the address of the "lo_main()" + * function, as that is what corresponds to "main()" in + * LibreOffice programs on normal desktop OSes. + * + * But that is true only for apps with a "native activity", using + * <sal/main.h> and the org.libreoffice.android.Bootstrap + * mechanism. For more normal (?) Android apps that just use + * LibreOffice libraries (components) where the main program is in + * Java, that just use LibreOffice libraries, there is no + * lo_main(). (Note that we don't know for sure yet how + * complicated it might be to write such Android apps...) + * + * Maybe best to just pick some function in liblo-bootstrap.so + * which also such Java apps *must* load as the very first + * LibreOffice native library. We store all LibreOffice native + * shared libraries an app uses in the same folder anyway, so it + * doesn't really matter. + */ + void * addr = (void *) &lo_dlopen; #else /* Determine address of "main()" function. */ void * addr = dlsym (RTLD_DEFAULT, "main"); |