Merge "jni: liblog reading error API incorrect"

This commit is contained in:
Mark Salyzyn
2014-04-09 16:07:47 +00:00
committed by Gerrit Code Review

View File

@@ -177,13 +177,13 @@ static void android_util_EventLog_readEvents(JNIEnv* env, jobject clazz UNUSED,
break; break;
} }
if (ret < 0) { if (ret < 0) {
if (errno == EINTR) { if (ret == -EINTR) {
continue; continue;
} }
if (errno == EINVAL) { if (ret == -EINVAL) {
jniThrowException(env, "java/io/IOException", "Event too short"); jniThrowException(env, "java/io/IOException", "Event too short");
} else if (errno != EAGAIN) { } else if (ret != -EAGAIN) {
jniThrowIOException(env, errno); // Will throw on return jniThrowIOException(env, -ret); // Will throw on return
} }
break; break;
} }