Trigger power hints for activity launch

BUG: 28220567
Change-Id: Id2a0397efd1dd02ee50d5626edaed9e60ea6de8a
This commit is contained in:
Wei Wang
2016-05-18 11:32:52 -07:00
parent ce8e88aaab
commit 98f03f98ac
3 changed files with 31 additions and 2 deletions

View File

@@ -57,14 +57,19 @@ public abstract class PowerManagerInternal {
/**
* Power hint:
* Interaction: The user is interacting with the device. The corresponding data field must be
* the expected duration of the fling, or 0 if unknown.
* the expected duration of the interaction, or 0 if unknown.
*
* Sustained Performance Mode: Enable/Disables Sustained Performance Mode.
* Sustained Performance Mode: The corresponding data field must be Enable/Disable
* Sustained Performance Mode.
*
* Launch: This is specific for activity launching. The corresponding data field must be
* the expected duration of the required boost, or 0 if unknown.
*
* These must be kept in sync with the values in hardware/libhardware/include/hardware/power.h
*/
public static final int POWER_HINT_INTERACTION = 2;
public static final int POWER_HINT_SUSTAINED_PERFORMANCE_MODE = 6;
public static final int POWER_HINT_LAUNCH = 8;
public static String wakefulnessToString(int wakefulness) {
switch (wakefulness) {