电池控制器
public class BatteryController
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.battery.BatteryController |
实用程序类,它可以控制设备的电池充电状态。
概要
公共建设者 | |
---|---|
BatteryController () |
公开方法 | |
---|---|
static IBatteryInfo | getBatteryInfoForDevice (ITestDevice device) 返回设备的 |
static IBatteryInfo.BatteryState | getDeviceChargingState (ITestDevice device) 返回设备的充电状态。 |
公共建设者
电池控制器
public BatteryController ()
公开方法
getBatteryInfoForDevice
public static IBatteryInfo getBatteryInfoForDevice (ITestDevice device)
返回设备的IBatteryInfo
。如果出现问题或不支持该设备,则返回null。
参量 | |
---|---|
device | ITestDevice |
退货 | |
---|---|
IBatteryInfo |
getDeviceChargingState
public static IBatteryInfo.BatteryState getDeviceChargingState (ITestDevice device)
返回设备的充电状态。如果设备不支持,它将返回IBatteryInfo.BatteryState#UNDEFINED
。
参量 | |
---|---|
device | ITestDevice |
退货 | |
---|---|
IBatteryInfo.BatteryState |
投掷 | |
---|---|
DeviceNotAvailableException |