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. 

Public constructors

WifiCommandUtil()

Public methods

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

Parse the `wifi list-scan-results` command output and returns a list of ScanResults.

static Map<String, String> 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.

Public constructors

WifiCommandUtil

public WifiCommandUtil ()

Public methods

parseScanResults

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

Parse the `wifi list-scan-results` command output and returns a list of ScanResults.

Parameters
input String: Output of the list-scan-results command to parse.

Returns
List<WifiCommandUtil.ScanResult> List of ScanResults.

parseWifiInfo

public static Map<String, String> parseWifiInfo (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
Map<String, String> 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