diff options
author | Marco Nelissen <marcone@google.com> | 2009-07-17 07:59:17 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2009-07-17 10:48:09 -0700 |
commit | d43b194b69fca6c81023effc921fcc7576bad496 (patch) | |
tree | 2620a6fb34aa32a0f802838e7c9cfae5e72821ed /libs/binder/IPCThreadState.cpp | |
parent | 007a4a26e48eb16aa10b83d58a7ced1766b62de9 (diff) | |
download | frameworks_native-d43b194b69fca6c81023effc921fcc7576bad496.zip frameworks_native-d43b194b69fca6c81023effc921fcc7576bad496.tar.gz frameworks_native-d43b194b69fca6c81023effc921fcc7576bad496.tar.bz2 |
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.
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
-rw-r--r-- | libs/binder/IPCThreadState.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index c3889e9..c371a23 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() |