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

Thomas Guillem git at videolan.org
Mon Nov 24 15:14:15 CET 2014


vlc-ports/android | branch: 1.0.x | Thomas Guillem <tom at gllm.fr> | Tue Oct 14 11:46:47 2014 +0200| [fe346ec2df309c577a1085838ab1863f3f4fcc11] | committer: Thomas Guillem

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=fe346ec2df309c577a1085838ab1863f3f4fcc11
---

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

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


More information about the Android mailing list