diff options
author | Marco Nelissen <marcone@google.com> | 2013-10-04 11:09:01 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-04 11:09:01 -0700 |
commit | 0e6e912b5440e468e42ac1d683bf8bdb5ffd48f3 (patch) | |
tree | 2d2d6e1ad0091cfd17505ff728c0713a103a096e /services | |
parent | 86f76208f0ada2148fda43d522f7933a0c7bf476 (diff) | |
parent | e71575bed44fbbd61b6a369d42e200c0141953be (diff) | |
download | frameworks_native-0e6e912b5440e468e42ac1d683bf8bdb5ffd48f3.zip frameworks_native-0e6e912b5440e468e42ac1d683bf8bdb5ffd48f3.tar.gz frameworks_native-0e6e912b5440e468e42ac1d683bf8bdb5ffd48f3.tar.bz2 |
am e71575be: am 48d3741b: Merge "Allow blaming a single uid for work done" into klp-dev
* commit 'e71575bed44fbbd61b6a369d42e200c0141953be':
Allow blaming a single uid for work done
Diffstat (limited to 'services')
-rw-r--r-- | services/powermanager/IPowerManager.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/services/powermanager/IPowerManager.cpp b/services/powermanager/IPowerManager.cpp index 3f5b81e..9f60e75 100644 --- a/services/powermanager/IPowerManager.cpp +++ b/services/powermanager/IPowerManager.cpp @@ -30,7 +30,8 @@ namespace android { // must be kept in sync with IPowerManager.aidl enum { ACQUIRE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION, - RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 1, + ACQUIRE_WAKE_LOCK_UID = IBinder::FIRST_CALL_TRANSACTION + 1, + RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 2, }; class BpPowerManager : public BpInterface<IPowerManager> @@ -55,6 +56,20 @@ public: return remote()->transact(ACQUIRE_WAKE_LOCK, data, &reply); } + virtual status_t acquireWakeLockWithUid(int flags, const sp<IBinder>& lock, const String16& tag, + const String16& packageName, int uid) + { + Parcel data, reply; + data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor()); + + data.writeStrongBinder(lock); + data.writeInt32(flags); + data.writeString16(tag); + data.writeString16(packageName); + data.writeInt32(uid); // uid to blame for the work + return remote()->transact(ACQUIRE_WAKE_LOCK_UID, data, &reply); + } + virtual status_t releaseWakeLock(const sp<IBinder>& lock, int flags) { Parcel data, reply; |