Namespace: adpf
Language: Lua
Type: Extension
Functions and constants for interacting with the Android Device Performance Framework
Type: FUNCTION Initialise performance hints
Parameters
target_fps_nanos (number)Returns
boolean - Return true if the PerformanceHintManager API is available on the deviceType: FUNCTION Update the target fps
Parameters
target_fps_nanos (number)### Type: TABLE Functions and constants for interacting with the PerformanceHintManager
Type: FUNCTION Initialise thermal
Parameters
available (boolean) - Return true if the Thermal API is available on the deviceType: FUNCTION 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 forecastReturns
number - a value greater than or equal to 0.0 where 1.0 indicates the SEVERE throttling thresholdType: FUNCTION Get the current thermal status of the device
Returns
number - The current thermal status of the device. One of THERMAL_STATUS_XYZ.Type: VARIABLE Platform has done everything to reduce power.
Type: VARIABLE Key components in platform are shutting down due to thermal condition.
Type: VARIABLE Light throttling where UX is not impacted.
Type: VARIABLE Moderate throttling where UX is not largely impacted.
Type: VARIABLE Not under throttling.
Type: VARIABLE Severe throttling where UX is largely impacted.
Type: VARIABLE Need shutdown immediately
### Type: TABLE Functions and constants for interacting with the PowerManager ThermalAPI