diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-09-30 20:23:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-30 20:23:01 +0000 |
commit | ed1589d81f1d7c8cf2a97f2a5afe3d856fbb1b74 (patch) | |
tree | 089aebed407f8e4245653a8b5290648434a315d6 /core/jni | |
parent | a05e22ab3a2150b7338aa0ff3a0949008e3faaf5 (diff) | |
parent | 9cf01b63cb0023aec0e05b1ce050ff572532b876 (diff) | |
download | frameworks_base-ed1589d81f1d7c8cf2a97f2a5afe3d856fbb1b74.zip frameworks_base-ed1589d81f1d7c8cf2a97f2a5afe3d856fbb1b74.tar.gz frameworks_base-ed1589d81f1d7c8cf2a97f2a5afe3d856fbb1b74.tar.bz2 |
am 9cf01b63: Merge "More work on issue #17656716: Unhandled exception in Window Manager" into lmp-dev
* commit '9cf01b63cb0023aec0e05b1ce050ff572532b876':
More work on issue #17656716: Unhandled exception in Window Manager
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android_util_Binder.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index 5d7dbe8..a78c386 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -264,8 +264,7 @@ protected: ALOGV("onTransact() on %p calling object %p in env %p vm %p\n", this, mObject, env, mVM); IPCThreadState* thread_state = IPCThreadState::self(); - const int strict_policy_before = thread_state->getStrictModePolicy(); - thread_state->setLastTransactionBinderFlags(flags); + const int32_t strict_policy_before = thread_state->getStrictModePolicy(); //printf("Transact from %p to Java code sending: ", this); //data.print(); @@ -284,15 +283,11 @@ protected: env->DeleteLocalRef(excep); } - // Restore the Java binder thread's state if it changed while - // processing a call (as it would if the Parcel's header had a - // new policy mask and Parcel.enforceInterface() changed - // it...) - const int strict_policy_after = thread_state->getStrictModePolicy(); - if (strict_policy_after != strict_policy_before) { - // Our thread-local... - thread_state->setStrictModePolicy(strict_policy_before); - // And the Java-level thread-local... + // Check if the strict mode state changed while processing the + // call. The Binder state will be restored by the underlying + // Binder system in IPCThreadState, however we need to take care + // of the parallel Java state as well. + if (thread_state->getStrictModePolicy() != strict_policy_before) { set_dalvik_blockguard_policy(env, strict_policy_before); } |