1
0
Fork 0
forked from len0rd/rockbox

Android: Don't share the JNI environment across threads, but obtain it the

correct way

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29569 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2011-03-11 18:34:35 +00:00
parent 2e5b7aebde
commit 66f2a08f8a
10 changed files with 60 additions and 16 deletions

View file

@ -22,14 +22,16 @@
#include <jni.h>
#include "kernel.h"
#include "system.h"
extern JNIEnv *env_ptr;
extern jobject RockboxService_instance;
void telephony_init_device(void)
{
JNIEnv *env_ptr = getJavaEnvironment();
JNIEnv e = *env_ptr;
jclass class = e->FindClass(env_ptr, "org/rockbox/RockboxTelephony");
jmethodID constructor = e->GetMethodID(env_ptr, class, "<init>", "(Landroid/content/Context;)V");