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

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

void setUp(ITestDevice device, IBuildInfo buildInfo)

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

setForceSetupError

void setForceSetupError (boolean forceSetupError)

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

Parameters
forceSetupError boolean

setUp

void setUp (ITestDevice device, 
                IBuildInfo buildInfo)

Parameters
device ITestDevice

buildInfo IBuildInfo

Throws
TargetSetupError
BuildError
DeviceNotAvailableException

Protected methods

getRunUtil

IRunUtil getRunUtil ()

Returns
IRunUtil the IRunUtil to use