diff options
| author | 2010-08-31 15:02:21 -0700 | |
|---|---|---|
| committer | 2010-08-31 15:02:21 -0700 | |
| commit | ae087369c56a270c33c1c1af5be7d3c5d7f94e80 (patch) | |
| tree | 98b7a269a568547da1ff97f15f08a722225e8f8e /libs/binder/Parcel.cpp | |
| parent | 6b52911cc7ba548fd3a240ca61eba510a8581e6f (diff) | |
| parent | 63070856d034a2819a26560bc7f2881e501c78b7 (diff) | |
am 63070856: Merge "Don\'t propagate StrictMode over one-way Binder calls." into gingerbread
Merge commit '63070856d034a2819a26560bc7f2881e501c78b7' into gingerbread-plus-aosp
* commit '63070856d034a2819a26560bc7f2881e501c78b7':
Don't propagate StrictMode over one-way Binder calls.
Diffstat (limited to 'libs/binder/Parcel.cpp')
| -rw-r--r-- | libs/binder/Parcel.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 18f75df2ea2f..f329ac4642c9 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -464,7 +464,16 @@ bool Parcel::enforceInterface(const String16& interface, if (threadState == NULL) { threadState = IPCThreadState::self(); } - threadState->setStrictModePolicy(strictPolicy); + if ((threadState->getLastTransactionBinderFlags() & + IBinder::FLAG_ONEWAY) != 0) { + // For one-way calls, the callee is running entirely + // disconnected from the caller, so disable StrictMode entirely. + // Not only does disk/network usage not impact the caller, but + // there's no way to commuicate back any violations anyway. + threadState->setStrictModePolicy(0); + } else { + threadState->setStrictModePolicy(strictPolicy); + } const String16 str(readString16()); if (str == interface) { return true; |