Google致力於提高黑人社區的種族平等。 怎麼看。
本頁面由 Cloud Translation API 翻譯而成。
Switch to English

Wifi助手

public class WifiHelper
extends Object

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


用於在設備上操縱wifi服務的Helper類。

摘要

領域

public static final String INSTRUMENTATION_PKG

公共建設者

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

可以跳過wifi apk設置的替代構造函數。

公開方法

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

從類路徑中提取wifi util apk的輔助方法

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)

領域

INSTRUMENTATION_PKG

public static final String INSTRUMENTATION_PKG

公共建設者

Wifi助手

public WifiHelper ( ITestDevice device)

參量
device ITestDevice

投擲
DeviceNotAvailableException

Wifi助手

public WifiHelper ( ITestDevice device, 
                String wifiUtilApkPath)

參量
device ITestDevice

wifiUtilApkPath String

投擲
DeviceNotAvailableException

Wifi助手

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

可以跳過wifi apk設置的替代構造函數。

參量
device ITestDevice

wifiUtilApkPath String

doSetup boolean

投擲
DeviceNotAvailableException

公開方法

addOpenNetwork

public boolean addOpenNetwork (String ssid)

參量
ssid String

退貨
boolean

投擲
DeviceNotAvailableException

addOpenNetwork

public boolean addOpenNetwork (String ssid, 
                boolean scanSsid)

參量
ssid String

scanSsid boolean

退貨
boolean

投擲
DeviceNotAvailableException

addWpaPskNetwork

public boolean addWpaPskNetwork (String ssid, 
                String psk)

參量
ssid String

psk String

退貨
boolean

投擲
DeviceNotAvailableException

addWpaPskNetwork

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

參量
ssid String

psk String

scanSsid boolean

退貨
boolean

投擲
DeviceNotAvailableException

checkConnectivity

public boolean checkConnectivity (String urlToCheck)

參量
urlToCheck String

退貨
boolean

投擲
DeviceNotAvailableException

清理

public void cleanUp ()

投擲
DeviceNotAvailableException

connectToNetwork

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

參量
ssid String

psk String

urlToCheck String

退貨
boolean

投擲
DeviceNotAvailableException

connectToNetwork

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

參量
ssid String

psk String

urlToCheck String

scanSsid boolean

退貨
boolean

投擲
DeviceNotAvailableException

禁用WiFi

public boolean disableWifi ()

退貨
boolean

投擲
DeviceNotAvailableException

從網絡斷開

public boolean disconnectFromNetwork ()

退貨
boolean

投擲
DeviceNotAvailableException

enableWifi

public boolean enableWifi ()

退貨
boolean

投擲
DeviceNotAvailableException

extractWifiUtilApk

public static File extractWifiUtilApk ()

從類路徑中提取wifi util apk的輔助方法

退貨
File

getBSSID

public String getBSSID ()

退貨
String

投擲
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

退貨
String

投擲
DeviceNotAvailableException

getSSID

public String getSSID ()

退貨
String

投擲
DeviceNotAvailableException

getWifiInfo

public  getWifiInfo ()

退貨

投擲
DeviceNotAvailableException

hasValidIp

public boolean hasValidIp ()

退貨
boolean

投擲
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

退貨
boolean

投擲
DeviceNotAvailableException

removeAllNetworks

public boolean removeAllNetworks ()

退貨
boolean

投擲
DeviceNotAvailableException

startMonitor

public boolean startMonitor (long interval, 
                String urlToCheck)

參量
interval long

urlToCheck String

退貨
boolean

投擲
DeviceNotAvailableException

stopMonitor

public  stopMonitor ()

退貨

投擲
DeviceNotAvailableException

waitForIp

public boolean waitForIp (long timeout)

參量
timeout long

退貨
boolean

投擲
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled (long timeout)

參量
timeout long

退貨
boolean

投擲
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled ()

退貨
boolean

投擲
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled (long timeout)

參量
timeout long

退貨
boolean

投擲
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled ()

退貨
boolean

投擲
DeviceNotAvailableException

waitForWifiState

public boolean waitForWifiState (WifiState... expectedStates)

參量
expectedStates WifiState

退貨
boolean

投擲
DeviceNotAvailableException