summaryrefslogtreecommitdiffstats
path: root/include/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 /include/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 'include/binder')
-rw-r--r--include/binder/Parcel.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index fd0fc1f..32c9a1d 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -26,11 +26,12 @@
// ---------------------------------------------------------------------------
namespace android {
+class Flattenable;
class IBinder;
+class IPCThreadState;
class ProcessState;
class String8;
class TextOutput;
-class Flattenable;
struct flat_binder_object; // defined in support_p/binder_module.h
@@ -61,10 +62,13 @@ public:
// Parses the RPC header, returning true if the interface name
// in the header matches the expected interface from the caller.
- // If strict_policy_out is non-NULL, the RPC header's StrictMode policy
- // mask is returned.
+ //
+ // Additionally, enforceInterface does part of the work of
+ // propagating the StrictMode policy mask, populating the current
+ // IPCThreadState, which as an optimization may optionally be
+ // passed in.
bool enforceInterface(const String16& interface,
- int32_t* strict_policy_out = NULL) const;
+ IPCThreadState* threadState = NULL) const;
bool checkInterface(IBinder*) const;
void freeData();