summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuchi Kandoi2014-04-02 14:54:45 -0500
committerRuchi Kandoi2014-04-02 16:24:01 -0500
commitca13fa7dd4662921bc399e021e2ad92ddf5f5366 (patch)
tree7b27283e4ed03c842c17e7fa9d5722fcaaae15f4 /services/powermanager/IPowerManager.cpp
parente6ef753ef6f134b6ff4fa1b30f0c3340a90f61af (diff)
downloadframeworks-native-ca13fa7dd4662921bc399e021e2ad92ddf5f5366.tar.gz
frameworks-native-ca13fa7dd4662921bc399e021e2ad92ddf5f5366.tar.xz
frameworks-native-ca13fa7dd4662921bc399e021e2ad92ddf5f5366.zip
PowerManager: add powerHint binder method
Change-Id: Ide1d50bb1580698b25296fbfc1cc63c3b21a00bc
Diffstat (limited to 'services/powermanager/IPowerManager.cpp')
-rw-r--r--services/powermanager/IPowerManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/powermanager/IPowerManager.cpp b/services/powermanager/IPowerManager.cpp
index 5ecd299a5..0c43e909e 100644
--- a/services/powermanager/IPowerManager.cpp
+++ b/services/powermanager/IPowerManager.cpp
@@ -33,6 +33,7 @@ enum {
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 UPDATE_WAKE_LOCK_UIDS = IBinder::FIRST_CALL_TRANSACTION + 3,
36 POWER_HINT = IBinder::FIRST_CALL_TRANSACTION + 4,
36}; 37};
37 38
38class BpPowerManager : public BpInterface<IPowerManager> 39class BpPowerManager : public BpInterface<IPowerManager>
@@ -89,6 +90,15 @@ public:
89 // but it should return ASAP 90 // but it should return ASAP
90 return remote()->transact(UPDATE_WAKE_LOCK_UIDS, data, &reply, IBinder::FLAG_ONEWAY); 91 return remote()->transact(UPDATE_WAKE_LOCK_UIDS, data, &reply, IBinder::FLAG_ONEWAY);
91 } 92 }
93
94 virtual status_t powerHint(int hintId, int param)
95 {
96 Parcel data, reply;
97 data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor());
98 data.writeInt32(hintId);
99 data.writeInt32(param);
100 return remote()->transact(POWER_HINT, data, &reply, IBinder::FLAG_ONEWAY);
101 }
92}; 102};
93 103
94IMPLEMENT_META_INTERFACE(PowerManager, "android.os.IPowerManager"); 104IMPLEMENT_META_INTERFACE(PowerManager, "android.os.IPowerManager");