WaitForDeviceDatetimePreparer

public class WaitForDeviceDatetimePreparer
extends BaseTargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ 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.

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 setForceSetupError(boolean forceSetupError)

Sets the boolean for forcing a TargetSetupError if the datetime is not set correctly.

void setUp(TestInformation testInfo)

Protected methods

IRunUtil getRunUtil()

Public constructors

WaitForDeviceDatetimePreparer

public WaitForDeviceDatetimePreparer ()

Public methods

setDatetimeWaitTimeout

public void setDatetimeWaitTimeout (long datetimeWaitTimeout)

Sets the timeout for waiting on valid device datetime

Parameters
datetimeWaitTimeout long

setForceDatetime

public void setForceDatetime (boolean forceDatetime)

Sets the if datetime should be forced from host to device

Parameters
forceDatetime boolean

setForceSetupError

public void setForceSetupError (boolean forceSetupError)

Sets the boolean for forcing a TargetSetupError if the datetime is not set correctly.

Parameters
forceSetupError boolean

setUp

public void setUp (TestInformation testInfo)

Parameters
testInfo TestInformation

Throws
BuildError
DeviceNotAvailableException
TargetSetupError

Protected methods

getRunUtil

protected IRunUtil getRunUtil ()

Returns
IRunUtil the IRunUtil to use