summaryrefslogtreecommitdiff
path: root/libs/binder/IPCThreadState.cpp
diff options
context:
space:
mode:
author Brad Fitzpatrick <bradfitz@android.com> 2010-06-18 13:07:53 -0700
committer Brad Fitzpatrick <bradfitz@android.com> 2010-06-21 12:56:35 -0700
commit27b3a7a75960d026655f3acd1de8a672e80a5776 (patch)
treecc5036a00b976b7757f26212abf49ed11f779cd9 /libs/binder/IPCThreadState.cpp
parentf25c560dcdc0c04e11152fff11f521dae03522cd (diff)
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
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
-rw-r--r--libs/binder/IPCThreadState.cpp13
1 files changed, 12 insertions, 1 deletions
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();