summaryrefslogtreecommitdiff
path: root/libs/binder/IPCThreadState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
-rw-r--r--libs/binder/IPCThreadState.cpp31
1 files changed, 27 insertions, 4 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 001650318611..a3e117f453d2 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -367,6 +367,26 @@ int64_t IPCThreadState::clearCallingIdentity()
return token;
}
+void IPCThreadState::setStrictModePolicy(int32_t policy)
+{
+ mStrictModePolicy = policy;
+}
+
+int32_t IPCThreadState::getStrictModePolicy() const
+{
+ return mStrictModePolicy;
+}
+
+void IPCThreadState::setLastTransactionBinderFlags(int32_t flags)
+{
+ mLastTransactionBinderFlags = flags;
+}
+
+int32_t IPCThreadState::getLastTransactionBinderFlags() const
+{
+ return mLastTransactionBinderFlags;
+}
+
void IPCThreadState::restoreCallingIdentity(int64_t token)
{
mCallingUid = (int)(token>>32);
@@ -588,7 +608,10 @@ status_t IPCThreadState::clearDeathNotification(int32_t handle, BpBinder* proxy)
}
IPCThreadState::IPCThreadState()
- : mProcess(ProcessState::self()), mMyThreadId(androidGetTid())
+ : mProcess(ProcessState::self()),
+ mMyThreadId(androidGetTid()),
+ mStrictModePolicy(0),
+ mLastTransactionBinderFlags(0)
{
pthread_setspecific(gTLS, this);
clearCaller();
@@ -972,11 +995,11 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
}
if (tr.target.ptr) {
sp<BBinder> b((BBinder*)tr.cookie);
- const status_t error = b->transact(tr.code, buffer, &reply, 0);
+ const status_t error = b->transact(tr.code, buffer, &reply, tr.flags);
if (error < NO_ERROR) reply.setError(error);
-
+
} else {
- const status_t error = the_context_object->transact(tr.code, buffer, &reply, 0);
+ const status_t error = the_context_object->transact(tr.code, buffer, &reply, tr.flags);
if (error < NO_ERROR) reply.setError(error);
}