#include <utils/Errors.h>
#include <binder/IInterface.h>
+#include <hardware/power.h>
namespace android {
const String16& packageName, int uid) = 0;
virtual status_t releaseWakeLock(const sp<IBinder>& lock, int flags) = 0;
virtual status_t updateWakeLockUids(const sp<IBinder>& lock, int len, const int *uids) = 0;
+ virtual status_t powerHint(int hintId, int data) = 0;
};
// ----------------------------------------------------------------------------
ACQUIRE_WAKE_LOCK_UID = IBinder::FIRST_CALL_TRANSACTION + 1,
RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 2,
UPDATE_WAKE_LOCK_UIDS = IBinder::FIRST_CALL_TRANSACTION + 3,
+ POWER_HINT = IBinder::FIRST_CALL_TRANSACTION + 4,
};
class BpPowerManager : public BpInterface<IPowerManager>
// but it should return ASAP
return remote()->transact(UPDATE_WAKE_LOCK_UIDS, data, &reply, IBinder::FLAG_ONEWAY);
}
+
+ virtual status_t powerHint(int hintId, int param)
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor());
+ data.writeInt32(hintId);
+ data.writeInt32(param);
+ return remote()->transact(POWER_HINT, data, &reply, IBinder::FLAG_ONEWAY);
+ }
};
IMPLEMENT_META_INTERFACE(PowerManager, "android.os.IPowerManager");