Configuration de l'appareil
public class DeviceSetup
extends BaseTargetPreparer
implements IExternalDependency
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceSetup |
Un ITargetPreparer
qui configure un périphérique pour le test en fonction des Option
fournies.
Nécessite un appareil où 'adb root' est possible, généralement un type de construction userdebug.
Doit être effectué après qu'une nouvelle version ait été flashée.
Remarque : ce préparateur est destiné aux laboratoires de test continu et suppose que l'appareil testé sera flashé et effacé avant la prochaine exécution. En tant que tel, il effectue un nettoyage minimal lors du démontage et ne doit pas être utilisé dans un module de test.
Résumé
Constructeurs publics | |
---|---|
DeviceSetup () |
Méthodes publiques | |
---|---|
void | changeSettings ( ITestDevice device) Modifiez les paramètres de l'appareil. |
getDependencies () | |
ITestDevice | getDevice ( TestInformation testInfo) |
boolean | isForceSkipSystemProps () |
void | processDeprecatedOptions ( ITestDevice device) Traite les options obsolètes en les convertissant en options actuellement utilisées. |
void | processOptions ( ITestDevice device) Traitez toutes les |
static void | setCommandForBinaryState ( BinaryState state, commands, String onCommand, String offCommand) setCommandForBinaryState ( BinaryState state, commands, String onCommand, String offCommand) Méthode d'assistance pour ajouter une commande d'exécution ON/OFF à exécuter sur l'appareil. |
void | setGlobalSetting (String key, String value) Exposé pour les tests unitaires |
void | setSecureSetting (String key, String value) Exposé pour les tests unitaires |
static void | setSettingForBinaryState ( BinaryState state, MultiMap <String, String> settingsMap, String setting, String onValue, String offValue) Méthode d'assistance pour ajouter un paramètre ON/OFF à une carte de paramètres. |
void | setSystemSetting (String key, String value) Exposé pour les tests unitaires |
void | setUp ( TestInformation testInfo) |
void | tearDown ( TestInformation testInfo, Throwable e)
|
Méthodes protégées | |
---|---|
void | setAirplaneMode ( BinaryState airplaneMode) Exposé pour les tests unitaires |
void | setAutoRotate ( BinaryState autoRotate) Exposé pour les tests unitaires |
void | setAutoUpdateTime ( BinaryState autoUpdateTime) Exposé pour les tests unitaires |
void | setAutoUpdateTimezone ( BinaryState autoUpdateTimezone) Exposé pour les tests unitaires |
void | setBatterySaver ( BinaryState batterySaver) Exposé pour les tests unitaires |
void | setBatterySaverTrigger (Integer batterySaverTrigger) Exposé pour les tests unitaires |
void | setBluetooth ( BinaryState bluetooth) Exposé pour les tests unitaires |
void | setCell ( BinaryState cell) |
void | setCellAutoSetting ( BinaryState cellAutoSetting) |
void | setData ( BinaryState data) |
void | setDefaultSimData (Integer defaultSimData) Exposé pour les tests unitaires |
void | setDefaultSimSms (Integer defaultSimSms) Exposé pour les tests unitaires |
void | setDefaultSimVoice (Integer defaultSimVoice) Exposé pour les tests unitaires |
void | setDeprecatedAudioSilent (boolean silent) Cette méthode est obsolète. utilisez plutôt |
void | setDeprecatedMinExternalStoreSpace (long storeSpace) Cette méthode est obsolète. utilisez plutôt |
void | setDeprecatedSetProp (String prop) Cette méthode est obsolète. utilisez plutôt |
void | setDisableAudio (boolean disable) Exposé pour les tests unitaires |
void | setDisableCwWifiMediator ( BinaryState disableCwWifiMediator) |
void | setDisableDalvikVerifier (boolean disableDalvikVerifier) Exposé pour les tests unitaires |
void | setDisableDialing (boolean disableDialing) Exposé pour les tests unitaires |
void | setDisableDoze (boolean disableDoze) Exposé pour les tests unitaires |
void | setEnableFullBatteryStatsHistory (boolean enableFullBatteryStatsHistory) Exposé pour les tests unitaires |
void | setEthernet ( BinaryState ethernet) Exposé pour les tests unitaires |
void | setForceSkipSystemProps (boolean force) Exposé pour les tests unitaires |
void | setInstallNonMarketApps ( BinaryState installNonMarketApps) Exposé pour les tests unitaires |
void | setLocalDataPath (File path) Exposé pour les tests unitaires |
void | setLocationGps ( BinaryState locationGps) Exposé pour les tests unitaires |
void | setLocationNetwork ( BinaryState locationNetwork) Exposé pour les tests unitaires |
void | setMinExternalStorageKb (long storageKb) Exposé pour les tests unitaires |
void | setNfc ( BinaryState nfc) Exposé pour les tests unitaires |
void | setNotificationLed ( BinaryState notificationLed) Exposé pour les tests unitaires |
void | setProperty (String key, String value) Exposé pour les tests unitaires |
void | setRestoreProperties (boolean restoreProperties) Exposé pour les tests unitaires |
void | setRestoreSettings (boolean restoreSettings) Exposé pour les tests unitaires |
void | setScreenAdaptiveBrightness ( BinaryState screenAdaptiveBrightness) Exposé pour les tests unitaires |
void | setScreenAlwaysOn ( BinaryState screenAlwaysOn) Exposé pour les tests unitaires |
void | setScreenAmbientMode ( BinaryState screenAmbientMode) Exposé pour les tests unitaires |
void | setScreenBrightness (Integer screenBrightness) Exposé pour les tests unitaires |
void | setScreenSaver ( BinaryState screenSaver) Exposé pour les tests unitaires |
void | setScreenTimeoutSecs (Long screenTimeoutSecs) Exposé pour les tests unitaires |
void | setTestHarness (boolean setTestHarness) Exposé pour les tests unitaires |
void | setTimezone (String timezone) Exposé pour les tests unitaires |
void | setTriggerMediaMounted (boolean triggerMediaMounted) Exposé pour les tests unitaires |
void | setWakeGesture ( BinaryState wakeGesture) Exposé pour les tests unitaires |
void | setWifi ( BinaryState wifi) Exposé pour les tests unitaires |
void | setWifiNetwork (String wifiNetwork) Exposé pour les tests unitaires |
void | setWifiPsk (String wifiPsk) |
void | setWifiScanAlwaysEnabled ( BinaryState wifiScanAlwaysEnabled) Exposé pour les tests unitaires |
void | setWifiSsidToPsk ( wifiSssidToPsk) setWifiSsidToPsk ( wifiSssidToPsk) |
void | setWifiWatchdog ( BinaryState wifiWatchdog) Exposé pour les tests unitaires |
Des champs
mMode Avion
protected BinaryState mAirplaneMode
mRotationAuto
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
mDésactiverAudio
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
mMinExternalStorageKo
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
mLuminosité de l'écran
protected Integer mScreenBrightness
mÉcran de veille
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
mFuseau horaire
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
Constructeurs publics
Configuration de l'appareil
public DeviceSetup ()
Méthodes publiques
modifier les paramètres
public void changeSettings (ITestDevice device)
Modifiez les paramètres de l'appareil.
Exposés afin que les classes d'enfants puissent passer outre.
Paramètres | |
---|---|
device | ITestDevice : Le ITestDevice |
Lance | |
---|---|
DeviceNotAvailableException | si l'appareil n'est pas disponible |
TargetSetupError | s'il y a eu un échec lors de la configuration des paramètres |
getDependencies
publicgetDependencies ()
Retour | |
---|---|
getDevice
public ITestDevice getDevice (TestInformation testInfo)
Paramètres | |
---|---|
testInfo | TestInformation |
Retour | |
---|---|
ITestDevice |
isForceSkipSystemProps
public boolean isForceSkipSystemProps ()
Retour | |
---|---|
boolean |
processDeprecatedOptionsprocessDeprecatedOptions
public void processDeprecatedOptions (ITestDevice device)
Traite les options obsolètes en les convertissant en options actuellement utilisées.
Cette méthode doit être exécutée avant toute autre méthode de traitement. Lancera une TargetSetupError
si l'option obsolète remplace une option non obsolète spécifiée.
Paramètres | |
---|---|
device | ITestDevice |
Lance | |
---|---|
TargetSetupError | s'il y a un conflit |
processusOptions
public void processOptions (ITestDevice device)
Traitez toutes les Option
et transformez-les en accessoires système, paramètres ou commandes d'exécution. N'exécute aucune commande sur l'appareil pour le moment.
Exposé afin que les classes d'enfants puissent annuler cela.
Paramètres | |
---|---|
device | ITestDevice : Le ITestDevice |
Lance | |
---|---|
DeviceNotAvailableException | si l'appareil n'est pas disponible |
TargetSetupError | si l' Option est en conflit |
setCommandForBinaryStatesetCommandForBinaryState
public static void setCommandForBinaryState (BinaryState state,commands, String onCommand, String offCommand)
Méthode d'assistance pour ajouter une commande d'exécution ON/OFF à exécuter sur l'appareil.
Paramètres | |
---|---|
state | BinaryState : l' BinaryState |
commands | |
onCommand | String : La commande à exécuter si ON. Ignoré si la commande est null |
offCommand | String : La commande à exécuter si OFF. Ignoré si la commande est null |
setGlobalSetting
public void setGlobalSetting (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
setSecureSetting
public void setSecureSetting (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
setSettingForBinaryStatesetSettingForBinaryState
public static void setSettingForBinaryState (BinaryState state, MultiMap<String, String> settingsMap, String setting, String onValue, String offValue)
Méthode d'assistance pour ajouter un paramètre ON/OFF à une carte de paramètres.
Paramètres | |
---|---|
state | BinaryState : l' BinaryState |
settingsMap | MultiMap : La MultiMap utilisée pour stocker les paramètres. |
setting | String : La clé de réglage |
onValue | String : La valeur si ON |
offValue | String : La valeur si OFF |
setSystemSetting
public void setSystemSetting (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
installation
public void setUp (TestInformation testInfo)
Paramètres | |
---|---|
testInfo | TestInformation |
Lance | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
démolir
public void tearDown (TestInformation testInfo, Throwable e)
Paramètres | |
---|---|
testInfo | TestInformation |
e | Throwable |
Lance | |
---|---|
DeviceNotAvailableException |
Méthodes protégées
setAirplaneMode
protected void setAirplaneMode (BinaryState airplaneMode)
Exposé pour les tests unitaires
Paramètres | |
---|---|
airplaneMode | BinaryState |
setAutoRotate
protected void setAutoRotate (BinaryState autoRotate)
Exposé pour les tests unitaires
Paramètres | |
---|---|
autoRotate | BinaryState |
setAutoUpdateTime
protected void setAutoUpdateTime (BinaryState autoUpdateTime)
Exposé pour les tests unitaires
Paramètres | |
---|---|
autoUpdateTime | BinaryState |
setAutoUpdateTimezone
protected void setAutoUpdateTimezone (BinaryState autoUpdateTimezone)
Exposé pour les tests unitaires
Paramètres | |
---|---|
autoUpdateTimezone | BinaryState |
setBatterySaver
protected void setBatterySaver (BinaryState batterySaver)
Exposé pour les tests unitaires
Paramètres | |
---|---|
batterySaver | BinaryState |
setBatterySaverTrigger
protected void setBatterySaverTrigger (Integer batterySaverTrigger)
Exposé pour les tests unitaires
Paramètres | |
---|---|
batterySaverTrigger | Integer |
définirBluetooth
protected void setBluetooth (BinaryState bluetooth)
Exposé pour les tests unitaires
Paramètres | |
---|---|
bluetooth | BinaryState |
setCellAutoSetting
protected void setCellAutoSetting (BinaryState cellAutoSetting)
Paramètres | |
---|---|
cellAutoSetting | BinaryState |
setDefaultSimData
protected void setDefaultSimData (Integer defaultSimData)
Exposé pour les tests unitaires
Paramètres | |
---|---|
defaultSimData | Integer |
setDefaultSimSms
protected void setDefaultSimSms (Integer defaultSimSms)
Exposé pour les tests unitaires
Paramètres | |
---|---|
defaultSimSms | Integer |
setDefaultSimVoice
protected void setDefaultSimVoice (Integer defaultSimVoice)
Exposé pour les tests unitaires
Paramètres | |
---|---|
defaultSimVoice | Integer |
setDeprecatedAudioSilent
protected void setDeprecatedAudioSilent (boolean silent)
Cette méthode est obsolète.
utilisez plutôt setDisableAudio(boolean)
.
Exposé pour les tests unitaires
Paramètres | |
---|---|
silent | boolean |
setDeprecatedMinExternalStoreSpace
protected void setDeprecatedMinExternalStoreSpace (long storeSpace)
Cette méthode est obsolète.
utilisez plutôt setMinExternalStorageKb(long)
.
Exposé pour les tests unitaires
Paramètres | |
---|---|
storeSpace | long |
setDeprecatedSetPropsetDeprecatedSetProp
protected void setDeprecatedSetProp (String prop)
Cette méthode est obsolète.
utilisez plutôt setProperty(String, String)
.
Exposé pour les tests unitaires
Paramètres | |
---|---|
prop | String |
setDisableAudio
protected void setDisableAudio (boolean disable)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disable | boolean |
setDisableCwWifiMediator
protected void setDisableCwWifiMediator (BinaryState disableCwWifiMediator)
Paramètres | |
---|---|
disableCwWifiMediator | BinaryState |
setDisableDalvikVerifier
protected void setDisableDalvikVerifier (boolean disableDalvikVerifier)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disableDalvikVerifier | boolean |
setDisableDialing
protected void setDisableDialing (boolean disableDialing)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disableDialing | boolean |
setDisableDoze
protected void setDisableDoze (boolean disableDoze)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disableDoze | boolean |
setEnableFullBatteryStatsHistory
protected void setEnableFullBatteryStatsHistory (boolean enableFullBatteryStatsHistory)
Exposé pour les tests unitaires
Paramètres | |
---|---|
enableFullBatteryStatsHistory | boolean |
setEthernet
protected void setEthernet (BinaryState ethernet)
Exposé pour les tests unitaires
Paramètres | |
---|---|
ethernet | BinaryState |
setForceSkipSystemProps
protected void setForceSkipSystemProps (boolean force)
Exposé pour les tests unitaires
Paramètres | |
---|---|
force | boolean |
setInstallNonMarketApps
protected void setInstallNonMarketApps (BinaryState installNonMarketApps)
Exposé pour les tests unitaires
Paramètres | |
---|---|
installNonMarketApps | BinaryState |
setLocalDataPath
protected void setLocalDataPath (File path)
Exposé pour les tests unitaires
Paramètres | |
---|---|
path | File |
setLocationGps
protected void setLocationGps (BinaryState locationGps)
Exposé pour les tests unitaires
Paramètres | |
---|---|
locationGps | BinaryState |
setLocationNetwork
protected void setLocationNetwork (BinaryState locationNetwork)
Exposé pour les tests unitaires
Paramètres | |
---|---|
locationNetwork | BinaryState |
setMinExternalStorageKb
protected void setMinExternalStorageKb (long storageKb)
Exposé pour les tests unitaires
Paramètres | |
---|---|
storageKb | long |
setNfc
protected void setNfc (BinaryState nfc)
Exposé pour les tests unitaires
Paramètres | |
---|---|
nfc | BinaryState |
setNotificationLed
protected void setNotificationLed (BinaryState notificationLed)
Exposé pour les tests unitaires
Paramètres | |
---|---|
notificationLed | BinaryState |
setProperty
protected void setProperty (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
setRestoreProperties
protected void setRestoreProperties (boolean restoreProperties)
Exposé pour les tests unitaires
Paramètres | |
---|---|
restoreProperties | boolean |
setRestoreSettingssetRestoreSettings
protected void setRestoreSettings (boolean restoreSettings)
Exposé pour les tests unitaires
Paramètres | |
---|---|
restoreSettings | boolean |
setScreenAdaptiveBrightness
protected void setScreenAdaptiveBrightness (BinaryState screenAdaptiveBrightness)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenAdaptiveBrightness | BinaryState |
setScreenAlwaysOn
protected void setScreenAlwaysOn (BinaryState screenAlwaysOn)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenAlwaysOn | BinaryState |
setScreenAmbientModesetScreenAmbientMode
protected void setScreenAmbientMode (BinaryState screenAmbientMode)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenAmbientMode | BinaryState |
setScreenBrightness
protected void setScreenBrightness (Integer screenBrightness)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenBrightness | Integer |
setScreenSaver
protected void setScreenSaver (BinaryState screenSaver)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenSaver | BinaryState |
setScreenTimeoutSecs
protected void setScreenTimeoutSecs (Long screenTimeoutSecs)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenTimeoutSecs | Long |
setTestHarness
protected void setTestHarness (boolean setTestHarness)
Exposé pour les tests unitaires
Paramètres | |
---|---|
setTestHarness | boolean |
setTimezone
protected void setTimezone (String timezone)
Exposé pour les tests unitaires
Paramètres | |
---|---|
timezone | String |
setTriggerMediaMounted
protected void setTriggerMediaMounted (boolean triggerMediaMounted)
Exposé pour les tests unitaires
Paramètres | |
---|---|
triggerMediaMounted | boolean |
setWakeGesture
protected void setWakeGesture (BinaryState wakeGesture)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wakeGesture | BinaryState |
définirWifi
protected void setWifi (BinaryState wifi)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifi | BinaryState |
setWifiNetwork
protected void setWifiNetwork (String wifiNetwork)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifiNetwork | String |
setWifiPsk
protected void setWifiPsk (String wifiPsk)
Paramètres | |
---|---|
wifiPsk | String |
setWifiScanAlwaysEnabled
protected void setWifiScanAlwaysEnabled (BinaryState wifiScanAlwaysEnabled)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifiScanAlwaysEnabled | BinaryState |
setWifiSsidToPsk
protected void setWifiSsidToPsk (wifiSssidToPsk)
Paramètres | |
---|---|
wifiSssidToPsk |
setWifiWatchdog
protected void setWifiWatchdog (BinaryState wifiWatchdog)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifiWatchdog | BinaryState |
Configuration de l'appareil
public class DeviceSetup
extends BaseTargetPreparer
implements IExternalDependency
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceSetup |
Un ITargetPreparer
qui configure un périphérique pour le test en fonction des Option
fournies.
Nécessite un appareil où 'adb root' est possible, généralement un type de construction userdebug.
Doit être effectué après qu'une nouvelle version ait été flashée.
Remarque : ce préparateur est destiné aux laboratoires de test continu et suppose que l'appareil testé sera flashé et effacé avant la prochaine exécution. En tant que tel, il effectue un nettoyage minimal lors du démontage et ne doit pas être utilisé dans un module de test.
Résumé
Constructeurs publics | |
---|---|
DeviceSetup () |
Méthodes publiques | |
---|---|
void | changeSettings ( ITestDevice device) Modifiez les paramètres de l'appareil. |
getDependencies () | |
ITestDevice | getDevice ( TestInformation testInfo) |
boolean | isForceSkipSystemProps () |
void | processDeprecatedOptions ( ITestDevice device) Traite les options obsolètes en les convertissant en options actuellement utilisées. |
void | processOptions ( ITestDevice device) Traitez toutes les |
static void | setCommandForBinaryState ( BinaryState state, commands, String onCommand, String offCommand) setCommandForBinaryState ( BinaryState state, commands, String onCommand, String offCommand) Méthode d'assistance pour ajouter une commande d'exécution ON/OFF à exécuter sur l'appareil. |
void | setGlobalSetting (String key, String value) Exposé pour les tests unitaires |
void | setSecureSetting (String key, String value) Exposé pour les tests unitaires |
static void | setSettingForBinaryState ( BinaryState state, MultiMap <String, String> settingsMap, String setting, String onValue, String offValue) Méthode d'assistance pour ajouter un paramètre ON/OFF à une carte de paramètres. |
void | setSystemSetting (String key, String value) Exposé pour les tests unitaires |
void | setUp ( TestInformation testInfo) |
void | tearDown ( TestInformation testInfo, Throwable e)
|
Méthodes protégées | |
---|---|
void | setAirplaneMode ( BinaryState airplaneMode) Exposé pour les tests unitaires |
void | setAutoRotate ( BinaryState autoRotate) Exposé pour les tests unitaires |
void | setAutoUpdateTime ( BinaryState autoUpdateTime) Exposé pour les tests unitaires |
void | setAutoUpdateTimezone ( BinaryState autoUpdateTimezone) Exposé pour les tests unitaires |
void | setBatterySaver ( BinaryState batterySaver) Exposé pour les tests unitaires |
void | setBatterySaverTrigger (Integer batterySaverTrigger) Exposé pour les tests unitaires |
void | setBluetooth ( BinaryState bluetooth) Exposé pour les tests unitaires |
void | setCell ( BinaryState cell) |
void | setCellAutoSetting ( BinaryState cellAutoSetting) |
void | setData ( BinaryState data) |
void | setDefaultSimData (Integer defaultSimData) Exposé pour les tests unitaires |
void | setDefaultSimSms (Integer defaultSimSms) Exposé pour les tests unitaires |
void | setDefaultSimVoice (Integer defaultSimVoice) Exposé pour les tests unitaires |
void | setDeprecatedAudioSilent (boolean silent) Cette méthode est obsolète. utilisez plutôt |
void | setDeprecatedMinExternalStoreSpace (long storeSpace) Cette méthode est obsolète. utilisez plutôt |
void | setDeprecatedSetProp (String prop) Cette méthode est obsolète. utilisez plutôt |
void | setDisableAudio (boolean disable) Exposé pour les tests unitaires |
void | setDisableCwWifiMediator ( BinaryState disableCwWifiMediator) |
void | setDisableDalvikVerifier (boolean disableDalvikVerifier) Exposé pour les tests unitaires |
void | setDisableDialing (boolean disableDialing) Exposé pour les tests unitaires |
void | setDisableDoze (boolean disableDoze) Exposé pour les tests unitaires |
void | setEnableFullBatteryStatsHistory (boolean enableFullBatteryStatsHistory) Exposé pour les tests unitaires |
void | setEthernet ( BinaryState ethernet) Exposé pour les tests unitaires |
void | setForceSkipSystemProps (boolean force) Exposé pour les tests unitaires |
void | setInstallNonMarketApps ( BinaryState installNonMarketApps) Exposé pour les tests unitaires |
void | setLocalDataPath (File path) Exposé pour les tests unitaires |
void | setLocationGps ( BinaryState locationGps) Exposé pour les tests unitaires |
void | setLocationNetwork ( BinaryState locationNetwork) Exposé pour les tests unitaires |
void | setMinExternalStorageKb (long storageKb) Exposé pour les tests unitaires |
void | setNfc ( BinaryState nfc) Exposé pour les tests unitaires |
void | setNotificationLed ( BinaryState notificationLed) Exposé pour les tests unitaires |
void | setProperty (String key, String value) Exposé pour les tests unitaires |
void | setRestoreProperties (boolean restoreProperties) Exposé pour les tests unitaires |
void | setRestoreSettings (boolean restoreSettings) Exposé pour les tests unitaires |
void | setScreenAdaptiveBrightness ( BinaryState screenAdaptiveBrightness) Exposé pour les tests unitaires |
void | setScreenAlwaysOn ( BinaryState screenAlwaysOn) Exposé pour les tests unitaires |
void | setScreenAmbientMode ( BinaryState screenAmbientMode) Exposé pour les tests unitaires |
void | setScreenBrightness (Integer screenBrightness) Exposé pour les tests unitaires |
void | setScreenSaver ( BinaryState screenSaver) Exposé pour les tests unitaires |
void | setScreenTimeoutSecs (Long screenTimeoutSecs) Exposé pour les tests unitaires |
void | setTestHarness (boolean setTestHarness) Exposé pour les tests unitaires |
void | setTimezone (String timezone) Exposé pour les tests unitaires |
void | setTriggerMediaMounted (boolean triggerMediaMounted) Exposé pour les tests unitaires |
void | setWakeGesture ( BinaryState wakeGesture) Exposé pour les tests unitaires |
void | setWifi ( BinaryState wifi) Exposé pour les tests unitaires |
void | setWifiNetwork (String wifiNetwork) Exposé pour les tests unitaires |
void | setWifiPsk (String wifiPsk) |
void | setWifiScanAlwaysEnabled ( BinaryState wifiScanAlwaysEnabled) Exposé pour les tests unitaires |
void | setWifiSsidToPsk ( wifiSssidToPsk) setWifiSsidToPsk ( wifiSssidToPsk) |
void | setWifiWatchdog ( BinaryState wifiWatchdog) Exposé pour les tests unitaires |
Des champs
mMode Avion
protected BinaryState mAirplaneMode
mRotationAuto
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
mDésactiverAudio
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
mMinExternalStorageKo
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
mLuminosité de l'écran
protected Integer mScreenBrightness
mÉcran de veille
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
mFuseau horaire
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
Constructeurs publics
Configuration de l'appareil
public DeviceSetup ()
Méthodes publiques
modifier les paramètres
public void changeSettings (ITestDevice device)
Modifiez les paramètres de l'appareil.
Exposés afin que les classes d'enfants puissent passer outre.
Paramètres | |
---|---|
device | ITestDevice : Le ITestDevice |
Lance | |
---|---|
DeviceNotAvailableException | si l'appareil n'est pas disponible |
TargetSetupError | s'il y a eu un échec lors de la configuration des paramètres |
getDependencies
publicgetDependencies ()
Retour | |
---|---|
getDevice
public ITestDevice getDevice (TestInformation testInfo)
Paramètres | |
---|---|
testInfo | TestInformation |
Retour | |
---|---|
ITestDevice |
isForceSkipSystemProps
public boolean isForceSkipSystemProps ()
Retour | |
---|---|
boolean |
processDeprecatedOptionsprocessDeprecatedOptions
public void processDeprecatedOptions (ITestDevice device)
Traite les options obsolètes en les convertissant en options actuellement utilisées.
Cette méthode doit être exécutée avant toute autre méthode de traitement. Lancera une TargetSetupError
si l'option obsolète remplace une option non obsolète spécifiée.
Paramètres | |
---|---|
device | ITestDevice |
Lance | |
---|---|
TargetSetupError | s'il y a un conflit |
processusOptions
public void processOptions (ITestDevice device)
Traitez toutes les Option
et transformez-les en accessoires système, paramètres ou commandes d'exécution. N'exécute aucune commande sur l'appareil pour le moment.
Exposé afin que les classes d'enfants puissent annuler cela.
Paramètres | |
---|---|
device | ITestDevice : Le ITestDevice |
Lance | |
---|---|
DeviceNotAvailableException | si l'appareil n'est pas disponible |
TargetSetupError | si l' Option est en conflit |
setCommandForBinaryStatesetCommandForBinaryState
public static void setCommandForBinaryState (BinaryState state,commands, String onCommand, String offCommand)
Méthode d'assistance pour ajouter une commande d'exécution ON/OFF à exécuter sur l'appareil.
Paramètres | |
---|---|
state | BinaryState : l' BinaryState |
commands | |
onCommand | String : La commande à exécuter si ON. Ignoré si la commande est null |
offCommand | String : La commande à exécuter si OFF. Ignoré si la commande est null |
setGlobalSetting
public void setGlobalSetting (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
setSecureSetting
public void setSecureSetting (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
setSettingForBinaryStatesetSettingForBinaryState
public static void setSettingForBinaryState (BinaryState state, MultiMap<String, String> settingsMap, String setting, String onValue, String offValue)
Méthode d'assistance pour ajouter un paramètre ON/OFF à une carte de paramètres.
Paramètres | |
---|---|
state | BinaryState : l' BinaryState |
settingsMap | MultiMap : La MultiMap utilisée pour stocker les paramètres. |
setting | String : La clé de réglage |
onValue | String : La valeur si ON |
offValue | String : La valeur si OFF |
setSystemSetting
public void setSystemSetting (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
installation
public void setUp (TestInformation testInfo)
Paramètres | |
---|---|
testInfo | TestInformation |
Lance | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
démolir
public void tearDown (TestInformation testInfo, Throwable e)
Paramètres | |
---|---|
testInfo | TestInformation |
e | Throwable |
Lance | |
---|---|
DeviceNotAvailableException |
Méthodes protégées
setAirplaneMode
protected void setAirplaneMode (BinaryState airplaneMode)
Exposé pour les tests unitaires
Paramètres | |
---|---|
airplaneMode | BinaryState |
setAutoRotate
protected void setAutoRotate (BinaryState autoRotate)
Exposé pour les tests unitaires
Paramètres | |
---|---|
autoRotate | BinaryState |
setAutoUpdateTime
protected void setAutoUpdateTime (BinaryState autoUpdateTime)
Exposé pour les tests unitaires
Paramètres | |
---|---|
autoUpdateTime | BinaryState |
setAutoUpdateTimezone
protected void setAutoUpdateTimezone (BinaryState autoUpdateTimezone)
Exposé pour les tests unitaires
Paramètres | |
---|---|
autoUpdateTimezone | BinaryState |
setBatterySaver
protected void setBatterySaver (BinaryState batterySaver)
Exposé pour les tests unitaires
Paramètres | |
---|---|
batterySaver | BinaryState |
setBatterySaverTrigger
protected void setBatterySaverTrigger (Integer batterySaverTrigger)
Exposé pour les tests unitaires
Paramètres | |
---|---|
batterySaverTrigger | Integer |
définirBluetooth
protected void setBluetooth (BinaryState bluetooth)
Exposé pour les tests unitaires
Paramètres | |
---|---|
bluetooth | BinaryState |
setCellAutoSetting
protected void setCellAutoSetting (BinaryState cellAutoSetting)
Paramètres | |
---|---|
cellAutoSetting | BinaryState |
setDefaultSimData
protected void setDefaultSimData (Integer defaultSimData)
Exposé pour les tests unitaires
Paramètres | |
---|---|
defaultSimData | Integer |
setDefaultSimSms
protected void setDefaultSimSms (Integer defaultSimSms)
Exposé pour les tests unitaires
Paramètres | |
---|---|
defaultSimSms | Integer |
setDefaultSimVoice
protected void setDefaultSimVoice (Integer defaultSimVoice)
Exposé pour les tests unitaires
Paramètres | |
---|---|
defaultSimVoice | Integer |
setDeprecatedAudioSilent
protected void setDeprecatedAudioSilent (boolean silent)
Cette méthode est obsolète.
utilisez plutôt setDisableAudio(boolean)
.
Exposé pour les tests unitaires
Paramètres | |
---|---|
silent | boolean |
setDeprecatedMinExternalStoreSpace
protected void setDeprecatedMinExternalStoreSpace (long storeSpace)
Cette méthode est obsolète.
utilisez plutôt setMinExternalStorageKb(long)
.
Exposé pour les tests unitaires
Paramètres | |
---|---|
storeSpace | long |
setDeprecatedSetPropsetDeprecatedSetProp
protected void setDeprecatedSetProp (String prop)
Cette méthode est obsolète.
utilisez plutôt setProperty(String, String)
.
Exposé pour les tests unitaires
Paramètres | |
---|---|
prop | String |
setDisableAudio
protected void setDisableAudio (boolean disable)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disable | boolean |
setDisableCwWifiMediator
protected void setDisableCwWifiMediator (BinaryState disableCwWifiMediator)
Paramètres | |
---|---|
disableCwWifiMediator | BinaryState |
setDisableDalvikVerifier
protected void setDisableDalvikVerifier (boolean disableDalvikVerifier)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disableDalvikVerifier | boolean |
setDisableDialing
protected void setDisableDialing (boolean disableDialing)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disableDialing | boolean |
setDisableDoze
protected void setDisableDoze (boolean disableDoze)
Exposé pour les tests unitaires
Paramètres | |
---|---|
disableDoze | boolean |
setEnableFullBatteryStatsHistory
protected void setEnableFullBatteryStatsHistory (boolean enableFullBatteryStatsHistory)
Exposé pour les tests unitaires
Paramètres | |
---|---|
enableFullBatteryStatsHistory | boolean |
setEthernet
protected void setEthernet (BinaryState ethernet)
Exposé pour les tests unitaires
Paramètres | |
---|---|
ethernet | BinaryState |
setForceSkipSystemProps
protected void setForceSkipSystemProps (boolean force)
Exposé pour les tests unitaires
Paramètres | |
---|---|
force | boolean |
setInstallNonMarketApps
protected void setInstallNonMarketApps (BinaryState installNonMarketApps)
Exposé pour les tests unitaires
Paramètres | |
---|---|
installNonMarketApps | BinaryState |
setLocalDataPath
protected void setLocalDataPath (File path)
Exposé pour les tests unitaires
Paramètres | |
---|---|
path | File |
setLocationGps
protected void setLocationGps (BinaryState locationGps)
Exposé pour les tests unitaires
Paramètres | |
---|---|
locationGps | BinaryState |
setLocationNetwork
protected void setLocationNetwork (BinaryState locationNetwork)
Exposé pour les tests unitaires
Paramètres | |
---|---|
locationNetwork | BinaryState |
setMinExternalStorageKb
protected void setMinExternalStorageKb (long storageKb)
Exposé pour les tests unitaires
Paramètres | |
---|---|
storageKb | long |
setNfc
protected void setNfc (BinaryState nfc)
Exposé pour les tests unitaires
Paramètres | |
---|---|
nfc | BinaryState |
setNotificationLed
protected void setNotificationLed (BinaryState notificationLed)
Exposé pour les tests unitaires
Paramètres | |
---|---|
notificationLed | BinaryState |
setProperty
protected void setProperty (String key, String value)
Exposé pour les tests unitaires
Paramètres | |
---|---|
key | String |
value | String |
setRestoreProperties
protected void setRestoreProperties (boolean restoreProperties)
Exposé pour les tests unitaires
Paramètres | |
---|---|
restoreProperties | boolean |
setRestoreSettingssetRestoreSettings
protected void setRestoreSettings (boolean restoreSettings)
Exposé pour les tests unitaires
Paramètres | |
---|---|
restoreSettings | boolean |
setScreenAdaptiveBrightness
protected void setScreenAdaptiveBrightness (BinaryState screenAdaptiveBrightness)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenAdaptiveBrightness | BinaryState |
setScreenAlwaysOn
protected void setScreenAlwaysOn (BinaryState screenAlwaysOn)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenAlwaysOn | BinaryState |
setScreenAmbientModesetScreenAmbientMode
protected void setScreenAmbientMode (BinaryState screenAmbientMode)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenAmbientMode | BinaryState |
setScreenBrightness
protected void setScreenBrightness (Integer screenBrightness)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenBrightness | Integer |
setScreenSaver
protected void setScreenSaver (BinaryState screenSaver)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenSaver | BinaryState |
setScreenTimeoutSecs
protected void setScreenTimeoutSecs (Long screenTimeoutSecs)
Exposé pour les tests unitaires
Paramètres | |
---|---|
screenTimeoutSecs | Long |
setTestHarness
protected void setTestHarness (boolean setTestHarness)
Exposé pour les tests unitaires
Paramètres | |
---|---|
setTestHarness | boolean |
setTimezone
protected void setTimezone (String timezone)
Exposé pour les tests unitaires
Paramètres | |
---|---|
timezone | String |
setTriggerMediaMounted
protected void setTriggerMediaMounted (boolean triggerMediaMounted)
Exposé pour les tests unitaires
Paramètres | |
---|---|
triggerMediaMounted | boolean |
setWakeGesture
protected void setWakeGesture (BinaryState wakeGesture)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wakeGesture | BinaryState |
définirWifi
protected void setWifi (BinaryState wifi)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifi | BinaryState |
setWifiNetwork
protected void setWifiNetwork (String wifiNetwork)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifiNetwork | String |
setWifiPsk
protected void setWifiPsk (String wifiPsk)
Paramètres | |
---|---|
wifiPsk | String |
setWifiScanAlwaysEnabled
protected void setWifiScanAlwaysEnabled (BinaryState wifiScanAlwaysEnabled)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifiScanAlwaysEnabled | BinaryState |
setWifiSsidToPsk
protected void setWifiSsidToPsk (wifiSssidToPsk)
Paramètres | |
---|---|
wifiSssidToPsk |
setWifiWatchdog
protected void setWifiWatchdog (BinaryState wifiWatchdog)
Exposé pour les tests unitaires
Paramètres | |
---|---|
wifiWatchdog | BinaryState |