TestDeviceOptions

public class TestDeviceOptions
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.TestDeviceOptions


Container for ITestDevice Options

Summary

Public constructors

TestDeviceOptions()

Public methods

int getAdbRecoveryTimeout()
long getAvailableTimeout()
String getConnCheckUrl()
Integer getCutoffBattery()
int getFastbootTimeout()
String getLogcatOptions()
long getMaxLogcatDataSize()

Get the approximate maximum size of a tmp logcat data to retain, in bytes.

long getMaxWifiConnectTime()
long getOnlineTimeout()
List<String> getPostBootCommands()
int getRebootTimeout()
int getUnencryptRebootTimeout()
boolean getUseFastbootErase()
int getWifiAttempts()
int getWifiRetryWaitTime()
String getWifiUtilAPKPath()
boolean isDisableKeyguard()

Check whether or not we should attempt to disable the keyguard once boot has completed

boolean isEnableAdbRoot()

Check whether adb root should be enabled on boot for this device

boolean isLogcatCaptureEnabled()
boolean isWifiExpoRetryEnabled()
void setAdbRecoveryTimeout(int adbRecoveryTimeout)
void setConnCheckUrl(String url)
void setCutoffBattery(int cutoffBattery)

set the minimum battery level to continue the invocation.

void setDisableKeyguard(boolean disableKeyguard)

Set whether or not we should attempt to disable the keyguard once boot has completed

void setFastbootTimeout(int fastbootTimeout)
void setLogcatOptions(String logcatOptions)

Set the options to be passed down to logcat

void setMaxLogcatDataSize(long maxLogcatDataSize)

Set the approximate maximum size of a tmp logcat to retain, in bytes

void setOnlineTimeout(long onlineTimeout)
void setRebootTimeout(int rebootTimeout)
void setUnencryptRebootTimeout(int unencryptRebootTimeout)
void setUseFastbootErase(boolean useFastbootErase)
void setWifiAttempts(int wifiAttempts)
boolean shouldDisableReboot()

Public constructors

TestDeviceOptions

public TestDeviceOptions ()

Public methods

getAdbRecoveryTimeout

public int getAdbRecoveryTimeout ()

Returns
int the timeout in msecs to boot into recovery mode.

getAvailableTimeout

public long getAvailableTimeout ()

Returns
long the default time in ms to to wait for a device to be available.

getConnCheckUrl

public String getConnCheckUrl ()

Returns
String the default URL to be used for connectivity tests.

getCutoffBattery

public Integer getCutoffBattery ()

Returns
Integer the minimum battery level to continue the invocation.

getFastbootTimeout

public int getFastbootTimeout ()

Returns
int the timeout to boot into fastboot mode in msecs.

getLogcatOptions

public String getLogcatOptions ()

Returns
String the configured logcat options

getMaxLogcatDataSize

public long getMaxLogcatDataSize ()

Get the approximate maximum size of a tmp logcat data to retain, in bytes.

Returns
long

getMaxWifiConnectTime

public long getMaxWifiConnectTime ()

Returns
long the maximum time to attempt to connect to wifi.

getOnlineTimeout

public long getOnlineTimeout ()

Returns
long the default time in ms to to wait for a device to be online.

getPostBootCommands

public List<String> getPostBootCommands ()

Returns
List<String> a list of shell commands to run after reboots.

getRebootTimeout

public int getRebootTimeout ()

Returns
int the timeout in msecs for the full system boot.

getUnencryptRebootTimeout

public int getUnencryptRebootTimeout ()

Returns
int the timeout in msecs for the filesystem to be formatted and the device to reboot after unencryption.

getUseFastbootErase

public boolean getUseFastbootErase ()

Returns
boolean whether to use fastboot erase instead of fastboot format to wipe partitions.

getWifiAttempts

public int getWifiAttempts ()

Returns
int the default number of attempts to connect to wifi network.

getWifiRetryWaitTime

public int getWifiRetryWaitTime ()

Returns
int the base wait time between wifi connect retries.

getWifiUtilAPKPath

public String getWifiUtilAPKPath ()

Returns
String the wifiutil apk path

isDisableKeyguard

public boolean isDisableKeyguard ()

Check whether or not we should attempt to disable the keyguard once boot has completed

Returns
boolean

isEnableAdbRoot

public boolean isEnableAdbRoot ()

Check whether adb root should be enabled on boot for this device

Returns
boolean

isLogcatCaptureEnabled

public boolean isLogcatCaptureEnabled ()

Returns
boolean true if background logcat capture is enabled

isWifiExpoRetryEnabled

public boolean isWifiExpoRetryEnabled ()

Returns
boolean if the exponential retry strategy should be used.

setAdbRecoveryTimeout

public void setAdbRecoveryTimeout (int adbRecoveryTimeout)

Parameters
adbRecoveryTimeout int: the timeout in msecs to boot into recovery mode.

setConnCheckUrl

public void setConnCheckUrl (String url)

Parameters
url String

setCutoffBattery

public void setCutoffBattery (int cutoffBattery)

set the minimum battery level to continue the invocation.

Parameters
cutoffBattery int

setDisableKeyguard

public void setDisableKeyguard (boolean disableKeyguard)

Set whether or not we should attempt to disable the keyguard once boot has completed

Parameters
disableKeyguard boolean

setFastbootTimeout

public void setFastbootTimeout (int fastbootTimeout)

Parameters
fastbootTimeout int: the timout in msecs to boot into fastboot mode.

setLogcatOptions

public void setLogcatOptions (String logcatOptions)

Set the options to be passed down to logcat

Parameters
logcatOptions String

setMaxLogcatDataSize

public void setMaxLogcatDataSize (long maxLogcatDataSize)

Set the approximate maximum size of a tmp logcat to retain, in bytes

Parameters
maxLogcatDataSize long

setOnlineTimeout

public void setOnlineTimeout (long onlineTimeout)

Parameters
onlineTimeout long

setRebootTimeout

public void setRebootTimeout (int rebootTimeout)

Parameters
rebootTimeout int: the timeout in msecs for the system to fully boot.

setUnencryptRebootTimeout

public void setUnencryptRebootTimeout (int unencryptRebootTimeout)

Parameters
unencryptRebootTimeout int: the timeout in msecs for the filesystem to be formatted and the device to reboot after unencryption.

setUseFastbootErase

public void setUseFastbootErase (boolean useFastbootErase)

Parameters
useFastbootErase boolean: whether to use fastboot erase instead of fastboot format to wipe partitions.

setWifiAttempts

public void setWifiAttempts (int wifiAttempts)

Parameters
wifiAttempts int

shouldDisableReboot

public boolean shouldDisableReboot ()

Returns
boolean if device reboot should be disabled