am ecdf9b19: Merge "jni: liblog reading error API incorrect"

* commit 'ecdf9b199ac9659c37c34c0b23084199acea80bf':
  jni: liblog reading error API incorrect
This commit is contained in:
Mark Salyzyn
2014-04-09 16:11:04 +00:00
committed by Android Git Automerger

View File

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