From 5fc5d37330d3535a0f421632694d1e7918fc22d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 8 Apr 2014 11:38:09 +0200 Subject: Compiles correctly: app/build-native + gradle. --- app/jni/jniglue.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 app/jni/jniglue.c (limited to 'app/jni/jniglue.c') diff --git a/app/jni/jniglue.c b/app/jni/jniglue.c new file mode 100644 index 00000000..143cd10b --- /dev/null +++ b/app/jni/jniglue.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include + +#include "jniglue.h" + +jint JNI_OnLoad(JavaVM *vm, void *reserved) { + __android_log_write(ANDROID_LOG_DEBUG,"openvpn", "Loading openvpn native library $id$ compiled on " __DATE__ " " __TIME__ ); + return JNI_VERSION_1_2; +} + + +void android_openvpn_log(int level,const char* prefix,const char* prefix_sep,const char* m1) +{ + __android_log_print(ANDROID_LOG_DEBUG,"openvpn","%s%s%s",prefix,prefix_sep,m1); +} + +void Java_se_leap_openvpn_OpenVpnManagementThread_jniclose(JNIEnv *env,jclass jo, jint fd) { + int ret = close(fd); +} + -- cgit v1.2.3 From 3c3421afd8f74a3aa8d1011de07a8c18f9549210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 8 Apr 2014 12:04:17 +0200 Subject: Rename app->bitmask_android This way, gradle commands generate apks correctly named. --- app/jni/jniglue.c | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 app/jni/jniglue.c (limited to 'app/jni/jniglue.c') diff --git a/app/jni/jniglue.c b/app/jni/jniglue.c deleted file mode 100644 index 143cd10b..00000000 --- a/app/jni/jniglue.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -#include -#include - -#include "jniglue.h" - -jint JNI_OnLoad(JavaVM *vm, void *reserved) { - __android_log_write(ANDROID_LOG_DEBUG,"openvpn", "Loading openvpn native library $id$ compiled on " __DATE__ " " __TIME__ ); - return JNI_VERSION_1_2; -} - - -void android_openvpn_log(int level,const char* prefix,const char* prefix_sep,const char* m1) -{ - __android_log_print(ANDROID_LOG_DEBUG,"openvpn","%s%s%s",prefix,prefix_sep,m1); -} - -void Java_se_leap_openvpn_OpenVpnManagementThread_jniclose(JNIEnv *env,jclass jo, jint fd) { - int ret = close(fd); -} - -- cgit v1.2.3 From 1684c8f398922065a97e7da4dac4ac6a33cc5218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Wed, 9 Apr 2014 16:03:55 +0200 Subject: Back to the standard "app" module. This return to "app" instead of "bitmask_android" is due to this reading: https://developer.android.com/sdk/installing/studio-build.html#projectStructure I'll have to tweak the final apk name in build.gradle. --- app/jni/jniglue.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 app/jni/jniglue.c (limited to 'app/jni/jniglue.c') diff --git a/app/jni/jniglue.c b/app/jni/jniglue.c new file mode 100644 index 00000000..143cd10b --- /dev/null +++ b/app/jni/jniglue.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include + +#include "jniglue.h" + +jint JNI_OnLoad(JavaVM *vm, void *reserved) { + __android_log_write(ANDROID_LOG_DEBUG,"openvpn", "Loading openvpn native library $id$ compiled on " __DATE__ " " __TIME__ ); + return JNI_VERSION_1_2; +} + + +void android_openvpn_log(int level,const char* prefix,const char* prefix_sep,const char* m1) +{ + __android_log_print(ANDROID_LOG_DEBUG,"openvpn","%s%s%s",prefix,prefix_sep,m1); +} + +void Java_se_leap_openvpn_OpenVpnManagementThread_jniclose(JNIEnv *env,jclass jo, jint fd) { + int ret = close(fd); +} + -- cgit v1.2.3