to top
public class

TestDeviceOptions

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

Class Overview

Container for ITestDevice Options

Summary

Fields
private int mAdbRecoveryTimeout @Option(name = "adb-recovery-timeout", description = "time in ms to wait for a device to boot into recovery.")
private long mAvailableTimeout @Option(name = "available-timeout", description = "default time in ms to wait for the device to be available aka fully boot.")
private String mConnCheckUrl @Option(name = "conn-check-url", description = "default URL to be used for connectivity checks.")
private Integer mCutoffBattery @Option(name = "cutoff-battery", description = "the minimum battery level required to continue the invocation. Scale: 0-100")
private boolean mDisableKeyguard @Option(name = "disable-keyguard", description = "attempt to disable keyguard once boot is complete.")
private String mDisableKeyguardCmd @Option(name = "disable-keyguard-cmd", description = "shell command to disable keyguard.")
private boolean mEnableAdbRoot @Option(name = "enable-root", description = "enable adb root on boot.")
private boolean mEnableLogcat @Option(name = "enable-logcat", description = "Enable background logcat capture when invocation is running.")
private int mFastbootTimeout @Option(name = "fastboot-timeout", description = "time in ms to wait for a device to boot into fastboot.")
private String mLogcatOptions @Option(name = "logcat-options", description = "Options to be passed down to logcat command, if unspecified, \"-v threadtime\" will be used. Only used if --enable-logcat is set")
private long mMaxLogcatDataSize @Option(name = "max-tmp-logcat-file", description = "The maximum size of tmp logcat data to retain, in bytes. Only used if --enable-logcat is set")
private long mOnlineTimeout @Option(name = "online-timeout", description = "default time in ms to wait for the device to be visible on adb.")
private String mPingIpOrHost @Option(name = "ping-ip-or-host", description = "default ip or host to ping during connectivity checks; [deprecated] use --ping-url instead.")
private List<String> mPostBootCommands @Option(name = "post-boot-command", description = "shell command to run after reboots during invocation")
private int mRebootTimeout @Option(name = "reboot-timeout", description = "time in ms to wait for a device to reboot to full system.")
private int mUnencryptRebootTimeout @Option(name = "unencrypt-reboot-timeout", description = "time in ms to wait for the device to format the filesystem and reboot after unencryption")
private boolean mUseFastbootErase @Option(name = "use-fastboot-erase", description = "use fastboot erase instead of fastboot format to wipe partitions")
private int mWifiAttempts @Option(name = "wifi-attempts", description = "default number of attempts to connect to wifi network.")
private int mWifiRetryWaitTime @Option(name = "wifi-retry-wait-time", description = "the base wait time in ms between wifi connect retries. The actual wait time would be a multiple of this value.")
Public Constructors
TestDeviceOptions()
Public Methods
int getAdbRecoveryTimeout()
long getAvailableTimeout()
String getConnCheckUrl()
Integer getCutoffBattery()
String getDisableKeyguardCmd()
Fetch the command to disable the keyguard
int getFastbootTimeout()
String getLogcatOptions()
long getMaxLogcatDataSize()
Get the approximate maximum size of a tmp logcat data to retain, in bytes.
long getOnlineTimeout()
String getPingIpOrHost()
List<String> getPostBootCommands()
int getRebootTimeout()
int getUnencryptRebootTimeout()
boolean getUseFastbootErase()
int getWifiAttempts()
int getWifiRetryWaitTime()
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()
void setAdbRecoveryTimeout(int adbRecoveryTimeout)
void setConnCheckUrl(String url)
void setDisableKeyguard(boolean disableKeyguard)
Set whether or not we should attempt to disable the keyguard once boot has completed
void setDisableKeyguardCmd(String disableKeyguardCmd)
Set the command to be used to disable the keyguard
void setEnableAdbRoot(boolean enableAdbRoot)
Set whether adb root should be enabled on boot for this device
void setFastbootTimeout(int fastbootTimeout)
void setMaxLogcatDataSize(long maxLogcatDataSize)
Set the approximate maximum size of a tmp logcat to retain, in bytes
void setOnlineTimeout(long onlineTimeout)
void setPingIpOrHost(String ipOrHost)
void setRebootTimeout(int rebootTimeout)
void setUnencryptRebootTimeout(int unencryptRebootTimeout)
void setUseFastbootErase(boolean useFastbootErase)
void setWifiAttempts(int wifiAttempts)
void setmLogcatOptions(String logcatOptions)
Set the options to be passed down to logcat
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private int mAdbRecoveryTimeout

private long mAvailableTimeout

private String mConnCheckUrl

private Integer mCutoffBattery

private boolean mDisableKeyguard

private String mDisableKeyguardCmd

private boolean mEnableAdbRoot

private boolean mEnableLogcat

private int mFastbootTimeout

private String mLogcatOptions

private long mMaxLogcatDataSize

private long mOnlineTimeout

private String mPingIpOrHost

private List<String> mPostBootCommands

private int mRebootTimeout

private int mUnencryptRebootTimeout

private boolean mUseFastbootErase

private int mWifiAttempts

private int mWifiRetryWaitTime

Public Constructors

public TestDeviceOptions ()

Public Methods

public int getAdbRecoveryTimeout ()

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

public long getAvailableTimeout ()

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

public String getConnCheckUrl ()

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

public Integer getCutoffBattery ()

Returns
Integer the minimum battery level to continue the invocation.

public String getDisableKeyguardCmd ()

Fetch the command to disable the keyguard

Returns
String

public int getFastbootTimeout ()

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

public String getLogcatOptions ()

Returns
String the configured logcat options

public long getMaxLogcatDataSize ()

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

Returns
long

public long getOnlineTimeout ()

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

public String getPingIpOrHost ()

Returns
String the default ip or hostname to ping during connectivity tests.

public List<String> getPostBootCommands ()

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

public int getRebootTimeout ()

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

public int getUnencryptRebootTimeout ()

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

public boolean getUseFastbootErase ()

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

public int getWifiAttempts ()

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

public int getWifiRetryWaitTime ()

Returns
int the base wait time between wifi connect retries.

public boolean isDisableKeyguard ()

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

Returns
boolean

public boolean isEnableAdbRoot ()

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

Returns
boolean

public boolean isLogcatCaptureEnabled ()

Returns
boolean true if background logcat capture is enabled

public void setAdbRecoveryTimeout (int adbRecoveryTimeout)

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

public void setConnCheckUrl (String url)

Parameters
url String

public void setDisableKeyguard (boolean disableKeyguard)

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

Parameters
disableKeyguard boolean

public void setDisableKeyguardCmd (String disableKeyguardCmd)

Set the command to be used to disable the keyguard

Parameters
disableKeyguardCmd String

public void setEnableAdbRoot (boolean enableAdbRoot)

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

Parameters
enableAdbRoot boolean

public void setFastbootTimeout (int fastbootTimeout)

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

public void setMaxLogcatDataSize (long maxLogcatDataSize)

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

Parameters
maxLogcatDataSize long

public void setOnlineTimeout (long onlineTimeout)

Parameters
onlineTimeout long

public void setPingIpOrHost (String ipOrHost)

Parameters
ipOrHost String

public void setRebootTimeout (int rebootTimeout)

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

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.

public void setUseFastbootErase (boolean useFastbootErase)

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

public void setWifiAttempts (int wifiAttempts)

Parameters
wifiAttempts int

public void setmLogcatOptions (String logcatOptions)

Set the options to be passed down to logcat

Parameters
logcatOptions String