summaryrefslogtreecommitdiff
path: root/sal/android
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-11-21 15:18:30 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-11-21 15:22:27 +0200
commitae81246917f581a7a498a371b9a6137cde542b3e (patch)
treee47c44ab952aa4d8fad28da352d5ebdfcb3dbf91 /sal/android
parent1c84f6f475a448333f844b0e25d895d117b90563 (diff)
We don't need the library search path anymore
As we don't use any dlopen() etc wrappers now with just one single DSO, we have no use for the library search path either. Change-Id: Ifaf11c4785a90fe5c7dafb3310bc7933ea31238c
Diffstat (limited to 'sal/android')
-rw-r--r--sal/android/lo-bootstrap.c37
1 files changed, 4 insertions, 33 deletions
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index f1f2155a5134..66057482e61e 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -84,7 +84,6 @@ static int sleep_time = 0;
/* These are valid / used in all apps. */
static const char *data_dir;
static const char *cache_dir;
-static const char **library_locations;
static void *apk_file;
static int apk_file_size;
static JavaVM *the_java_vm;
@@ -315,59 +314,31 @@ JNI_OnLoad(JavaVM* vm, void* reserved)
// public static native boolean setup(String dataDir,
// String cacheDir,
-// String apkFile,
-// String[] ld_library_path);
+// String apkFile)
__attribute__ ((visibility("default")))
jboolean
-Java_org_libreoffice_android_Bootstrap_setup__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2_3Ljava_lang_String_2
+Java_org_libreoffice_android_Bootstrap_setup__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2
(JNIEnv* env,
jobject clazz,
jstring dataDir,
jstring cacheDir,
- jstring apkFile,
- jobjectArray ld_library_path)
+ jstring apkFile)
{
struct stat st;
- int i, n, fd;
+ int fd;
const char *dataDirPath;
const char *cacheDirPath;
const char *apkFilePath;
- char *lib_dir;
(void) clazz;
- n = (*env)->GetArrayLength(env, ld_library_path);
-
- library_locations = malloc((n+2) * sizeof(char *));
-
dataDirPath = (*env)->GetStringUTFChars(env, dataDir, NULL);
-
data_dir = strdup(dataDirPath);
-
- lib_dir = malloc(strlen(dataDirPath) + 5);
- strcpy(lib_dir, dataDirPath);
- strcat(lib_dir, "/lib");
-
(*env)->ReleaseStringUTFChars(env, dataDir, dataDirPath);
- library_locations[0] = lib_dir;
-
- for (i = 0; i < n; i++) {
- const char *s = (*env)->GetStringUTFChars(env, (*env)->GetObjectArrayElement(env, ld_library_path, i), NULL);
- library_locations[i+1] = strdup(s);
- (*env)->ReleaseStringUTFChars(env, (*env)->GetObjectArrayElement(env, ld_library_path, i), s);
- }
-
- library_locations[n+1] = NULL;
-
- for (n = 0; library_locations[n] != NULL; n++)
- LOGI("library_locations[%d] = %s", n, library_locations[n]);
-
cacheDirPath = (*env)->GetStringUTFChars(env, cacheDir, NULL);
-
cache_dir = strdup(cacheDirPath);
-
(*env)->ReleaseStringUTFChars(env, cacheDir, cacheDirPath);
apkFilePath = (*env)->GetStringUTFChars(env, apkFile, NULL);