@Deprecated public class DevicePowerStatusInfo extends Object
The power status includes the charging status, battery level, and system power status.
SystemCapability.PowerMgr#POWER_MANAGER| 限定符和类型 | 方法 | 说明 |
|---|---|---|
BatteryInfo.BatteryChargeState |
getBatteryChargingStatus() |
已过时。
This change is effective since API version 7
|
BatteryInfo.BatteryLevel |
getBatteryLevel() |
已过时。
This change is effective since API version 7
|
static DevicePowerStatusInfo |
getDevicePowerStatusInfo() |
已过时。
This change is effective since API version 7
|
PowerManager.PowerState |
getPowerState() |
已过时。
This change is effective since API version 7
|
@Deprecated public PowerManager.PowerState getPowerState()
The status can be NONE, AWAKE, INACTIVE, or SLEEP.
PowerState.@Deprecated public BatteryInfo.BatteryLevel getBatteryLevel()
The battery level can be HIGH, NORMAL, LOW, or EMERGENCY.
BatteryLevel.@Deprecated public BatteryInfo.BatteryChargeState getBatteryChargingStatus()
The charging status can be NONE, ENABLE, DISABLE, or FULL.
PowerState.@Deprecated public static DevicePowerStatusInfo getDevicePowerStatusInfo()
DevicePowerStatusInfo object.
The object can be used to call a method (such as getBatteryLevel())
to obtain detailed information of the device.
DevicePowerStatusInfo object.