summaryrefslogtreecommitdiff
path: root/sal/android
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-04-02 12:38:23 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-04-02 12:39:52 +0300
commita9a50cd9ffcd53c631fd13d20aa7e0609d92fc4d (patch)
tree810d3fb6564d46fa573785d6c6b8efc9ed321941 /sal/android
parent2906a654d0c59adae71f4c0fb1c72adb3d5477a0 (diff)
Refactor where patch_libgnustl_shared() and extract_files() are called
Diffstat (limited to 'sal/android')
-rw-r--r--sal/android/lo-bootstrap.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index a216e0d1419c..75a389809014 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1518,7 +1518,7 @@ extract_files(const char *prefix)
lo_apk_closedir(tree);
}
-// public static native void patch_libgnustl_shared();
+// static native void patch_libgnustl_shared();
__attribute__ ((visibility("default")))
void
@@ -1531,6 +1531,19 @@ Java_org_libreoffice_android_Bootstrap_patch_1libgnustl_1shared(JNIEnv* env,
patch_libgnustl_shared();
}
+// static native void extract_files();
+
+__attribute__ ((visibility("default")))
+void
+Java_org_libreoffice_android_Bootstrap_extract_1files(JNIEnv* env,
+ jobject clazz)
+{
+ (void) env;
+ (void) clazz;
+
+ extract_files(UNPACK_TREE);
+}
+
/* Android's JNI works only to libraries loaded through Java's
* System.loadLibrary(), it seems. Not to functions loaded by a dlopen() call
* in native code. For instance, to call a function in libvcllo.so, we need to
@@ -1666,10 +1679,6 @@ android_main(struct android_app* state)
lo_main_argv[0] = lo_main_info.dli_fname;
}
- patch_libgnustl_shared();
-
- extract_files(UNPACK_TREE);
-
lo_main(lo_main_argc, lo_main_argv);
fprintf (stderr, "exit android_main\n");
}