Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

BatteryController

public class BatteryController
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.battery.BatteryController


Utility class that allows to control the battery charging state of a device.

Summary

Public constructors

BatteryController()

Public methods

static IBatteryInfo getBatteryInfoForDevice(ITestDevice device)

Returns the IBatteryInfo of a device.

static IBatteryInfo.BatteryState getDeviceChargingState(ITestDevice device)

Returns the charging state of the device.

Public constructors

BatteryController

public BatteryController ()

Public methods

getBatteryInfoForDevice

public static IBatteryInfo getBatteryInfoForDevice (ITestDevice device)

Returns the IBatteryInfo of a device. Returns null if something goes wrong or if the device is not supported.

Parameters
device ITestDevice

Returns
IBatteryInfo

getDeviceChargingState

public static IBatteryInfo.BatteryState getDeviceChargingState (ITestDevice device)

Returns the charging state of the device. If device is not support it will return IBatteryInfo.BatteryState#UNDEFINED.

Parameters
device ITestDevice

Returns
IBatteryInfo.BatteryState

Throws
DeviceNotAvailableException