Version: stable
FUNCTIONS | |
---|---|
adpf.hint.initialize() | |
adpf.hint.update_target_fps() | |
adpf.thermal.initialize() | |
adpf.thermal.get_headroom() | |
adpf.thermal.get_status() |
CONSTANTS | |
---|---|
THERMAL_STATUS_CRITICAL | |
THERMAL_STATUS_EMERGENCY | |
THERMAL_STATUS_LIGHT | |
THERMAL_STATUS_MODERATE | |
THERMAL_STATUS_NONE | |
THERMAL_STATUS_SEVERE | |
THERMAL_STATUS_SHUTDOWN |
adpf.hint.initialize(target_fps_nanos)
Initialise performance hints
PARAMETERS
target_fps_nanos |
number |
RETURNS
boolean |
Return true if the PerformanceHintManager API is available on the device |
adpf.hint.update_target_fps(target_fps_nanos)
Update the target fps
PARAMETERS
target_fps_nanos |
number |
adpf.thermal.initialize(available)
Initialise thermal
PARAMETERS
available |
boolean |
Return true if the Thermal API is available on the device |
adpf.thermal.get_headroom(forecast_seconds)
Provides an estimate of how much thermal headroom the device currently has before hitting severe throttling.
PARAMETERS
forecast_seconds |
number |
how many seconds in the future to forecast |
RETURNS
number |
a value greater than or equal to 0.0 where 1.0 indicates the SEVERE throttling threshold |
adpf.thermal.get_status()
Get the current thermal status of the device
PARAMETERS
None
RETURNS
number |
The current thermal status of the device. One of THERMAL_STATUS_XYZ. |
Platform has done everything to reduce power.
Key components in platform are shutting down due to thermal condition.
Light throttling where UX is not impacted.
Moderate throttling where UX is not largely impacted.
Not under throttling.
Severe throttling where UX is largely impacted.
Need shutdown immediately