adpf

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

Functions

adpf.hint.initialize()

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()

adpf.hint.update_target_fps(target_fps_nanos)

Update the target fps

PARAMETERS

target_fps_nanos number

adpf.thermal.initialize()

adpf.thermal.initialize(available)

Initialise thermal

PARAMETERS

available boolean Return true if the Thermal API is available on the device

adpf.thermal.get_headroom()

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()

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.

Constants

THERMAL_STATUS_CRITICAL

Platform has done everything to reduce power.


THERMAL_STATUS_EMERGENCY

Key components in platform are shutting down due to thermal condition.


THERMAL_STATUS_LIGHT

Light throttling where UX is not impacted.


THERMAL_STATUS_MODERATE

Moderate throttling where UX is not largely impacted.


THERMAL_STATUS_NONE

Not under throttling.


THERMAL_STATUS_SEVERE

Severe throttling where UX is largely impacted.


THERMAL_STATUS_SHUTDOWN

Need shutdown immediately