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 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()
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)
[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 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
  • the timeout in msecs to boot into recovery mode.

public long getAvailableTimeout ()

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

public String getConnCheckUrl ()

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

public Integer getCutoffBattery ()

Returns
  • the minimum battery level to continue the invocation.

public String getDisableKeyguardCmd ()

Fetch the command to disable the keyguard

public int getFastbootTimeout ()

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

public long getMaxLogcatDataSize ()

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

public long getOnlineTimeout ()

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

public String getPingIpOrHost ()

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

public List<String> getPostBootCommands ()

Returns
  • a list of shell commands to run after reboots.

public int getRebootTimeout ()

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

public int getUnencryptRebootTimeout ()

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

public boolean getUseFastbootErase ()

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

public int getWifiAttempts ()

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

public int getWifiRetryWaitTime ()

Returns
  • 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

public boolean isEnableAdbRoot ()

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

public boolean isLogcatCaptureEnabled ()

Returns
  • true if background logcat capture is enabled

public void setAdbRecoveryTimeout (int adbRecoveryTimeout)

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

public void setConnCheckUrl (String url)

public void setDisableKeyguard (boolean disableKeyguard)

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

public void setDisableKeyguardCmd (String disableKeyguardCmd)

Set the command to be used to disable the keyguard

public void setEnableAdbRoot (boolean enableAdbRoot)

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

public void setFastbootTimeout (int fastbootTimeout)

Parameters
fastbootTimeout 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

public void setOnlineTimeout (long onlineTimeout)

public void setPingIpOrHost (String ipOrHost)

public void setRebootTimeout (int rebootTimeout)

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

public void setUnencryptRebootTimeout (int unencryptRebootTimeout)

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

public void setUseFastbootErase (boolean useFastbootErase)

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

public void setWifiAttempts (int wifiAttempts)