Merge "RegisterNatives() returns 0 on success."

main
Ken Wakasa 2014-03-27 02:20:58 +00:00 committed by Android (Google) Code Review
commit a8cd7647fe
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ int registerNativeMethods(JNIEnv *env, const char *const className, const JNINat
AKLOGE("Native registration unable to find class '%s'", className); AKLOGE("Native registration unable to find class '%s'", className);
return JNI_FALSE; return JNI_FALSE;
} }
if (env->RegisterNatives(clazz, methods, numMethods) < 0) { if (env->RegisterNatives(clazz, methods, numMethods) != 0) {
AKLOGE("RegisterNatives failed for '%s'", className); AKLOGE("RegisterNatives failed for '%s'", className);
env->DeleteLocalRef(clazz); env->DeleteLocalRef(clazz);
return JNI_FALSE; return JNI_FALSE;