summaryrefslogtreecommitdiffstats
path: root/core/jni/android_util_Binder.cpp
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-08-21 00:02:38 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-21 00:02:38 +0000
commitcbed4e523b01633414f1a5ccdae180b26df7799e (patch)
tree60f057feb25b60dc9c9d8b6903464fcc2a414dc0 /core/jni/android_util_Binder.cpp
parent41b07f14135a6ab575d165e89818f7953f3fd7ca (diff)
parentbe39e99187eec88222722e9ec4c91f1744731cf4 (diff)
downloadframeworks_base-cbed4e523b01633414f1a5ccdae180b26df7799e.zip
frameworks_base-cbed4e523b01633414f1a5ccdae180b26df7799e.tar.gz
frameworks_base-cbed4e523b01633414f1a5ccdae180b26df7799e.tar.bz2
am be39e991: am 977c4a5b: Merge "Clean up ExceptionOccurred."
* commit 'be39e99187eec88222722e9ec4c91f1744731cf4': Clean up ExceptionOccurred.
Diffstat (limited to 'core/jni/android_util_Binder.cpp')
-rw-r--r--core/jni/android_util_Binder.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index 6974a0b..7f7cfce 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -272,9 +272,9 @@ protected:
//printf("\n");
jboolean res = env->CallBooleanMethod(mObject, gBinderOffsets.mExecTransact,
code, reinterpret_cast<jlong>(&data), reinterpret_cast<jlong>(reply), flags);
- jthrowable excep = env->ExceptionOccurred();
- if (excep) {
+ if (env->ExceptionCheck()) {
+ jthrowable excep = env->ExceptionOccurred();
report_exception(env, excep,
"*** Uncaught remote exception! "
"(Exceptions are not yet supported across processes.)");
@@ -296,12 +296,12 @@ protected:
set_dalvik_blockguard_policy(env, strict_policy_before);
}
- jthrowable excep2 = env->ExceptionOccurred();
- if (excep2) {
- report_exception(env, excep2,
+ if (env->ExceptionCheck()) {
+ jthrowable excep = env->ExceptionOccurred();
+ report_exception(env, excep,
"*** Uncaught exception in onBinderStrictModePolicyChange");
/* clean up JNI local ref -- we don't return to Java code */
- env->DeleteLocalRef(excep2);
+ env->DeleteLocalRef(excep);
}
// Need to always call through the native implementation of
@@ -403,8 +403,8 @@ public:
env->CallStaticVoidMethod(gBinderProxyOffsets.mClass,
gBinderProxyOffsets.mSendDeathNotice, mObject);
- jthrowable excep = env->ExceptionOccurred();
- if (excep) {
+ if (env->ExceptionCheck()) {
+ jthrowable excep = env->ExceptionOccurred();
report_exception(env, excep,
"*** Uncaught exception returned from death notification!");
}