bind/java: revert byte array class workaround from CL 9783
After CL 10296 the workaround from CL 9783 is no longer necessary. Revert the workaround but keep the global reference, just in case. Change-Id: I3fdd580e4122c36508beb9d328739b910dbbe2e2 Reviewed-on: https://go-review.googlesource.com/10483 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Родитель
c73f3e75b6
Коммит
e241db99d5
|
@ -200,11 +200,7 @@ Java_go_Seq_initSeq(JNIEnv *env, jclass clazz) {
|
||||||
receive_handle_id = find_field(env, "go/Seq$Receive", "handle", "I");
|
receive_handle_id = find_field(env, "go/Seq$Receive", "handle", "I");
|
||||||
receive_code_id = find_field(env, "go/Seq$Receive", "code", "I");
|
receive_code_id = find_field(env, "go/Seq$Receive", "code", "I");
|
||||||
|
|
||||||
// Find jbyteArray class info by instantiating a jbyteArray and getting
|
jclass bclazz = find_class(env, "[B");
|
||||||
// its class info, because finding the jbyteArray class ("[B") using
|
|
||||||
// find_class_fn or JNIEnv's FindClass does not work on android-L.
|
|
||||||
jbyteArray a = (*env)->NewByteArray(env, 0);
|
|
||||||
jclass bclazz = (*env)->GetObjectClass(env, a);
|
|
||||||
jbytearray_clazz = (*env)->NewGlobalRef(env, bclazz);
|
jbytearray_clazz = (*env)->NewGlobalRef(env, bclazz);
|
||||||
|
|
||||||
LOG_INFO("loaded go/Seq");
|
LOG_INFO("loaded go/Seq");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче