WaitForDeviceDatetimePreparer

public class WaitForDeviceDatetimePreparer
extends Object implements ITargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.WaitForDeviceDatetimePreparer


A ITargetPreparer that waits for datetime to be set on device

Optionally this preparer can force a TargetSetupError if datetime is not set within timeout, or force host datetime onto device,

Summary

Public constructors

WaitForDeviceDatetimePreparer()

Public methods

void setDatetimeWaitTimeout(long datetimeWaitTimeout)

Sets the timeout for waiting on valid device datetime

void setForceDatetime(boolean forceDatetime)

Sets the if datetime should be forced from host to device

void setUp(ITestDevice device, IBuildInfo buildInfo)

Perform the target setup for testing.

Protected methods

IRunUtil getRunUtil()

Public constructors

WaitForDeviceDatetimePreparer

WaitForDeviceDatetimePreparer ()

Public methods

setDatetimeWaitTimeout

void setDatetimeWaitTimeout (long datetimeWaitTimeout)

Sets the timeout for waiting on valid device datetime

Parameters
datetimeWaitTimeout long

setForceDatetime

void setForceDatetime (boolean forceDatetime)

Sets the if datetime should be forced from host to device

Parameters
forceDatetime boolean

setUp

void setUp (ITestDevice device, 
                IBuildInfo buildInfo)

Perform the target setup for testing.

Parameters
device ITestDevice: the ITestDevice to prepare.

buildInfo IBuildInfo: data about the build under test.

Throws
TargetSetupError
BuildError
DeviceNotAvailableException

Protected methods

getRunUtil

IRunUtil getRunUtil ()

Returns
IRunUtil the IRunUtil to use