[Libreoffice-commits] .: Branch 'feature/android' - 2 commits - sal/android

Tor Lillqvist tml at kemper.freedesktop.org
Thu Jan 26 03:33:37 PST 2012


 sal/android/lo-bootstrap.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 052fe1a7700e834d9363be6da88d3fea71e879c3
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Jan 26 12:45:42 2012 +0200

    Call the JavaVM's AttachCurrentThread(), can't hurt...

diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index 59960b3..9c2c3da 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1491,6 +1491,8 @@ android_main(struct android_app* state)
         sleep(sleep_time);
     }
 
+    (*(*state->activity->vm)->AttachCurrentThread)(state->activity->vm, &env, 0);
+
     app = state;
 
     memset(&engine, 0, sizeof(engine));
commit 85f0cd34dbfc0dcc81da5ac0a046812673b40bb6
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Jan 26 12:42:29 2012 +0200

    Move the sleep earlier, and log it

diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index 98db089..59960b3 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1482,9 +1482,15 @@ __attribute__ ((visibility("default")))
 void
 android_main(struct android_app* state)
 {
+    JNIEnv *env;
     struct engine engine;
     Dl_info lo_main_info;
 
+    if (sleep_time != 0) {
+        LOGI("android_main: Sleeping for %d seconds, start ndk-gdb NOW if that is your intention", sleep_time);
+        sleep(sleep_time);
+    }
+
     app = state;
 
     memset(&engine, 0, sizeof(engine));
@@ -1495,9 +1501,6 @@ android_main(struct android_app* state)
         lo_main_argv[0] = lo_main_info.dli_fname;
     }
 
-    if (sleep_time != 0)
-        sleep(sleep_time);
-
     patch_libgnustl_shared();
 
     extract_files(UNPACK_TREE);


More information about the Libreoffice-commits mailing list