WifiCommandUtil

public class WifiCommandUtil
extends Object

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


可解析 Wi-Fi 命令输出的实用程序类。

摘要

嵌套类

class WifiCommandUtil.ScanResult

表示包含相关信息的 WLAN 网络。

公共构造函数

WifiCommandUtil()

公共方法

static List<WifiCommandUtil.ScanResult> parseScanResults(String input)

解析 `wifi list-scan-results` 命令输出,并返回 ScanResult 的列表。

static Map<String, String> parseWifiInfo(String input)

解析“wifi 状态”输出,并返回有关已连接 WLAN 网络的信息映射。

static String resolveNetworkType(String flags)

根据 list-scan-result 命令返回的标志解析网络类型。

公共构造函数

WifiCommandUtil

public WifiCommandUtil ()

公共方法

parseScanResults

public static List<WifiCommandUtil.ScanResult> parseScanResults (String input)

解析 `wifi list-scan-results` 命令输出,并返回 ScanResult 的列表。

参数
input String:要解析的 list-scan-results 命令的输出。

返回
List<WifiCommandUtil.ScanResult> ScanResult 的列表。

parseWifiInfo

public static Map<String, String> parseWifiInfo (String input)

解析“wifi 状态”输出,并返回有关已连接 WLAN 网络的信息映射。

参数
input String:要解析的“wifi 状态”命令的输出。

返回
Map<String, String> 有关已连接网络的信息地图。

resolveNetworkType

public static String resolveNetworkType (String flags)

根据 list-scan-result 命令返回的标志解析网络类型。

参数
flags String

返回值
String