diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-05-23 15:55:02 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-05-23 15:55:55 +0100 |
commit | b36ff96d1d1eda76e41e57db463c2734be7ccfec (patch) | |
tree | bd6a2059d54bdf5e19f1f6f74e8f4d103610b34b /android/Bootstrap/src | |
parent | b91d987360b2baa654dfc5c975ff8b44458df679 (diff) |
android: make launcher function as expected - starts writer.
Remove now redundant FONTCONFIG cmdline arguments, and add fallbacks
for not having cmdline arguments in the intent when launching.
Diffstat (limited to 'android/Bootstrap/src')
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/android/Bootstrap.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java index 82a40b701e66..12afc8c2b861 100644 --- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java +++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java @@ -169,7 +169,6 @@ public class Bootstrap extends NativeActivity if (cmdLine == null) { String indirectFile = getIntent().getStringExtra("lo-main-indirect-cmdline"); - if (indirectFile != null) { try { // Somewhat stupid but short way to read a file into a string @@ -181,7 +180,7 @@ public class Bootstrap extends NativeActivity } if (cmdLine == null) - cmdLine = "/data/data/org.libreoffice.android/lib/libqa_sal_types.so"; + cmdLine = ""; } Log.i(TAG, String.format("cmdLine=%s", cmdLine)); @@ -192,7 +191,6 @@ public class Bootstrap extends NativeActivity while (argv.length > 0 && argv[0].matches("[A-Z_]+=.*")) { putenv(argv[0]); - argv = Arrays.copyOfRange(argv, 1, argv.length-1); } // argv[0] will be replaced by android_main() in lo-bootstrap.c by the @@ -206,8 +204,13 @@ public class Bootstrap extends NativeActivity int loLib = dlopen(mainLibrary); if (loLib == 0) { - Log.i(TAG, String.format("Could not load %s", mainLibrary)); - return; + Log.i(TAG, String.format("Error: could not load %s", mainLibrary)); + mainLibrary = "libmergedlo.so"; + loLib = dlopen(mainLibrary); + if (loLib == 0) { + Log.i(TAG, String.format("Error: could not load fallback %s", mainLibrary)); + return; + } } int lo_main = dlsym(loLib, "lo_main"); |