diff options
| author | Brad Fitzpatrick <bradfitz@android.com> | 2010-08-30 16:01:16 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@android.com> | 2010-08-31 13:16:49 -0700 |
| commit | 0234376503ce421c4b871d5d811c541f5094301a (patch) | |
| tree | 6f4686cb9bdc0d19f8c4b541c57ad5b10496588a /core | |
| parent | 6aacad66eba2b51251f7e2dfb8c005b5242326ca (diff) | |
| download | frameworks_base-0234376503ce421c4b871d5d811c541f5094301a.zip frameworks_base-0234376503ce421c4b871d5d811c541f5094301a.tar.gz frameworks_base-0234376503ce421c4b871d5d811c541f5094301a.tar.bz2 | |
Don't propagate StrictMode over one-way Binder calls.
This was causing stack stitching problems where a one-way call with
violations followed by a two-way call without violations was getting
the previous one-way call's violation stack stitched on to the second
caller's stack.
The solution is a little more indirect than I would've liked
(preserving the binder's onTransact flags until enforceInterface) but
was seemingly necessary to work without changing the AIDL compiler.
It should also be sufficiently cheap, since no new calls to
thread-local IPCThreadState lookups were required. The additional
work is just same-thread getter/setters on the existing
IPCThreadState.
Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
Diffstat (limited to 'core')
| -rw-r--r-- | core/jni/android_util_Binder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index 5c4e4fd..7a53874 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -270,6 +270,7 @@ protected: IPCThreadState* thread_state = IPCThreadState::self(); const int strict_policy_before = thread_state->getStrictModePolicy(); + thread_state->setLastTransactionBinderFlags(flags); //printf("Transact from %p to Java code sending: ", this); //data.print(); |
