aboutsummaryrefslogtreecommitdiffstats
path: root/src/frontends/android/jni/libandroidbridge/android_jni.c
Commit message (Collapse)AuthorAgeFilesLines
* android: Migrate to the Gradle build systemTobias Brunner2015-11-121-151/+0
| | | | | This uses a manual way to trigger the NDK build (the default with on-the-fly Android.mk files does not work for us).
* android: Manually load libraries with dlopen() and RTLD_GLOBAL on Android MTobias Brunner2015-07-281-1/+38
| | | | | | | | | | | | | | | | | This fixes an issue when using the Android M preview. Bionic's dynamic linker was changed so that symbols in libraries loaded with RTLD_LOCAL were not found anymore in dlsym(RTLD_DEFAULT, ...). This is the case for libraries loaded with System.loadLibrary(), therefore, the plugin loader in libstrongswan was not able to resolve any symbols defined in other libraries loaded later. While this seems to have been broken unintentionally for existing apps (fix at [1]), it will again be a problem whenever we decide to increase targetSdkVersion beyond 22 (or until that fix makes it into the system/emulator images). Unfortunately, the dynamic loader in releases prior to Android 4.3 can't load libandroidbridge without also loading its dependencies. [1] https://github.com/android/platform_bionic/commit/1913352c6b
* android: Added a global variable to check the current SDK versionTobias Brunner2012-09-241-1/+8
|
* Native counterpart of VpnService.Builder added, exposed by charonserviceTobias Brunner2012-08-131-0/+4
|
* Don't attach to actual Java threads (or already attached ones)Tobias Brunner2012-08-131-3/+12
| | | | | | We check this by trying to retrieve a JNIEnv object from the JVM, if one is returned the current thread is not native (created from Java) or the thread is already attached.
* Added functions to attach/detach native threads to the JVMTobias Brunner2012-08-081-0/+45
| | | | | | Even though native threads are automatically detached from the JVM with help of a thread-local destructor it is recommended to detach as soon as possible as local JNI references are not freed until a thread detaches.
* Moved JNI helper macros to a separate fileTobias Brunner2012-08-081-0/+49
Also initialize a reference to the CharonVpnService class during JNI_OnLoad, which allows us later to call methods from C to Java.