장치 설정
public class DeviceSetup
extends BaseTargetPreparer
implements IExternalDependency
java.lang.객체 | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceSetup |
제공된 Option
을 기반으로 테스트용 장치를 구성하는 ITargetPreparer
입니다.
일반적으로 userdebug 빌드 유형인 'adb root'가 가능한 기기가 필요합니다.
새 빌드가 플래시된 후에 수행해야 합니다.
참고: 이 준비자는 지속적인 테스트 랩을 위한 것이며 테스트 중인 장치가 다음 실행 전에 플래시되고 지워질 것이라고 가정합니다. 따라서 분해 중에 최소한의 정리만 수행하므로 테스트 모듈에서 사용하면 안 됩니다.
요약
공개 생성자 | |
---|---|
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) 단위 테스트를 위해 노출됨 |
필드
m비행기 모드
protected BinaryState mAirplaneMode
m자동 회전
protected BinaryState mAutoRotate
mAutoUpdateTime
protected BinaryState mAutoUpdateTime
mAutoUpdateTimezone
protected BinaryState mAutoUpdateTimezone
mBatterySaverTrigger
protected Integer mBatterySaverTrigger
m블루투스
protected BinaryState mBluetooth
엠셀
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
mForceSkipRun 명령
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
mMin외부 스토리지Kb
protected long mMinExternalStorageKb
mNFC
protected BinaryState mNfc
mOptimizedPropertySetting
protected boolean mOptimizedPropertySetting
m이전 속성
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
m화면 밝기
protected Integer mScreenBrightness
mScreenSaver
protected BinaryState mScreenSaver
mScreenTimeoutSecs
protected Long mScreenTimeoutSecs
mSecureSettings
protected MultiMap<String, String> mSecureSettings
mSetProps
protectedmSetProps
mSetTestHarness
protected boolean mSetTestHarness
mSyncTimezoneWithHost
protected BinaryState mSyncTimezoneWithHost
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
공개 생성자
장치 설정
public DeviceSetup ()
공개 방법
설정 변경
public void changeSettings (ITestDevice device)
장치에서 설정을 변경합니다.
하위 클래스가 재정의할 수 있도록 노출되었습니다.
매개변수 | |
---|---|
device | ITestDevice : ITestDevice |
던지기 | |
---|---|
DeviceNotAvailableException | 장치를 사용할 수 없는 경우 |
TargetSetupError | 설정을 설정하는 데 실패한 경우 |
getDependencies
publicgetDependencies ()
보고 | |
---|---|
getDevice
public ITestDevice getDevice (TestInformation testInfo)
매개변수 | |
---|---|
testInfo | TestInformation |
보고 | |
---|---|
ITestDevice |
isForceSkipSystemProps
public boolean isForceSkipSystemProps ()
보고 | |
---|---|
boolean |
프로세스 사용 중단 옵션
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 |
tearDown
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 |