WifiHelper

public class WifiHelper
extends Object

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


Klasa pomocnicza do manipulowania usługami Wi-Fi na urządzeniu.

Podsumowanie

Fieldsem

public static final String INSTRUMENTATION_PKG

Konstruktory publiczne

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

Alternatywny konstruktor, który może pominąć konfigurację pliku APK Wi-Fi.

Metody publiczne

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()

Metoda pomocnicza do wyodrębniania pliku APK pakietu narzędzi wifi z ścieżki klas

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)

Fieldsem

INSTRUMENTATION_PKG

public static final String INSTRUMENTATION_PKG

Konstruktory publiczne

WifiHelper

public WifiHelper (ITestDevice device)

Parametry
device ITestDevice

Rzuty
DeviceNotAvailableException

WifiHelper

public WifiHelper (ITestDevice device, 
                String wifiUtilApkPath)

Parametry
device ITestDevice

wifiUtilApkPath String

Rzuty
DeviceNotAvailableException

WifiHelper

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

Alternatywny konstruktor, który może pominąć konfigurację pliku APK Wi-Fi.

Parametry
device ITestDevice

wifiUtilApkPath String

doSetup boolean

Rzuty
DeviceNotAvailableException

Metody publiczne

addOpenNetwork

public boolean addOpenNetwork (String ssid)

Parametry
ssid String

Zwroty
boolean

Rzuty
DeviceNotAvailableException

addOpenNetwork

public boolean addOpenNetwork (String ssid, 
                boolean scanSsid)

Parametry
ssid String

scanSsid boolean

Zwroty
boolean

Rzuty
DeviceNotAvailableException

addWpaPskNetwork

public boolean addWpaPskNetwork (String ssid, 
                String psk)

Parametry
ssid String

psk String

Zwroty
boolean

Rzuty
DeviceNotAvailableException

addWpaPskNetwork

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

Parametry
ssid String

psk String

scanSsid boolean

Zwroty
boolean

Rzuty
DeviceNotAvailableException

checkConnectivity

public boolean checkConnectivity (String urlToCheck)

Parametry
urlToCheck String

Zwroty
boolean

Rzuty
DeviceNotAvailableException

cleanUp

public void cleanUp ()

Rzuty
DeviceNotAvailableException

connectToNetwork

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

Parametry
ssid String

psk String

urlToCheck String

Zwroty
boolean

Rzuty
DeviceNotAvailableException

connectToNetwork

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

Parametry
ssid String

psk String

urlToCheck String

scanSsid boolean

Zwroty
boolean

Rzuty
DeviceNotAvailableException

disableWifi

public boolean disableWifi ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

disconnectFromNetwork

public boolean disconnectFromNetwork ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

enableWifi

public boolean enableWifi ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

extractWifiUtilApk

public static File extractWifiUtilApk ()

Metoda pomocnicza do wyodrębniania pliku APK pakietu narzędzi wifi z ścieżki klas

Zwroty
File

getBSSID

public String getBSSID ()

Zwroty
String

Rzuty
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

Zwroty
String

Rzuty
DeviceNotAvailableException

getSSID

public String getSSID ()

Zwroty
String

Rzuty
DeviceNotAvailableException

getWifiInfo

public  getWifiInfo ()

Zwroty

Rzuty
DeviceNotAvailableException

hasValidIp

public boolean hasValidIp ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

removeAllNetworks

public boolean removeAllNetworks ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

startMonitor

public boolean startMonitor (long interval, 
                String urlToCheck)

Parametry
interval long

urlToCheck String

Zwroty
boolean

Rzuty
DeviceNotAvailableException

stopMonitor

public  stopMonitor ()

Zwroty

Rzuty
DeviceNotAvailableException

waitForIp

public boolean waitForIp (long timeout)

Parametry
timeout long

Zwroty
boolean

Rzuty
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled (long timeout)

Parametry
timeout long

Zwroty
boolean

Rzuty
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled (long timeout)

Parametry
timeout long

Zwroty
boolean

Rzuty
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled ()

Zwroty
boolean

Rzuty
DeviceNotAvailableException

waitForWifiState

public boolean waitForWifiState (WifiState... expectedStates)

Parametry
expectedStates WifiState

Zwroty
boolean

Rzuty
DeviceNotAvailableException