summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen2013-10-16 12:57:51 -0500
committerMarco Nelissen2013-10-16 14:57:32 -0500
commit5c0106e134366312206702f1b072347e20c90374 (patch)
tree8874b4dcd5218cdd5f731d72f55892db2f9b6ec9 /services/powermanager/IPowerManager.cpp
parentc60f1ad0fa0dd31a774517d1c0081465e4169f91 (diff)
downloadframeworks-native-5c0106e134366312206702f1b072347e20c90374.tar.gz
frameworks-native-5c0106e134366312206702f1b072347e20c90374.tar.xz
frameworks-native-5c0106e134366312206702f1b072347e20c90374.zip
Native counterpart of new power manager method
Change-Id: I54c0ed50a57ac870da91db8589a73a2c792dbd8d
Diffstat (limited to 'services/powermanager/IPowerManager.cpp')
-rw-r--r--services/powermanager/IPowerManager.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/powermanager/IPowerManager.cpp b/services/powermanager/IPowerManager.cpp
index 9f60e7524..5ecd299a5 100644
--- a/services/powermanager/IPowerManager.cpp
+++ b/services/powermanager/IPowerManager.cpp
@@ -32,6 +32,7 @@ enum {
32 ACQUIRE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION, 32 ACQUIRE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION,
33 ACQUIRE_WAKE_LOCK_UID = IBinder::FIRST_CALL_TRANSACTION + 1, 33 ACQUIRE_WAKE_LOCK_UID = IBinder::FIRST_CALL_TRANSACTION + 1,
34 RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 2, 34 RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 2,
35 UPDATE_WAKE_LOCK_UIDS = IBinder::FIRST_CALL_TRANSACTION + 3,
35}; 36};
36 37
37class BpPowerManager : public BpInterface<IPowerManager> 38class BpPowerManager : public BpInterface<IPowerManager>
@@ -78,6 +79,16 @@ public:
78 data.writeInt32(flags); 79 data.writeInt32(flags);
79 return remote()->transact(RELEASE_WAKE_LOCK, data, &reply); 80 return remote()->transact(RELEASE_WAKE_LOCK, data, &reply);
80 } 81 }
82
83 virtual status_t updateWakeLockUids(const sp<IBinder>& lock, int len, const int *uids) {
84 Parcel data, reply;
85 data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor());
86 data.writeStrongBinder(lock);
87 data.writeInt32Array(len, uids);
88 // We don't really care too much if this succeeds (there's nothing we can do if it doesn't)
89 // but it should return ASAP
90 return remote()->transact(UPDATE_WAKE_LOCK_UIDS, data, &reply, IBinder::FLAG_ONEWAY);
91 }
81}; 92};
82 93
83IMPLEMENT_META_INTERFACE(PowerManager, "android.os.IPowerManager"); 94IMPLEMENT_META_INTERFACE(PowerManager, "android.os.IPowerManager");