diff options
| author | 2010-08-31 15:06:24 -0700 | |
|---|---|---|
| committer | 2010-08-31 15:06:24 -0700 | |
| commit | 1423f51ec5fe2c9bf5fa44866443b2c52db165be (patch) | |
| tree | 0ab080b873257293730980e9d2479045a1af2e2e /libs/binder/Parcel.cpp | |
| parent | fdf5b0808ff6f6a3c067dab17a9533cfd66229f1 (diff) | |
| parent | ae087369c56a270c33c1c1af5be7d3c5d7f94e80 (diff) | |
am ae087369: am 63070856: Merge "Don\'t propagate StrictMode over one-way Binder calls." into gingerbread
Merge commit 'ae087369c56a270c33c1c1af5be7d3c5d7f94e80'
* commit 'ae087369c56a270c33c1c1af5be7d3c5d7f94e80':
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; |