WifiHelper
public class WifiHelper
extends Object
java.lang.Object |
↳ | com.android.tradefed.device.WifiHelper |
Hilfsklasse zur Manipulation von WLAN-Diensten auf dem Gerät.
Zusammenfassung
Öffentliche Bauträger |
---|
WifiHelper (ITestDevice device) |
WifiHelper (ITestDevice device, String wifiUtilApkPath) |
WifiHelper (ITestDevice device, String wifiUtilApkPath, boolean doSetup) Alternativer Konstruktor, der die Einrichtung der WLAN-Apk überspringen kann. |
Öffentliche Methoden |
---|
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 () Hilfsmethode zum Extrahieren der wifi util apk aus dem Klassenpfad |
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) |
Felder
INSTRUMENTATION_PKG
public static final String INSTRUMENTATION_PKG
Öffentliche Bauträger
WifiHelper
public WifiHelper (ITestDevice device)
Parameter |
---|
device | ITestDevice |
Würfe |
---|
DeviceNotAvailableException | |
WifiHelper
public WifiHelper (ITestDevice device,
String wifiUtilApkPath)
Parameter |
---|
device | ITestDevice |
wifiUtilApkPath | String |
Würfe |
---|
DeviceNotAvailableException | |
WifiHelper
public WifiHelper (ITestDevice device,
String wifiUtilApkPath,
boolean doSetup)
Alternativer Konstruktor, der die Einrichtung der WLAN-Apk überspringen kann.
Parameter |
---|
device | ITestDevice |
wifiUtilApkPath | String |
doSetup | boolean |
Würfe |
---|
DeviceNotAvailableException | |
Öffentliche Methoden
addOpenNetwork
public boolean addOpenNetwork (String ssid)
Würfe |
---|
DeviceNotAvailableException | |
addOpenNetwork
public boolean addOpenNetwork (String ssid,
boolean scanSsid)
Parameter |
---|
ssid | String |
scanSsid | boolean |
Würfe |
---|
DeviceNotAvailableException | |
addWpaPskNetwork
public boolean addWpaPskNetwork (String ssid,
String psk)
Parameter |
---|
ssid | String |
psk | String |
Würfe |
---|
DeviceNotAvailableException | |
addWpaPskNetwork
public boolean addWpaPskNetwork (String ssid,
String psk,
boolean scanSsid)
Parameter |
---|
ssid | String |
psk | String |
scanSsid | boolean |
Würfe |
---|
DeviceNotAvailableException | |
checkConnectivity
public boolean checkConnectivity (String urlToCheck)
Parameter |
---|
urlToCheck | String |
Würfe |
---|
DeviceNotAvailableException | |
Aufräumen
public void cleanUp ()
Würfe |
---|
DeviceNotAvailableException | |
connectToNetwork
public boolean connectToNetwork (String ssid,
String psk,
String urlToCheck)
Parameter |
---|
ssid | String |
psk | String |
urlToCheck | String |
Würfe |
---|
DeviceNotAvailableException | |
connectToNetwork
public boolean connectToNetwork (String ssid,
String psk,
String urlToCheck,
boolean scanSsid)
Parameter |
---|
ssid | String |
psk | String |
urlToCheck | String |
scanSsid | boolean |
Würfe |
---|
DeviceNotAvailableException | |
Deaktiviere WiFi
public boolean disableWifi ()
Würfe |
---|
DeviceNotAvailableException | |
„disconnectFromNetwork“.
public boolean disconnectFromNetwork ()
Würfe |
---|
DeviceNotAvailableException | |
WLAN aktivieren
public boolean enableWifi ()
Würfe |
---|
DeviceNotAvailableException | |
public static File extractWifiUtilApk ()
Hilfsmethode zum Extrahieren der wifi util apk aus dem Klassenpfad
getBSSID
public String getBSSID ()
Würfe |
---|
DeviceNotAvailableException | |
getIpAddress
public String getIpAddress ()
Würfe |
---|
DeviceNotAvailableException | |
getSSID
public String getSSID ()
Würfe |
---|
DeviceNotAvailableException | |
getWifiInfo
public getWifiInfo ()
Würfe |
---|
DeviceNotAvailableException | |
hasValidIp
public boolean hasValidIp ()
Würfe |
---|
DeviceNotAvailableException | |
isWifiEnabled
public boolean isWifiEnabled ()
Würfe |
---|
DeviceNotAvailableException | |
Alle Netzwerke entfernen
public boolean removeAllNetworks ()
Würfe |
---|
DeviceNotAvailableException | |
startMonitor
public boolean startMonitor (long interval,
String urlToCheck)
Parameter |
---|
interval | long |
urlToCheck | String |
Würfe |
---|
DeviceNotAvailableException | |
stopMonitor
public stopMonitor ()
Würfe |
---|
DeviceNotAvailableException | |
waitForIp
public boolean waitForIp (long timeout)
Würfe |
---|
DeviceNotAvailableException | |
waitForWifiDisabled
public boolean waitForWifiDisabled (long timeout)
Würfe |
---|
DeviceNotAvailableException | |
waitForWifiDisabled
public boolean waitForWifiDisabled ()
Würfe |
---|
DeviceNotAvailableException | |
waitForWifiEnabled
public boolean waitForWifiEnabled (long timeout)
Würfe |
---|
DeviceNotAvailableException | |
waitForWifiEnabled
public boolean waitForWifiEnabled ()
Würfe |
---|
DeviceNotAvailableException | |
waitForWifiState
public boolean waitForWifiState (WifiState... expectedStates)
Parameter |
---|
expectedStates | WifiState |
Würfe |
---|
DeviceNotAvailableException | |