Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.
Halaman ini diterjemahkan oleh Cloud Translation API.
Switch to English

WifiHelper

public class WifiHelper
extends Object

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


Kelas pembantu untuk memanipulasi layanan wifi di perangkat.

Ringkasan

Fields

public static final String INSTRUMENTATION_PKG

Konstruktor publik

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

Konstruktor alternatif yang dapat melewati pengaturan apk wifi.

Metode publik

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

Metode pembantu untuk mengekstrak apk util wifi dari 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)

Fields

INSTRUMENTATION_PKG

public static final String INSTRUMENTATION_PKG

Konstruktor publik

WifiHelper

public WifiHelper (ITestDevice device)

Parameter
device ITestDevice

Melempar
DeviceNotAvailableException

WifiHelper

public WifiHelper (ITestDevice device, 
                String wifiUtilApkPath)

Parameter
device ITestDevice

wifiUtilApkPath String

Melempar
DeviceNotAvailableException

WifiHelper

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

Konstruktor alternatif yang dapat melewati pengaturan apk wifi.

Parameter
device ITestDevice

wifiUtilApkPath String

doSetup boolean

Melempar
DeviceNotAvailableException

Metode publik

addOpenNetwork

public boolean addOpenNetwork (String ssid)

Parameter
ssid String

Kembali
boolean

Melempar
DeviceNotAvailableException

addOpenNetwork

public boolean addOpenNetwork (String ssid, 
                boolean scanSsid)

Parameter
ssid String

scanSsid boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

addWpaPskNetwork

public boolean addWpaPskNetwork (String ssid, 
                String psk)

Parameter
ssid String

psk String

Kembali
boolean

Melempar
DeviceNotAvailableException

addWpaPskNetwork

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

Parameter
ssid String

psk String

scanSsid boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

checkConnectivity

public boolean checkConnectivity (String urlToCheck)

Parameter
urlToCheck String

Kembali
boolean

Melempar
DeviceNotAvailableException

membersihkan

public void cleanUp ()

Melempar
DeviceNotAvailableException

connectToNetwork

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

Parameter
ssid String

psk String

urlToCheck String

Kembali
boolean

Melempar
DeviceNotAvailableException

connectToNetwork

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

Parameter
ssid String

psk String

urlToCheck String

scanSsid boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

disableWifi

public boolean disableWifi ()

Kembali
boolean

Melempar
DeviceNotAvailableException

disconnectFromNetwork

public boolean disconnectFromNetwork ()
.dll

Kembali
boolean

Melempar
DeviceNotAvailableException

enableWifi

public boolean enableWifi ()

Kembali
boolean

Melempar
DeviceNotAvailableException

extractWifiUtilApk

public static File extractWifiUtilApk ()

Metode pembantu untuk mengekstrak apk util wifi dari classpath

Kembali
File

getBSSID

public String getBSSID ()

Kembali
String

Melempar
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

Kembali
String

Melempar
DeviceNotAvailableException

getSSID

public String getSSID ()

Kembali
String

Melempar
DeviceNotAvailableException

getWifiInfo

public  getWifiInfo ()

Kembali

Melempar
DeviceNotAvailableException

hasValidIp

public boolean hasValidIp ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

Kembali
boolean

Melempar
DeviceNotAvailableException

removeAllNetworks

public boolean removeAllNetworks ()

Kembali
boolean

Melempar
DeviceNotAvailableException

startMonitor

public boolean startMonitor (long interval, 
                String urlToCheck)

Parameter
interval long

urlToCheck String

Kembali
boolean

Melempar
DeviceNotAvailableException

stopMonitor

public  stopMonitor ()

Kembali

Melempar
DeviceNotAvailableException

waitForIp

public boolean waitForIp (long timeout)

Parameter
timeout long

Kembali
boolean

Melempar
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled (long timeout)

Parameter
timeout long

Kembali
boolean

Melempar
DeviceNotAvailableException

waitForWifiDisabled

public boolean waitForWifiDisabled ()

Kembali
boolean

Melempar
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled (long timeout)

Parameter
timeout long

Kembali
boolean

Melempar
DeviceNotAvailableException

waitForWifiEnabled

public boolean waitForWifiEnabled ()

Kembali
boolean

Melempar
DeviceNotAvailableException

waitForWifiState

public boolean waitForWifiState (WifiState... expectedStates)

Parameter
expectedStates WifiState

Kembali
boolean

Melempar
DeviceNotAvailableException