commit | d145cab07bed29a2975e5ffd3244aa909960d49d | [log] [tgz] |
---|---|---|
author | Andreas Gampe <agampe@google.com> | Mon Oct 09 23:37:08 2017 +0000 |
committer | android-build-merger <android-build-merger@google.com> | Mon Oct 09 23:37:08 2017 +0000 |
tree | 11d18f8bac3c493b880139174f16b7c7f2b166c7 | |
parent | 1802fc7882e2f37978b8faee0a906d615972d882 [diff] | |
parent | f8fa4b83522dc6966d5f90565d20c72c23ea3dee [diff] |
Merge "EventLog: Check for exception after add()" am: c30a6ac2f1 am: f8fa4b8352 Change-Id: Ia9af9320a5b73f1062f7fa0f8cd829602bce4113
diff --git a/core/jni/android_app_admin_SecurityLog.cpp b/core/jni/android_app_admin_SecurityLog.cpp index 9a4c371..be3eef7 100644 --- a/core/jni/android_app_admin_SecurityLog.cpp +++ b/core/jni/android_app_admin_SecurityLog.cpp
@@ -161,6 +161,9 @@ env->CallBooleanMethod(out, gCollectionAddID, event); env->DeleteLocalRef(event); env->DeleteLocalRef(array); + if (env->ExceptionCheck() == JNI_TRUE) { + break; + } } android_logger_list_close(logger_list);
diff --git a/core/jni/android_util_EventLog.cpp b/core/jni/android_util_EventLog.cpp index 9fd7c40..76ce3077 100644 --- a/core/jni/android_util_EventLog.cpp +++ b/core/jni/android_util_EventLog.cpp
@@ -215,6 +215,9 @@ env->CallBooleanMethod(out, gCollectionAddID, event); env->DeleteLocalRef(event); env->DeleteLocalRef(array); + if (env->ExceptionCheck() == JNI_TRUE) { + break; + } } }