IPowerManager.powerHint()
method is just a wrapper function to PowerHAL's powerHint()
through nativePowerHint()
.
static void nativeSendPowerHint(JNIEnv *env, jclass clazz, jint hintId, jint data)
{
int data_param = data;
if (gPowerModule && gPowerModule->powerHint) {
if(data)
gPowerModule->powerHint(gPowerModule, (power_hint_t)hintId, &data_param);
else {
gPowerModule->powerHint(gPowerModule, (power_hint_t)hintId, NULL);
}
}
}
If you want the HAL to do something, you should implement your own actions associated with hintId like POWER_HINT_INTERACTION, POWER_HINT_LOW_POWER, and so on.
I think that calling powerHint() directly is a part of SDK implementation area. Refer to these talks.