Bộ điều khiển pin
public class BatteryController
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.battery.BatteryController |
Lớp tiện ích cho phép kiểm soát trạng thái sạc pin của thiết bị.
Bản tóm tắt
nhà thầu công cộng | |
---|---|
BatteryController () |
Phương thức công khai | |
---|---|
static IBatteryInfo | getBatteryInfoForDevice ( ITestDevice device) Trả về |
static IBatteryInfo.BatteryState | getDeviceChargingState ( ITestDevice device) Trả về trạng thái sạc của thiết bị. |
nhà thầu công cộng
Bộ điều khiển pin
public BatteryController ()
Phương thức công khai
getBatteryInfoForDevice
public static IBatteryInfo getBatteryInfoForDevice (ITestDevice device)
Trả về IBatteryInfo
của thiết bị. Trả về null nếu xảy ra sự cố hoặc nếu thiết bị không được hỗ trợ.
Thông số | |
---|---|
device | ITestDevice |
trả lại | |
---|---|
IBatteryInfo |
getDeviceChargingState
public static IBatteryInfo.BatteryState getDeviceChargingState (ITestDevice device)
Trả về trạng thái sạc của thiết bị. Nếu thiết bị không hỗ trợ, nó sẽ trả về IBatteryInfo.BatteryState.UNDEFINED
.
Thông số | |
---|---|
device | ITestDevice |
trả lại | |
---|---|
IBatteryInfo.BatteryState |
ném | |
---|---|
DeviceNotAvailableException |