diff options
author | Amith Yamasani <yamasani@google.com> | 2011-05-04 14:49:28 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-02-03 12:01:47 -0800 |
commit | 742a67127366c376fdf188ff99ba30b27d3bf90c (patch) | |
tree | 4a801b0b2e9ee10fb322e3b450e2af9eb6e3002f /libs/binder/IPCThreadState.cpp | |
parent | 8ca8a69d5801ad4b809e7b9dbf53bd728820924b (diff) | |
download | frameworks_base-742a67127366c376fdf188ff99ba30b27d3bf90c.zip frameworks_base-742a67127366c376fdf188ff99ba30b27d3bf90c.tar.gz frameworks_base-742a67127366c376fdf188ff99ba30b27d3bf90c.tar.bz2 |
Multi-user - 1st major checkin
Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)
Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.
Commands added to pm and am to allow creating and switching profiles.
Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
-rw-r--r-- | libs/binder/IPCThreadState.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index 629b899..b578a6c 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -371,6 +371,11 @@ int IPCThreadState::getCallingUid() return mCallingUid; } +int IPCThreadState::getOrigCallingUid() +{ + return mOrigCallingUid; +} + int64_t IPCThreadState::clearCallingIdentity() { int64_t token = ((int64_t)mCallingUid<<32) | mCallingPid; @@ -641,6 +646,7 @@ IPCThreadState::IPCThreadState() { pthread_setspecific(gTLS, this); clearCaller(); + mOrigCallingUid = mCallingUid; mIn.setDataCapacity(256); mOut.setDataCapacity(256); } @@ -987,6 +993,7 @@ status_t IPCThreadState::executeCommand(int32_t cmd) mCallingPid = tr.sender_pid; mCallingUid = tr.sender_euid; + mOrigCallingUid = tr.sender_euid; int curPrio = getpriority(PRIO_PROCESS, mMyThreadId); if (gDisableBackgroundScheduling) { @@ -1045,6 +1052,7 @@ status_t IPCThreadState::executeCommand(int32_t cmd) mCallingPid = origPid; mCallingUid = origUid; + mOrigCallingUid = origUid; IF_LOG_TRANSACTIONS() { TextOutput::Bundle _b(alog); |