WifiCommandUtil
public
class
WifiCommandUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.WifiCommandUtil |
A utility class that can parse wifi command outputs.
Summary
Nested classes | |
---|---|
class |
WifiCommandUtil.ScanResult
Represents a wifi network containing its related info. |
Fields | |
---|---|
public
static
final
Pattern |
BSSID_PATTERN
|
public
static
final
Pattern |
LINK_SPEED_PATTERN
|
public
static
final
Pattern |
MAC_ADDRESS_PATTERN
|
public
static
final
Pattern |
RSSI_PATTERN
|
public
static
final
Pattern |
SSID_PATTERN
|
Public constructors | |
---|---|
WifiCommandUtil()
|
Public methods | |
---|---|
static
|
parseScanResults(String input)
Parse the `wifi list-scan-results` command output and returns a list of |
static
|
parseWifiInfo(String input)
Parse the 'wifi status' output and returns a map of info about connected wifi network. |
static
String
|
resolveNetworkType(String flags)
Resolves the network type given the flags returned from list-scan-result cmd. |
Fields
BSSID_PATTERN
public static final Pattern BSSID_PATTERN
LINK_SPEED_PATTERN
public static final Pattern LINK_SPEED_PATTERN
MAC_ADDRESS_PATTERN
public static final Pattern MAC_ADDRESS_PATTERN
RSSI_PATTERN
public static final Pattern RSSI_PATTERN
SSID_PATTERN
public static final Pattern SSID_PATTERN
Public constructors
WifiCommandUtil
public WifiCommandUtil ()
Public methods
parseScanResults
public staticparseScanResults (String input)
Parse the `wifi list-scan-results` command output and returns a list of ScanResult
s.
Parameters | |
---|---|
input |
String : Output of the list-scan-results command to parse. |
Returns | |
---|---|
|
List of ScanResult s. |
parseWifiInfo
public staticparseWifiInfo (String input)
Parse the 'wifi status' output and returns a map of info about connected wifi network.
Parameters | |
---|---|
input |
String : Output of the 'wifi status' command to parse. |
Returns | |
---|---|
|
a map of info about the connected network. |
resolveNetworkType
public static String resolveNetworkType (String flags)
Resolves the network type given the flags returned from list-scan-result cmd.
Parameters | |
---|---|
flags |
String |
Returns | |
---|---|
String |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-01-26 UTC.