diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-10-06 12:42:00 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-10-06 12:44:09 -0700 |
commit | 6a5e6df96858bd581151cc99421f67a0674b76d1 (patch) | |
tree | aa2a8ca7bb9df35f7ccddfb4188c50ebe44ebee4 | |
parent | 71c4578def00a5a4b9e159fd1ab88e616bc7e159 (diff) | |
download | frameworks_base-6a5e6df96858bd581151cc99421f67a0674b76d1.zip frameworks_base-6a5e6df96858bd581151cc99421f67a0674b76d1.tar.gz frameworks_base-6a5e6df96858bd581151cc99421f67a0674b76d1.tar.bz2 |
Fix incorrect JNI_ABORT
If there is a copy, JNI_ABORT does NOT copy back into the
corresponding java array. Changing this to 0 is what you want since
this will copy the data back if needed and free the temporary
storage.
Bug: 16858794
Change-Id: I3f3b426ea3cbba577bb720532c16ebf7493f1c1c
-rw-r--r-- | core/jni/com_google_android_gles_jni_EGLImpl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/jni/com_google_android_gles_jni_EGLImpl.cpp b/core/jni/com_google_android_gles_jni_EGLImpl.cpp index 8ad2eea..6c21bab 100644 --- a/core/jni/com_google_android_gles_jni_EGLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_EGLImpl.cpp @@ -115,7 +115,7 @@ static jint* beginNativeAttribList(JNIEnv *_env, jintArray attrib_list) { static void endNativeAttributeList(JNIEnv *_env, jintArray attrib_list, jint* attrib_base) { if (attrib_list != NULL) { - _env->ReleaseIntArrayElements(attrib_list, attrib_base, JNI_ABORT); + _env->ReleaseIntArrayElements(attrib_list, attrib_base, 0); } } @@ -136,7 +136,7 @@ static jboolean jni_eglInitialize(JNIEnv *_env, jobject _this, jobject display, jint* base = (jint *)_env->GetPrimitiveArrayCritical(major_minor, (jboolean *)0); if (len >= 1) base[0] = 1; if (len >= 2) base[1] = 0; - _env->ReleasePrimitiveArrayCritical(major_minor, base, JNI_ABORT); + _env->ReleasePrimitiveArrayCritical(major_minor, base, 0); } } return EglBoolToJBool(success); @@ -156,7 +156,7 @@ static jboolean jni_eglQueryContext(JNIEnv *_env, jobject _this, jobject display if (len) { jint* base = _env->GetIntArrayElements(value, (jboolean *)0); success = eglQueryContext(dpy, ctx, attribute, base); - _env->ReleaseIntArrayElements(value, base, JNI_ABORT); + _env->ReleaseIntArrayElements(value, base, 0); } return EglBoolToJBool(success); } @@ -176,7 +176,7 @@ static jboolean jni_eglQuerySurface(JNIEnv *_env, jobject _this, jobject display if (len) { jint* base = _env->GetIntArrayElements(value, (jboolean *)0); success = eglQuerySurface(dpy, sur, attribute, base); - _env->ReleaseIntArrayElements(value, base, JNI_ABORT); + _env->ReleaseIntArrayElements(value, base, 0); } return EglBoolToJBool(success); } |