[Android] jni: factorize attach/detach thread and get_env

Thomas Guillem git at videolan.org
Thu Oct 16 12:13:33 CEST 2014


vlc-ports/android | branch: tv | Thomas Guillem <tom at gllm.fr> | Tue Oct 14 11:46:47 2014 +0200| [11d60d780daa93f07c87aff598acb71a8cbfe233] | committer: Geoffrey Métais

jni: factorize attach/detach thread and get_env

add jni_attach_thread, jni_detach_thread, jni_get_env in libvlcjni.c.

A name should be specified when a thread is attached to Java. Art (on
android-L) was warning us about. jni_attach_thread call AttachCurrentThread
with a JavaVMAttachArgs containing JNI_VERSION and THREAD_NAME.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=11d60d780daa93f07c87aff598acb71a8cbfe233
---

 vlc-android/jni/aout.c                 |   27 +++++++++++++------------
 vlc-android/jni/libvlcjni-util.c       |   12 ++++++-----
 vlc-android/jni/libvlcjni.c            |   34 +++++++++++++++++++++++++++++---
 vlc-android/jni/native_crash_handler.c |    9 +++++----
 vlc-android/jni/vout.c                 |   13 ++++++------
 5 files changed, 64 insertions(+), 31 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commitdiff;h=11d60d780daa93f07c87aff598acb71a8cbfe233


More information about the Android mailing list