diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-10-01 17:10:04 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-01 17:10:04 +0000 |
commit | 67787a82a01460f0d68c154fdf3045bdc1ee572f (patch) | |
tree | 97a4ae5cfb07106b96bf86149c0d0c4e748dacbf /core/jni | |
parent | 047ab3b2e583dcaacb6b67fd0569bfa3ecb477c2 (diff) | |
parent | cb5fc84b554aa82a98867f997caffea3d7067033 (diff) | |
download | frameworks_base-67787a82a01460f0d68c154fdf3045bdc1ee572f.zip frameworks_base-67787a82a01460f0d68c154fdf3045bdc1ee572f.tar.gz frameworks_base-67787a82a01460f0d68c154fdf3045bdc1ee572f.tar.bz2 |
am cb5fc84b: am 16b6a8f7: am 962e3e83: am 9cf01b63: Merge "More work on issue #17656716: Unhandled exception in Window Manager" into lmp-dev
* commit 'cb5fc84b554aa82a98867f997caffea3d7067033':
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); } |