From e1babd45e1f849522b63c80d4602ec50eac74cff Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Fri, 17 Jul 2009 07:59:17 -0700 Subject: [PATCH] Instead of using -1 for pid and uid in the simulator, and then having to special-case the simulator case all over the framework, just use getuid and getpid, and intercept those in the simulator wrapper. --- libs/binder/IPCThreadState.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index c3889e9855cf1..c371a23b85f48 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -366,13 +366,8 @@ void IPCThreadState::restoreCallingIdentity(int64_t token) void IPCThreadState::clearCaller() { - if (mProcess->supportsProcesses()) { - mCallingPid = getpid(); - mCallingUid = getuid(); - } else { - mCallingPid = -1; - mCallingUid = -1; - } + mCallingPid = getpid(); + mCallingUid = getuid(); } void IPCThreadState::flushCommands()