A partire dal 27 marzo 2025, ti consigliamo di utilizzare android-latest-release
anziché aosp-main
per compilare e contribuire ad AOSP. Per ulteriori informazioni, vedi Modifiche ad AOSP.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
WifiPreparer
public
class
WifiPreparer
extends BaseTargetPreparer
implements
IExternalDependency
Un ITargetPreparer
che configura il Wi-Fi sul dispositivo, se necessario.
A differenza di DeviceSetup
, questo preparatore funziona quando adb non è root, ovvero per le build utente.
Riepilogo
Costruttori pubblici
WifiPreparer
public WifiPreparer ()
Metodi pubblici
getDependencies
public getDependencies ()
public void setUp (TestInformation testInfo)
Parametri |
testInfo |
TestInformation |
public void tearDown (TestInformation testInfo,
Throwable e)
Parametri |
testInfo |
TestInformation |
e |
Throwable |
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-27 UTC."],[],[],null,["# WifiPreparer\n============\n\n\n`\npublic\n\n\nclass\nWifiPreparer\n`\n\n\n`\n\n\n`\n\n`\n\nextends `[BaseTargetPreparer](../../../../../../reference/tradefed/com/android/tradefed/targetprep/BaseTargetPreparer.html)`\n\n\n`\n\n`\n\n\nimplements\n\nIExternalDependency\n\n\n`\n\n|---|---|----------------------------------------------|\n| java.lang.Object |||\n| ↳ | [com.android.tradefed.targetprep.BaseTargetPreparer](../../../../../../reference/tradefed/com/android/tradefed/targetprep/BaseTargetPreparer.html) ||\n| | ↳ | com.android.tradefed.targetprep.WifiPreparer |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA [ITargetPreparer](../../../../../../reference/tradefed/com/android/tradefed/targetprep/ITargetPreparer.html) that configures wifi on the device if necessary.\n\nUnlike [DeviceSetup](../../../../../../reference/tradefed/com/android/tradefed/targetprep/DeviceSetup.html), this preparer works when adb is not root aka user builds.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[WifiPreparer](../../../../../../reference/tradefed/com/android/tradefed/targetprep/WifiPreparer.html#WifiPreparer())`() ` |\n\n| ### Public methods ||\n|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` ` | ` `[getDependencies](../../../../../../reference/tradefed/com/android/tradefed/targetprep/WifiPreparer.html#getDependencies())`() ` |\n| ` void` | ` `[setUp](../../../../../../reference/tradefed/com/android/tradefed/targetprep/WifiPreparer.html#setUp(com.android.tradefed.invoker.TestInformation))`(`[TestInformation](../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html)` testInfo) ` |\n| ` void` | ` `[tearDown](../../../../../../reference/tradefed/com/android/tradefed/targetprep/WifiPreparer.html#tearDown(com.android.tradefed.invoker.TestInformation,%20java.lang.Throwable))`(`[TestInformation](../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html)` testInfo, Throwable e) ` |\n\nPublic constructors\n-------------------\n\n### WifiPreparer\n\n```\npublic WifiPreparer ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getDependencies\n\n```\npublic getDependencies ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |\n\n### setUp\n\n```\npublic void setUp (TestInformation testInfo)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------|\n| `testInfo` | `TestInformation` \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|---|\n| [BuildError](../../../../../../reference/tradefed/com/android/tradefed/targetprep/BuildError.html) | |\n| [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |\n| [TargetSetupError](../../../../../../reference/tradefed/com/android/tradefed/targetprep/TargetSetupError.html) | |\n\n### tearDown\n\n```\npublic void tearDown (TestInformation testInfo, \n Throwable e)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------|\n| `testInfo` | `TestInformation` \u003cbr /\u003e |\n| `e` | `Throwable` \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|---|\n| [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |"]]