public class ApConfigUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_AP_BAND |
static int |
DEFAULT_AP_CHANNEL |
static int |
ERROR_GENERIC |
static int |
ERROR_NO_CHANNEL |
static int |
SUCCESS |
Constructor and Description |
---|
ApConfigUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
chooseApChannel(int apBand,
ArrayList<Integer> allowed2GChannels,
int[] allowed5GFreqList)
Return a channel number for AP setup based on the frequency band.
|
static int |
convertFrequencyToChannel(int frequency)
Convert frequency to channel.
|
static int |
updateApChannelConfig(WifiNative wifiNative,
String countryCode,
ArrayList<Integer> allowed2GChannels,
WifiConfiguration config)
Update AP band and channel based on the provided country code and band.
|
public static final int DEFAULT_AP_BAND
public static final int DEFAULT_AP_CHANNEL
public static final int SUCCESS
public static final int ERROR_NO_CHANNEL
public static final int ERROR_GENERIC
public static int convertFrequencyToChannel(int frequency)
frequency
- frequency to convertpublic static int chooseApChannel(int apBand, ArrayList<Integer> allowed2GChannels, int[] allowed5GFreqList)
apBand
- 0 for 2GHz, 1 for 5GHzallowed2GChannels
- list of allowed 2GHz channelsallowed5GFreqList
- list of allowed 5GHz frequenciespublic static int updateApChannelConfig(WifiNative wifiNative, String countryCode, ArrayList<Integer> allowed2GChannels, WifiConfiguration config)
wifiNative
- reference to WifiNativecountryCode
- country codeallowed2GChannels
- list of allowed 2GHz channelsconfig
- configuration to update