DeviceBatteryLevelChecker

public class DeviceBatteryLevelChecker
extends Object implements IDeviceTest, IRemoteTest

java.lang.Object
   ↳ com.android.tradefed.testtype.DeviceBatteryLevelChecker


An ITargetPreparer that checks for a minimum battery charge, and waits for the battery to reach a second charging threshold if the minimum charge isn't present.

Summary

Fields

ITestDevice mTestDevice

Public constructors

DeviceBatteryLevelChecker()

Public methods

ITestDevice getDevice()

Get the device under test.

void run(ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

void setDevice(ITestDevice device)

Inject the device under test.

Protected methods

void setResumeLevel(int level)

Fields

mTestDevice

ITestDevice mTestDevice

Public constructors

DeviceBatteryLevelChecker

DeviceBatteryLevelChecker ()

Public methods

getDevice

ITestDevice getDevice ()

Get the device under test.

Returns
ITestDevice the ITestDevice

run

void run (ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
listener ITestInvocationListener: the ITestInvocationListener of test results

Throws
DeviceNotAvailableException

setDevice

void setDevice (ITestDevice device)

Inject the device under test.

Parameters
device ITestDevice: the ITestDevice to use

Protected methods

setResumeLevel

void setResumeLevel (int level)

Parameters
level int