장치 설정
public class DeviceSetup
extends BaseTargetPreparer
implements IExternalDependency
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceSetup |
제공된 Option
을 기반으로 테스트할 장치를 구성하는 ITargetPreparer
입니다.
'adb 루트'가 가능한 장치(일반적으로 userdebug 빌드 유형)가 필요합니다.
새 빌드가 플래시된 후에 수행되어야 합니다.
참고: 이 준비 도구는 지속적인 테스트 실험실을 위한 것이며 테스트 중인 장치가 다음 실행 전에 플래시되고 지워지는 것으로 가정합니다. 따라서 분해 중에 최소한의 정리만 수행하므로 테스트 모듈에서 사용하면 안 됩니다.
요약
공개 생성자 | |
---|---|
DeviceSetup () |
공개 메소드 | |
---|---|
void | changeSettings ( ITestDevice device) 장치의 설정을 변경합니다. |
getDependencies () | |
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) 단위 테스트를 위해 노출됨 |
필드
mBatterySaver트리거
protected Integer mBatterySaverTrigger
m블루투스
protected BinaryState mBluetooth
mCell자동설정
protected BinaryState mCellAutoSetting
mDefaultSimData
protected Integer mDefaultSimData
mDefaultSimSms
protected Integer mDefaultSimSms
mDefaultSimVoice
protected Integer mDefaultSimVoice
mDisableAudio
protected boolean mDisableAudio
mDisableDalvikVerifier
protected boolean mDisableDalvikVerifier
mDisable다이얼링
protected boolean mDisableDialing
mDisableDoze
protected boolean mDisableDoze
mEnableFullBatteryStatsHistory
protected boolean mEnableFullBatteryStatsHistory
mForceSkipRun명령
protected boolean mForceSkipRunCommands
mForceSkip설정
protected boolean mForceSkipSettings
mForceSkipSystemProps
protected boolean mForceSkipSystemProps
mLLocalData파일
protected File mLocalDataFile
mMin외부 스토리지Kb
protected long mMinExternalStorageKb
mOptimizedPropertySetting
protected boolean mOptimizedPropertySetting
m이전속성
protected File mPreviousProperties
mRemoteDataPath
protected String mRemoteDataPath
mRestore속성
protected boolean mRestoreProperties
m복원설정
protected boolean mRestoreSettings
mRunCommandAfterSettings
protectedmRunCommandAfterSettings
mRunCommandBefore설정
protectedmRunCommandBeforeSettings
m화면 밝기
protected Integer mScreenBrightness
mScreenTimeoutSecs
protected Long mScreenTimeoutSecs
mSetProps
protectedmSetProps
mSetTestHarness
protected boolean mSetTestHarness
m시간대
protected String mTimezone
mTriggerMedia마운트됨
protected boolean mTriggerMediaMounted
mWakeGesture
protected BinaryState mWakeGesture
m와이파이Psk
protected String mWifiPsk
mWifiSsid
protected String mWifiSsid
mWifiSsidToPsk
protectedmWifiSsidToPsk
공개 생성자
장치 설정
public DeviceSetup ()
공개 메소드
설정 변경
public void changeSettings (ITestDevice device)
장치의 설정을 변경합니다.
하위 클래스가 재정의될 수 있도록 노출됩니다.
매개변수 | |
---|---|
device | ITestDevice : ITestDevice |
던지기 | |
---|---|
DeviceNotAvailableException | 장치를 사용할 수 없는 경우 |
TargetSetupError | 설정을 하는 데 실패한 경우 |
getDependency
publicgetDependencies ()
보고 | |
---|---|
getDevice
public ITestDevice getDevice (TestInformation testInfo)
매개변수 | |
---|---|
testInfo | TestInformation |
보고 | |
---|---|
ITestDevice |
isForceSkipSystemProps
public boolean isForceSkipSystemProps ()
보고 | |
---|---|
boolean |
processDeprecated옵션
public void processDeprecatedOptions (ITestDevice device)
더 이상 사용되지 않는 옵션을 현재 사용되는 옵션으로 변환하여 처리합니다.
이 방법은 다른 처리 방법보다 먼저 실행되어야 합니다. 더 이상 사용되지 않는 옵션이 더 이상 사용되지 않는 지정된 옵션을 재정의하는 경우 TargetSetupError
발생합니다.
매개변수 | |
---|---|
device | ITestDevice |
던지기 | |
---|---|
TargetSetupError | 갈등이 있는 경우 |
프로세스옵션
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 |
자동 회전 설정
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 |
setBatterySaver트리거
protected void setBatterySaverTrigger (Integer batterySaverTrigger)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
batterySaverTrigger | Integer |
블루투스 설정
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 |
setDisable다이얼링
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 |
setLocation네트워크
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 |
setRestore속성
protected void setRestoreProperties (boolean restoreProperties)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
restoreProperties | boolean |
setRestore설정
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 |
화면 보호기 설정
protected void setScreenSaver (BinaryState screenSaver)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
screenSaver | BinaryState |
setScreenTimeoutSecs
protected void setScreenTimeoutSecs (Long screenTimeoutSecs)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
screenTimeoutSecs | Long |
setTestHarness
protected void setTestHarness (boolean setTestHarness)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
setTestHarness | boolean |
시간대 설정
protected void setTimezone (String timezone)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
timezone | String |
setTriggerMediaMounted
protected void setTriggerMediaMounted (boolean triggerMediaMounted)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
triggerMediaMounted | boolean |
setWakeGesture
protected void setWakeGesture (BinaryState wakeGesture)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
wakeGesture | BinaryState |
Wi-Fi네트워크 설정
protected void setWifiNetwork (String wifiNetwork)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
wifiNetwork | String |
Wi-FiPsk 설정
protected void setWifiPsk (String wifiPsk)
매개변수 | |
---|---|
wifiPsk | String |
setWifiScanAlwaysEnabled
protected void setWifiScanAlwaysEnabled (BinaryState wifiScanAlwaysEnabled)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
wifiScanAlwaysEnabled | BinaryState |
setWifiSsidToPsk
protected void setWifiSsidToPsk (wifiSssidToPsk)
매개변수 | |
---|---|
wifiSssidToPsk |
Wi-FiWatchdog 설정
protected void setWifiWatchdog (BinaryState wifiWatchdog)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
wifiWatchdog | BinaryState |