장치 설정
public class DeviceSetup
extends BaseTargetPreparer
java.lang.객체 | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceSetup |
ITargetPreparer
제공을 기반으로 테스트하기위한 장치 구성 Option
들.
일반적으로 userdebug 빌드 유형인 'adb 루트'가 가능한 장치가 필요합니다.
새로운 빌드가 점멸 한 후 수행해야합니다.
요약
공개 생성자 | |
---|---|
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) 단위 테스트를 위해 노출됨 |
필드
m비행기 모드
protected BinaryState mAirplaneMode
m자동 회전
protected BinaryState mAutoRotate
mAutoUpdateTime
protected BinaryState mAutoUpdateTime
mAutoUpdate시간대
protected BinaryState mAutoUpdateTimezone
mBatterySaverTrigger
protected Integer mBatterySaverTrigger
m블루투스
protected BinaryState mBluetooth
엠셀
protected BinaryState mCell
mCell 자동 설정
protected BinaryState mCellAutoSetting
mData
protected BinaryState mData
mDefaultSimData
protected Integer mDefaultSimData
mDefaultSimSms
protected Integer mDefaultSimSms
mDefaultSimVoice
protected Integer mDefaultSimVoice
오디오 비활성화
protected boolean mDisableAudio
mDisableDalvikVerifier
protected boolean mDisableDalvikVerifier
mDisableDialing
protected boolean mDisableDialing
mDisableDoze
protected boolean mDisableDoze
mEnableFullBatteryStats 기록
protected boolean mEnableFullBatteryStatsHistory
mForceSkipRun명령
protected boolean mForceSkipRunCommands
mForceSkip설정
protected boolean mForceSkipSettings
mForceSkipSystemProps
protected boolean mForceSkipSystemProps
m글로벌 설정
protected MultiMap<String, String> mGlobalSettings
mInstallNonMarketApps
protected BinaryState mInstallNonMarketApps
mLocalData파일
protected File mLocalDataFile
mL위치Gps
protected BinaryState mLocationGps
mMinExternalStorageKb
protected long mMinExternalStorageKb
mNfc
protected BinaryState mNfc
mOptimizedPropertySetting
protected boolean mOptimizedPropertySetting
mPrevious속성
protected File mPreviousProperties
mRemoteDataPath
protected String mRemoteDataPath
mRestoreProperties
protected boolean mRestoreProperties
m복원 설정
protected boolean mRestoreSettings
mRunCommandAfterSettings
protectedmRunCommandAfterSettings
mRunCommandBeforeSettings
protectedmRunCommandBeforeSettings
mScreenAdaptiveBrightness
protected BinaryState mScreenAdaptiveBrightness
mScreenAlwaysOn
protected BinaryState mScreenAlwaysOn
mScreenAmbientMode
protected BinaryState mScreenAmbientMode
mScreen 밝기
protected Integer mScreenBrightness
mScreenSaver
protected BinaryState mScreenSaver
mScreenTimeoutSecs
protected Long mScreenTimeoutSecs
mSecure설정
protected MultiMap<String, String> mSecureSettings
mSetProps
protectedmSetProps
mSetTestHarness
protected boolean mSetTestHarness
m시스템 설정
protected MultiMap<String, String> mSystemSettings
m시간대
protected String mTimezone
mTriggerMedia 탑재
protected boolean mTriggerMediaMounted
mWake 제스처
protected BinaryState mWakeGesture
모바일 와이파이
protected BinaryState mWifi
mWifiPsk
protected String mWifiPsk
mWifiScan항상활성화
protected BinaryState mWifiScanAlwaysEnabled
mWifiSsid
protected String mWifiSsid
mWifiSsidToPsk
protectedmWifiSsidToPsk
공개 생성자
장치 설정
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 | 충돌이 있는 경우 |
프로세스 옵션
public void processOptions (ITestDevice device)
모든 과정 Option
들 및 시스템 소품, 설정 또는 실행 명령으로 그들을 켜십시오. 현재 장치에서 명령을 실행하지 않습니다.
자식 클래스가 이를 재정의할 수 있도록 노출됩니다.
매개변수 | |
---|---|
device | ITestDevice 다음 ITestDevice |
던지다 | |
---|---|
DeviceNotAvailableException | 장치를 사용할 수 없는 경우 |
TargetSetupError | 은 if 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 |
자동 업데이트 시간 설정
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 |
세트블루투스
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 |
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 |
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 |
설정 화면 밝기
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 |
setTriggerMedia마운트됨
protected void setTriggerMediaMounted (boolean triggerMediaMounted)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
triggerMediaMounted | boolean |
setWakeGesture
protected void setWakeGesture (BinaryState wakeGesture)
단위 테스트를 위해 노출됨
매개변수 | |
---|---|
wakeGesture | BinaryState |
setWifi네트워크
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 |