DeviceSetup
public class DeviceSetup
extends BaseTargetPreparer
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceSetup |
A ITargetPreparer
提供に基づいて検査するための装置構成Option
秒。
'adb root'が可能なデバイス、通常はuserdebugビルドタイプが必要です。
新しいビルドが点滅した後に実行する必要があります。
概要
パブリックコンストラクター | |
---|---|
DeviceSetup () |
パブリックメソッド | |
---|---|
void | changeSettings (ITestDevice device) デバイスの設定を変更します。 |
ITestDevice | getDevice (TestInformation testInfo) |
boolean | isForceSkipSystemProps () |
void | processDeprecatedOptions (ITestDevice device) 非推奨のオプションを処理して、現在使用されているオプションに変換します。 |
void | processOptions (ITestDevice device) すべてのプロセス |
static void | setCommandForBinaryState ( BinaryState state, commands, String onCommand, String offCommand) setCommandForBinaryState ( BinaryState state, commands, String onCommand, String offCommand) デバイスで実行されるON / OFF実行コマンドを追加するヘルパーメソッド。 |
void | setGlobalSetting (String key, String value) ユニットテスト用に公開 |
void | setSecureSetting (String key, String value) ユニットテスト用に公開 |
static void | setSettingForBinaryState ( BinaryState state, MultiMap<String, String> settingsMap, String setting, String onValue, String offValue) 設定マップにON / OFF設定を追加するヘルパーメソッド。 |
void | setSystemSetting (String key, String value) ユニットテスト用に公開 |
void | setUp (TestInformation testInfo) |
void | tearDown (TestInformation testInfo, Throwable e)
|
保護されたメソッド | |
---|---|
void | setAirplaneMode ( BinaryState airplaneMode) ユニットテスト用に公開 |
void | setAutoRotate ( BinaryState autoRotate) ユニットテスト用に公開 |
void | setAutoUpdateTime ( BinaryState autoUpdateTime) ユニットテスト用に公開 |
void | setAutoUpdateTimezone ( BinaryState autoUpdateTimezone) ユニットテスト用に公開 |
void | setBatterySaver ( BinaryState batterySaver) ユニットテスト用に公開 |
void | setBatterySaverTrigger (Integer batterySaverTrigger) ユニットテスト用に公開 |
void | setBluetooth ( BinaryState bluetooth) ユニットテスト用に公開 |
void | setCell ( BinaryState cell) |
void | setCellAutoSetting ( BinaryState cellAutoSetting) |
void | setData ( BinaryState data) |
void | setDefaultSimData (Integer defaultSimData) ユニットテスト用に公開 |
void | setDefaultSimSms (Integer defaultSimSms) ユニットテスト用に公開 |
void | setDefaultSimVoice (Integer defaultSimVoice) ユニットテスト用に公開 |
void | setDeprecatedAudioSilent (boolean silent) このメソッドは非推奨です。使用 |
void | setDeprecatedMinExternalStoreSpace (long storeSpace) このメソッドは非推奨です。使用 |
void | setDeprecatedSetProp (String prop) このメソッドは非推奨です。使用 |
void | setDisableAudio (boolean disable) ユニットテスト用に公開 |
void | setDisableCwWifiMediator ( BinaryState disableCwWifiMediator) |
void | setDisableDalvikVerifier (boolean disableDalvikVerifier) ユニットテスト用に公開 |
void | setDisableDialing (boolean disableDialing) ユニットテスト用に公開 |
void | setDisableDoze (boolean disableDoze) ユニットテスト用に公開 |
void | setEnableFullBatteryStatsHistory (boolean enableFullBatteryStatsHistory) ユニットテスト用に公開 |
void | setEthernet ( BinaryState ethernet) ユニットテスト用に公開 |
void | setForceSkipSystemProps (boolean force) ユニットテスト用に公開 |
void | setInstallNonMarketApps ( BinaryState installNonMarketApps) ユニットテスト用に公開 |
void | setLocalDataPath (File path) ユニットテスト用に公開 |
void | setLocationGps ( BinaryState locationGps) ユニットテスト用に公開 |
void | setLocationNetwork ( BinaryState locationNetwork) ユニットテスト用に公開 |
void | setMinExternalStorageKb (long storageKb) ユニットテスト用に公開 |
void | setNfc ( BinaryState nfc) ユニットテスト用に公開 |
void | setNotificationLed ( BinaryState notificationLed) ユニットテスト用に公開 |
void | setProperty (String key, String value) ユニットテスト用に公開 |
void | setRestoreProperties (boolean restoreProperties) ユニットテスト用に公開 |
void | setRestoreSettings (boolean restoreSettings) ユニットテスト用に公開 |
void | setScreenAdaptiveBrightness ( BinaryState screenAdaptiveBrightness) ユニットテスト用に公開 |
void | setScreenAlwaysOn ( BinaryState screenAlwaysOn) ユニットテスト用に公開 |
void | setScreenAmbientMode ( BinaryState screenAmbientMode) ユニットテスト用に公開 |
void | setScreenBrightness (Integer screenBrightness) ユニットテスト用に公開 |
void | setScreenSaver ( BinaryState screenSaver) ユニットテスト用に公開 |
void | setScreenTimeoutSecs (Long screenTimeoutSecs) ユニットテスト用に公開 |
void | setTestHarness (boolean setTestHarness) ユニットテスト用に公開 |
void | setTimezone (String timezone) ユニットテスト用に公開 |
void | setTriggerMediaMounted (boolean triggerMediaMounted) ユニットテスト用に公開 |
void | setWakeGesture ( BinaryState wakeGesture) ユニットテスト用に公開 |
void | setWifi ( BinaryState wifi) ユニットテスト用に公開 |
void | setWifiNetwork (String wifiNetwork) ユニットテスト用に公開 |
void | setWifiPsk (String wifiPsk) |
void | setWifiScanAlwaysEnabled ( BinaryState wifiScanAlwaysEnabled) ユニットテスト用に公開 |
void | setWifiSsidToPsk ( wifiSssidToPsk) setWifiSsidToPsk ( wifiSssidToPsk) |
void | setWifiWatchdog ( BinaryState wifiWatchdog) ユニットテスト用に公開 |
田畑
mAirplaneMode
protected BinaryState mAirplaneMode
mAutoRotate
protected BinaryState mAutoRotate
mAutoUpdateTime
protected BinaryState mAutoUpdateTime
mAutoUpdateTimezone
protected BinaryState mAutoUpdateTimezone
mBatterySaverTrigger
protected Integer mBatterySaverTrigger
mBluetooth
protected BinaryState mBluetooth
mCell
protected BinaryState mCell
mCellAutoSetting
protected BinaryState mCellAutoSetting
mData
protected BinaryState mData
mDefaultSimData
protected Integer mDefaultSimData
mDefaultSimSms
protected Integer mDefaultSimSms
mDefaultSimVoice
protected Integer mDefaultSimVoice
mDisableAudio
protected boolean mDisableAudio
mDisableDalvikVerifier
protected boolean mDisableDalvikVerifier
mDisableDialing
protected boolean mDisableDialing
mDisableDoze
protected boolean mDisableDoze
mEnableFullBatteryStatsHistory
protected boolean mEnableFullBatteryStatsHistory
mForceSkipRunCommands
protected boolean mForceSkipRunCommands
mForceSkipSettings
protected boolean mForceSkipSettings
mForceSkipSystemProps
protected boolean mForceSkipSystemProps
mGlobalSettings
protected MultiMap<String, String> mGlobalSettings
mInstallNonMarketApps
protected BinaryState mInstallNonMarketApps
mLocalDataFile
protected File mLocalDataFile
mLocationGps
protected BinaryState mLocationGps
mMinExternalStorageKb
protected long mMinExternalStorageKb
mNfc
protected BinaryState mNfc
mOptimizedPropertySetting
protected boolean mOptimizedPropertySetting
mPreviousProperties
protected File mPreviousProperties
mRemoteDataPath
protected String mRemoteDataPath
mRestoreProperties
protected boolean mRestoreProperties
mRestoreSettings
protected boolean mRestoreSettings
mRunCommandAfterSettings
protectedmRunCommandAfterSettings
mRunCommandBeforeSettings
protectedmRunCommandBeforeSettings
mScreenAdaptiveBrightness
protected BinaryState mScreenAdaptiveBrightness
mScreenAlwaysOn
protected BinaryState mScreenAlwaysOn
mScreenAmbientMode
protected BinaryState mScreenAmbientMode
mScreenBrightness
protected Integer mScreenBrightness
mScreenSaver
protected BinaryState mScreenSaver
mScreenTimeoutSecs
protected Long mScreenTimeoutSecs
mSecureSettings
protected MultiMap<String, String> mSecureSettings
mSetProps
protectedmSetProps
mSetTestHarness
protected boolean mSetTestHarness
mSystemSettings
protected MultiMap<String, String> mSystemSettings
mTimezone
protected String mTimezone
mTriggerMediaMounted
protected boolean mTriggerMediaMounted
mWakeGesture
protected BinaryState mWakeGesture
mWifi
protected BinaryState mWifi
mWifiPsk
protected String mWifiPsk
mWifiScanAlwaysEnabled
protected BinaryState mWifiScanAlwaysEnabled
mWifiSsid
protected String mWifiSsid
mWifiSsidToPsk
protectedmWifiSsidToPsk
パブリックコンストラクター
DeviceSetup
public DeviceSetup ()
パブリックメソッド
設定を変更する
public void changeSettings (ITestDevice device)
デバイスの設定を変更します。
子クラスがオーバーライドされるように公開されます。
パラメーター | |
---|---|
device | ITestDevice : ITestDevice |
投げる | |
---|---|
DeviceNotAvailableException | デバイスが利用できない場合 |
TargetSetupError | 設定に失敗した場合 |
getDevice
public ITestDevice getDevice (TestInformation testInfo)
パラメーター | |
---|---|
testInfo | TestInformation |
戻り値 | |
---|---|
ITestDevice |
isForceSkipSystemProps
public boolean isForceSkipSystemProps ()
戻り値 | |
---|---|
boolean |
processDeprecatedOptions
public void processDeprecatedOptions (ITestDevice device)
非推奨のオプションを処理して、現在使用されているオプションに変換します。
このメソッドは、他の処理メソッドの前に実行する必要があります。スローされますTargetSetupError
古いオプションが指定された非古いオプションを上書きします。
パラメーター | |
---|---|
device | ITestDevice |
投げる | |
---|---|
TargetSetupError | 競合がある場合 |
processOptions
public void processOptions (ITestDevice device)
すべてのプロセスOption
秒とシステムの小道具、設定、または実行コマンドに変換します。現在、デバイス上でコマンドを実行していません。
子クラスがこれをオーバーライドできるように公開されます。
パラメーター | |
---|---|
device | ITestDevice : ITestDevice |
投げる | |
---|---|
DeviceNotAvailableException | デバイスが利用できない場合 |
TargetSetupError | もしOption の競合 |
setCommandForBinaryState
public static void setCommandForBinaryState (BinaryState state,commands, String onCommand, String offCommand)
デバイスで実行されるON / OFF実行コマンドを追加するヘルパーメソッド。
パラメーター | |
---|---|
state | BinaryState : BinaryState |
commands | |
onCommand | String :ON場合に実行するコマンド。コマンドがある場合は無視されnull |
offCommand | String :OFF場合に実行するコマンド。コマンドがある場合は無視されnull |
setGlobalSetting
public void setGlobalSetting (String key, String value)
ユニットテスト用に公開
パラメーター | |
---|---|
key | String |
value | String |
setSecureSetting
public void setSecureSetting (String key, String value)
ユニットテスト用に公開
パラメーター | |
---|---|
key | String |
value | String |
setSettingForBinaryState
public static void setSettingForBinaryState (BinaryState state, MultiMap<String, String> settingsMap, String setting, String onValue, String offValue)
設定マップにON / OFF設定を追加するヘルパーメソッド。
パラメーター | |
---|---|
state | BinaryState : BinaryState |
settingsMap | MultiMap : MultiMap 、設定を保存するために使用しました。 |
setting | String :設定キー |
onValue | String :値ONの場合 |
offValue | String :値OFFの場合 |
setSystemSetting
public void setSystemSetting (String key, String value)
ユニットテスト用に公開
パラメーター | |
---|---|
key | String |
value | String |
設定
public void setUp (TestInformation testInfo)
パラメーター | |
---|---|
testInfo | TestInformation |
投げる | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
取り壊す
public void tearDown (TestInformation testInfo, Throwable e)
パラメーター | |
---|---|
testInfo | TestInformation |
e | Throwable |
投げる | |
---|---|
DeviceNotAvailableException |
保護されたメソッド
setAirplaneMode
protected void setAirplaneMode (BinaryState airplaneMode)
ユニットテスト用に公開
パラメーター | |
---|---|
airplaneMode | BinaryState |
setAutoRotate
protected void setAutoRotate (BinaryState autoRotate)
ユニットテスト用に公開
パラメーター | |
---|---|
autoRotate | BinaryState |
setAutoUpdateTime
protected void setAutoUpdateTime (BinaryState autoUpdateTime)
ユニットテスト用に公開
パラメーター | |
---|---|
autoUpdateTime | BinaryState |
setAutoUpdateTimezone
protected void setAutoUpdateTimezone (BinaryState autoUpdateTimezone)
ユニットテスト用に公開
パラメーター | |
---|---|
autoUpdateTimezone | BinaryState |
setBatterySaver
protected void setBatterySaver (BinaryState batterySaver)
ユニットテスト用に公開
パラメーター | |
---|---|
batterySaver | BinaryState |
setBatterySaverTrigger
protected void setBatterySaverTrigger (Integer batterySaverTrigger)
ユニットテスト用に公開
パラメーター | |
---|---|
batterySaverTrigger | Integer |
setBluetooth
protected void setBluetooth (BinaryState bluetooth)
ユニットテスト用に公開
パラメーター | |
---|---|
bluetooth | BinaryState |
setCellAutoSetting
protected void setCellAutoSetting (BinaryState cellAutoSetting)
パラメーター | |
---|---|
cellAutoSetting | BinaryState |
setDefaultSimData
protected void setDefaultSimData (Integer defaultSimData)
ユニットテスト用に公開
パラメーター | |
---|---|
defaultSimData | Integer |
setDefaultSimSms
protected void setDefaultSimSms (Integer defaultSimSms)
ユニットテスト用に公開
パラメーター | |
---|---|
defaultSimSms | Integer |
setDefaultSimVoice
protected void setDefaultSimVoice (Integer defaultSimVoice)
ユニットテスト用に公開
パラメーター | |
---|---|
defaultSimVoice | Integer |
setDeprecatedAudioSilent
protected void setDeprecatedAudioSilent (boolean silent)
このメソッドは非推奨です。
使用setDisableAudio(boolean)
の代わりに。
ユニットテスト用に公開
パラメーター | |
---|---|
silent | boolean |
setDeprecatedMinExternalStoreSpace
protected void setDeprecatedMinExternalStoreSpace (long storeSpace)
このメソッドは非推奨です。
使用setMinExternalStorageKb(long)
の代わりに。
ユニットテスト用に公開
パラメーター | |
---|---|
storeSpace | long |
setDeprecatedSetProp
protected void setDeprecatedSetProp (String prop)
このメソッドは非推奨です。
使用setProperty(String, String)
の代わりに。
ユニットテスト用に公開
パラメーター | |
---|---|
prop | String |
setDisableAudio
protected void setDisableAudio (boolean disable)
ユニットテスト用に公開
パラメーター | |
---|---|
disable | boolean |
setDisableCwWifiMediator
protected void setDisableCwWifiMediator (BinaryState disableCwWifiMediator)
パラメーター | |
---|---|
disableCwWifiMediator | BinaryState |
setDisableDalvikVerifier
protected void setDisableDalvikVerifier (boolean disableDalvikVerifier)
ユニットテスト用に公開
パラメーター | |
---|---|
disableDalvikVerifier | boolean |
setDisableDialing
protected void setDisableDialing (boolean disableDialing)
ユニットテスト用に公開
パラメーター | |
---|---|
disableDialing | boolean |
setDisableDoze
protected void setDisableDoze (boolean disableDoze)
ユニットテスト用に公開
パラメーター | |
---|---|
disableDoze | boolean |
setEnableFullBatteryStatsHistory
protected void setEnableFullBatteryStatsHistory (boolean enableFullBatteryStatsHistory)
ユニットテスト用に公開
パラメーター | |
---|---|
enableFullBatteryStatsHistory | boolean |
setForceSkipSystemProps
protected void setForceSkipSystemProps (boolean force)
ユニットテスト用に公開
パラメーター | |
---|---|
force | boolean |
setInstallNonMarketApps
protected void setInstallNonMarketApps (BinaryState installNonMarketApps)
ユニットテスト用に公開
パラメーター | |
---|---|
installNonMarketApps | BinaryState |
setLocalDataPath
protected void setLocalDataPath (File path)
ユニットテスト用に公開
パラメーター | |
---|---|
path | File |
setLocationGps
protected void setLocationGps (BinaryState locationGps)
ユニットテスト用に公開
パラメーター | |
---|---|
locationGps | BinaryState |
setLocationNetwork
protected void setLocationNetwork (BinaryState locationNetwork)
ユニットテスト用に公開
パラメーター | |
---|---|
locationNetwork | BinaryState |
setMinExternalStorageKb
protected void setMinExternalStorageKb (long storageKb)
ユニットテスト用に公開
パラメーター | |
---|---|
storageKb | long |
setNotificationLed
protected void setNotificationLed (BinaryState notificationLed)
ユニットテスト用に公開
パラメーター | |
---|---|
notificationLed | BinaryState |
setProperty
protected void setProperty (String key, String value)
ユニットテスト用に公開
パラメーター | |
---|---|
key | String |
value | String |
setRestoreProperties
protected void setRestoreProperties (boolean restoreProperties)
ユニットテスト用に公開
パラメーター | |
---|---|
restoreProperties | boolean |
setRestoreSettings
protected void setRestoreSettings (boolean restoreSettings)
ユニットテスト用に公開
パラメーター | |
---|---|
restoreSettings | boolean |
setScreenAdaptiveBrightness
protected void setScreenAdaptiveBrightness (BinaryState screenAdaptiveBrightness)
ユニットテスト用に公開
パラメーター | |
---|---|
screenAdaptiveBrightness | BinaryState |
setScreenAlwaysOn
protected void setScreenAlwaysOn (BinaryState screenAlwaysOn)
ユニットテスト用に公開
パラメーター | |
---|---|
screenAlwaysOn | BinaryState |
setScreenAmbientMode
protected void setScreenAmbientMode (BinaryState screenAmbientMode)
ユニットテスト用に公開
パラメーター | |
---|---|
screenAmbientMode | BinaryState |
setScreenBrightness
protected void setScreenBrightness (Integer screenBrightness)
ユニットテスト用に公開
パラメーター | |
---|---|
screenBrightness | Integer |
setScreenSaver
protected void setScreenSaver (BinaryState screenSaver)
ユニットテスト用に公開
パラメーター | |
---|---|
screenSaver | BinaryState |
setScreenTimeoutSecs
protected void setScreenTimeoutSecs (Long screenTimeoutSecs)
ユニットテスト用に公開
パラメーター | |
---|---|
screenTimeoutSecs | Long |
setTestHarness
protected void setTestHarness (boolean setTestHarness)
ユニットテスト用に公開
パラメーター | |
---|---|
setTestHarness | boolean |
setTimezone
protected void setTimezone (String timezone)
ユニットテスト用に公開
パラメーター | |
---|---|
timezone | String |
setTriggerMediaMounted
protected void setTriggerMediaMounted (boolean triggerMediaMounted)
ユニットテスト用に公開
パラメーター | |
---|---|
triggerMediaMounted | boolean |
setWakeGesture
protected void setWakeGesture (BinaryState wakeGesture)
ユニットテスト用に公開
パラメーター | |
---|---|
wakeGesture | BinaryState |
setWifiNetwork
protected void setWifiNetwork (String wifiNetwork)
ユニットテスト用に公開
パラメーター | |
---|---|
wifiNetwork | String |
setWifiPsk
protected void setWifiPsk (String wifiPsk)
パラメーター | |
---|---|
wifiPsk | String |
setWifiScanAlwaysEnabled
protected void setWifiScanAlwaysEnabled (BinaryState wifiScanAlwaysEnabled)
ユニットテスト用に公開
パラメーター | |
---|---|
wifiScanAlwaysEnabled | BinaryState |
setWifiSsidToPsk
protected void setWifiSsidToPsk (wifiSssidToPsk)
パラメーター | |
---|---|
wifiSssidToPsk |
setWifiWatchdog
protected void setWifiWatchdog (BinaryState wifiWatchdog)
ユニットテスト用に公開
パラメーター | |
---|---|
wifiWatchdog | BinaryState |