From 27b3a7a75960d026655f3acd1de8a672e80a5776 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 18 Jun 2010 13:07:53 -0700 Subject: Start of work on passing around StrictMode policy over Binder calls. This is (intendend to be) a no-op change. At this stage, Binder RPCs just have an additional uint32 passed around in the header, right before the interface name. But nothing is actually done with them yet. That value should right now always be 0. This now boots and seems to work. Change-Id: I135b7c84f07575e6b9717fef2424d301a450df7b --- libs/binder/IPCThreadState.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libs/binder/IPCThreadState.cpp') diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index 001650318611..28706badad49 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -367,6 +367,16 @@ int64_t IPCThreadState::clearCallingIdentity() return token; } +void IPCThreadState::setStrictModePolicy(int32_t policy) +{ + mStrictModePolicy = policy; +} + + +int32_t IPCThreadState::getStrictModePolicy() const { + return mStrictModePolicy; +} + void IPCThreadState::restoreCallingIdentity(int64_t token) { mCallingUid = (int)(token>>32); @@ -588,7 +598,8 @@ status_t IPCThreadState::clearDeathNotification(int32_t handle, BpBinder* proxy) } IPCThreadState::IPCThreadState() - : mProcess(ProcessState::self()), mMyThreadId(androidGetTid()) + : mProcess(ProcessState::self()), mMyThreadId(androidGetTid()), + mStrictModePolicy(0) { pthread_setspecific(gTLS, this); clearCaller(); -- cgit v1.2.3-59-g8ed1b