public class ThermalListener extends Object
The interfaces can be used to listen thermal status of the devices.
SystemCapability.PowerMgr#THERMAL_MANAGER| 构造器 | 说明 |
|---|---|
ThermalListener() |
A constructor used to create a
ThermalListener instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
connectThermalService(ThermalConnection connection,
String packageName) |
Connects to the thermal service to obtain the thermal severity level of this device through
ThermalConnection. |
public ThermalListener()
ThermalListener instance.
You will obtain an initialized ThermalListener instance.
public void connectThermalService(ThermalConnection connection, String packageName)
ThermalConnection.connection - Indicates the ThermalConnection class, which provides two callbacks to listen for
the thermal severity level of this device and whether the thermal service is running properly.packageName - Indicates the package name of the application that calls this method.