Package: android.hardware.thermal@1.0

types

Properties

TemperatureType

enum TemperatureType: int32_t

Device temperature types

Details
Members
UNKNOWN = -1
CPU = 0
GPU = 1
BATTERY = 2
SKIN = 3
Annotations
export

CoolingType

enum CoolingType: uint32_t
Details
Members
FAN_RPM = 0
Fan cooling device speed in RPM.

ThermalStatusCode

enum ThermalStatusCode: uint32_t
Details
Members
SUCCESS = 0
No errors.
FAILURE = 1
Unknown failure occured.

Temperature

struct Temperature {TemperatureType type; string name; float currentValue; float throttlingThreshold; float shutdownThreshold; float vrThrottlingThreshold}
Details
Members
type
This temperature's type.
name
Name of this temperature.All temperatures of the same "type" must have a different "name", e.g ., cpu0, battery.
currentValue
Current temperature in Celsius.If not available set by HAL to NAN.Current temperature can be in any units if type=UNKNOWN.
throttlingThreshold
Throttling temperature constant for this temperature.If not available, set by HAL to NAN.
shutdownThreshold
Shutdown temperature constant for this temperature.If not available, set by HAL to NAN.
vrThrottlingThreshold
Threshold temperature above which the VR mode clockrate minimums cannot be maintained for this device.If not available, set by HAL to NAN.

CoolingDevice

struct CoolingDevice {CoolingType type; string name; float currentValue}
Details
Members
type
This cooling device type.
name
Name of this cooling device.All cooling devices of the same "type" must have a different "name".
currentValue
Current cooling device value.Units depend on cooling device "type".

CpuUsage

struct CpuUsage {string name; uint64_t active; uint64_t total; bool isOnline}
Details
Members
name
Name of this CPU.All CPUs must have a different "name".
active
Active time since the last boot in ms.
total
Total time since the last boot in ms.
isOnline
Is set to true when a core is online.If the core is offline, all other members except |name| should be ignored.

ThermalStatus

struct ThermalStatus {ThermalStatusCode code; string debugMessage}

Generic structure to return the status of any thermal operation.

Details
Members
code
debugMessage
A specific error message to provide more information.This can be used for debugging purposes only.