Fixed the jni global reference
This commit is contained in:
parent
d1a7351c48
commit
ddb4f6fcf7
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,7 @@ Java_org_ab_x48_X48_registerClass( JNIEnv* env, jobject caller, jobject callback
|
||||||
{
|
{
|
||||||
LOGI("--registerClass--");
|
LOGI("--registerClass--");
|
||||||
android_env = env;
|
android_env = env;
|
||||||
android_callback = callback;
|
android_callback = (*android_env)->NewGlobalRef(env, callback);
|
||||||
jclass x48 = (*android_env)->GetObjectClass(env, android_callback);
|
jclass x48 = (*android_env)->GetObjectClass(env, android_callback);
|
||||||
LOGI("--x48 registered--");
|
LOGI("--x48 registered--");
|
||||||
refreshMainScreen = (*android_env)->GetMethodID(android_env, x48, "refreshMainScreen", "([S)V");
|
refreshMainScreen = (*android_env)->GetMethodID(android_env, x48, "refreshMainScreen", "([S)V");
|
||||||
|
|
Loading…
Reference in a new issue