Google is committed to advancing racial equity for Black communities. See how.
Questa pagina è stata tradotta dall'API Cloud Translation.
Switch to English

WifiHelper

public class WifiHelper
extends Object

java.lang.Object
com.android.tradefed.device.WifiHelper


Classe di supporto per la manipolazione dei servizi Wi-Fi sul dispositivo.

Sommario

Campi

public static final String INSTRUMENTATION_PKG

Costruttori pubblici

WifiHelper (ITestDevice device)
WifiHelper (ITestDevice device, String wifiUtilApkPath)
WifiHelper (ITestDevice device, String wifiUtilApkPath, boolean doSetup)

Costruttore alternativo che può saltare la configurazione dell'apk wifi.

Metodi pubblici

boolean addOpenNetwork (String ssid)

boolean addOpenNetwork (String ssid, boolean scanSsid)

boolean addWpaPskNetwork (String ssid, String psk)

boolean addWpaPskNetwork (String ssid, String psk, boolean scanSsid)

boolean checkConnectivity (String urlToCheck)

void cleanUp ()

boolean connectToNetwork (String ssid, String psk, String urlToCheck)

boolean connectToNetwork (String ssid, String psk, String urlToCheck, boolean scanSsid)

boolean disableWifi ()

boolean disconnectFromNetwork ()

boolean enableWifi ()

static File extractWifiUtilApk ()

Metodo di supporto per estrarre l'apk util wifi dal classpath

String getBSSID ()

String getIpAddress ()

String getSSID ()

getWifiInfo ()

boolean hasValidIp ()

boolean isWifiEnabled ()

boolean removeAllNetworks ()

boolean startMonitor (long interval, String urlToCheck)

stopMonitor ()

boolean waitForIp (long timeout)

boolean waitForWifiDisabled (long timeout)
boolean waitForWifiDisabled ()

boolean waitForWifiEnabled (long timeout)
boolean waitForWifiEnabled ()

boolean waitForWifiState (WifiState... expectedStates)

Campi

INSTRUMENTATION_PKG

public static final String INSTRUMENTATION_PKG

Costruttori pubblici

WifiHelper

public WifiHelper (ITestDevice device)

Parametri
device ITestDevice

Lancia
DeviceNotAvailableException

WifiHelper

public WifiHelper (ITestDevice device, 
                String wifiUtilApkPath)

Parametri
device ITestDevice

wifiUtilApkPath String

Lancia
DeviceNotAvailableException

WifiHelper

public WifiHelper (ITestDevice device, 
                String wifiUtilApkPath, 
                boolean doSetup)

Costruttore alternativo che può saltare la configurazione dell'apk wifi.

Parametri
device ITestDevice

wifiUtilApkPath String

doSetup boolean

Lancia
DeviceNotAvailableException

Metodi pubblici

addOpenNetwork

public boolean addOpenNetwork (String ssid)

Parametri
ssid String

ritorna
boolean

Lancia
DeviceNotAvailableException

addOpenNetwork

public boolean addOpenNetwork (String ssid, 
                boolean scanSsid)

Parametri
ssid String

scanSsid boolean

ritorna
boolean

Lancia
DeviceNotAvailableException

addWpaPskNetwork

public boolean addWpaPskNetwork (String ssid, 
                String psk)

Parametri
ssid String

psk String

ritorna
boolean

Lancia
DeviceNotAvailableException

addWpaPskNetwork

public boolean addWpaPskNetwork (String ssid, 
                String psk, 
                boolean scanSsid)

Parametri
ssid String

psk String

scanSsid boolean

ritorna
boolean

Lancia
DeviceNotAvailableException

checkConnettività

public boolean checkConnectivity (String urlToCheck)

Parametri
urlToCheck String

ritorna
boolean

Lancia
DeviceNotAvailableException

pulire

public void cleanUp ()

Lancia
DeviceNotAvailableException

connectToNetwork

public boolean connectToNetwork (String ssid, 
                String psk, 
                String urlToCheck)

Parametri
ssid String

psk String

urlToCheck String

ritorna
boolean

Lancia
DeviceNotAvailableException

connectToNetwork

public boolean connectToNetwork (String ssid, 
                String psk, 
                String urlToCheck, 
                boolean scanSsid)

Parametri
ssid String

psk String

urlToCheck String

scanSsid boolean

ritorna
boolean

Lancia
DeviceNotAvailableException

disableWifi

public boolean disableWifi ()

ritorna
boolean

Lancia
DeviceNotAvailableException

disconnectFromNetwork

public boolean disconnectFromNetwork ()

ritorna
boolean

Lancia
DeviceNotAvailableException

enableWifi

public boolean enableWifi ()

ritorna
boolean

Lancia
DeviceNotAvailableException

extractWifiUtilApk

public static File extractWifiUtilApk ()

Metodo di supporto per estrarre l'apk util wifi dal classpath

ritorna
File

getBSSID

public String getBSSID ()

ritorna
String

Lancia
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

ritorna
String

Lancia
DeviceNotAvailableException

getSSID

public String getSSID ()

ritorna
String

Lancia
DeviceNotAvailableException

getWifiInfo

public  getWifiInfo ()

ritorna

Lancia
DeviceNotAvailableException

hasValidIp

public boolean hasValidIp ()

ritorna
boolean

Lancia
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

ritorna
boolean

Lancia
DeviceNotAvailableException

removeAllNetworks

public boolean removeAllNetworks ()

ritorna
boolean

Lancia
DeviceNotAvailableException

startMonitor

public boolean startMonitor (long interval, 
                String urlToCheck)

Parametri
interval long

urlToCheck String

ritorna
boolean

Lancia
DeviceNotAvailableException

stopMonitor

public  stopMonitor ()

ritorna

Lancia
DeviceNotAvailableException

waitForIp

public boolean waitForIp (long timeout)

Parametri
timeout long

ritorna
boolean

Lancia
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled (long timeout)

Parametri
timeout long

ritorna
boolean

Lancia
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled ()

ritorna
boolean

Lancia
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled (long timeout)

Parametri
timeout long

ritorna
boolean

Lancia
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled ()

ritorna
boolean

Lancia
DeviceNotAvailableException

waitForWifiState

public boolean waitForWifiState (WifiState... expectedStates)

Parametri
expectedStates WifiState

ritorna
boolean

Lancia
DeviceNotAvailableException