summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-07-27 09:49:11 -0700
committerBrad Fitzpatrick <bradfitz@android.com>2010-07-27 12:28:57 -0700
commit70081a1511955f53bd0ed7f2aec9a1bf09f0f379 (patch)
treec76d2f7b7bc84f7249e94446551e7939bc277df4 /libs/binder
parent23abef82b6986405dbd3e6522f8713d29d51d1e2 (diff)
downloadframeworks_native-70081a1511955f53bd0ed7f2aec9a1bf09f0f379.zip
frameworks_native-70081a1511955f53bd0ed7f2aec9a1bf09f0f379.tar.gz
frameworks_native-70081a1511955f53bd0ed7f2aec9a1bf09f0f379.tar.bz2
Replace several IPCThreadState::get() lookups with one.
Also, make StrictMode's ThreadLocal final. Change-Id: I08d400ed254fa67bb7a3dae1227f205a54c00df0
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/Parcel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 60babad..18f75df 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -458,13 +458,13 @@ bool Parcel::checkInterface(IBinder* binder) const
}
bool Parcel::enforceInterface(const String16& interface,
- int32_t* strict_policy_out) const
+ IPCThreadState* threadState) const
{
- int32_t strict_policy = readInt32();
- IPCThreadState::self()->setStrictModePolicy(strict_policy);
- if (strict_policy_out != NULL) {
- *strict_policy_out = strict_policy;
+ int32_t strictPolicy = readInt32();
+ if (threadState == NULL) {
+ threadState = IPCThreadState::self();
}
+ threadState->setStrictModePolicy(strictPolicy);
const String16 str(readString16());
if (str == interface) {
return true;