public class WifiQualifiedNetworkSelector extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BAND_AWARD_5GHz |
static int |
BSSID_BLACKLIST_EXPIRE_TIME |
static int |
BSSID_BLACKLIST_THRESHOLD |
static int |
LAST_SELECTION_AWARD |
static int |
MINIMUM_2G_ACCEPT_RSSI |
static int |
MINIMUM_5G_ACCEPT_RSSI |
static int |
PASSPOINT_SECURITY_AWARD |
static int |
QUALIFIED_RSSI_24G_BAND |
static int |
QUALIFIED_RSSI_5G_BAND |
static int |
RSSI_SATURATION_2G_BAND |
static int |
RSSI_SATURATION_5G_BAND |
static int |
RSSI_SCORE_OFFSET |
static int |
RSSI_SCORE_SLOPE |
static int |
SAME_BSSID_AWARD |
static int |
SAME_NETWORK_AWARD |
static int |
SCAN_RESULT_MAXIMUNM_AGE |
static int |
SECURITY_AWARD |
Modifier and Type | Method and Description |
---|---|
boolean |
enableBssidForQualityNetworkSelection(String bssid,
boolean enable)
enable/disable a BSSID for Quality Network Selection
When an association rejection event is obtained, Quality Network Selector will disable this
BSSID but supplicant still can try to connect to this bssid.
|
WifiConfiguration |
getConnetionTargetNetwork() |
List<Pair<ScanDetail,WifiConfiguration>> |
getFilteredScanDetails() |
boolean |
isBssidDisabled(String bssid)
Check whether a bssid is disabled
|
WifiConfiguration |
selectQualifiedNetwork(boolean forceSelectNetwork,
boolean isUntrustedConnectionsAllowed,
List<ScanDetail> scanDetails,
boolean isLinkDebouncing,
boolean isConnected,
boolean isDisconnected,
boolean isSupplicantTransient)
ToDo: This should be called in Connectivity Manager when it gets new scan result
check whether a network slection is needed.
|
void |
setUserPreferredBand(int band)
set the user selected preferred band
|
boolean |
userSelectNetwork(int netId,
boolean persist)
This API is called when user explicitly select a network.
|
public static final int QUALIFIED_RSSI_24G_BAND
public static final int QUALIFIED_RSSI_5G_BAND
public static final int RSSI_SATURATION_2G_BAND
public static final int RSSI_SATURATION_5G_BAND
public static final int MINIMUM_2G_ACCEPT_RSSI
public static final int MINIMUM_5G_ACCEPT_RSSI
public static final int RSSI_SCORE_SLOPE
public static final int RSSI_SCORE_OFFSET
public static final int BAND_AWARD_5GHz
public static final int SAME_NETWORK_AWARD
public static final int SAME_BSSID_AWARD
public static final int LAST_SELECTION_AWARD
public static final int PASSPOINT_SECURITY_AWARD
public static final int SECURITY_AWARD
public static final int BSSID_BLACKLIST_THRESHOLD
public static final int BSSID_BLACKLIST_EXPIRE_TIME
public static final int SCAN_RESULT_MAXIMUNM_AGE
public WifiConfiguration getConnetionTargetNetwork()
public List<Pair<ScanDetail,WifiConfiguration>> getFilteredScanDetails()
public void setUserPreferredBand(int band)
band
- preferred band user selectedpublic boolean userSelectNetwork(int netId, boolean persist)
netId
- new network ID for either the network the user choose or addpersist
- whether user has the authority to overwrite current connect choicepublic boolean enableBssidForQualityNetworkSelection(String bssid, boolean enable)
bssid
- the bssid to be enabled / disabledenable
- -- true enable a bssid if it has been disabled
-- false disable a bssidpublic boolean isBssidDisabled(String bssid)
bssid
- -- the bssid to checkpublic WifiConfiguration selectQualifiedNetwork(boolean forceSelectNetwork, boolean isUntrustedConnectionsAllowed, List<ScanDetail> scanDetails, boolean isLinkDebouncing, boolean isConnected, boolean isDisconnected, boolean isSupplicantTransient)
forceSelectNetwork
- true -- start a qualified network selection anyway,no matter
current network is already qualified or not.
false -- if current network is already qualified, do not do new
selectionisUntrustedConnectionsAllowed
- true -- user allow to connect to untrusted network
false -- user do not allow to connect to untrusted
networkscanDetails
- latest scan result obtained (should be connectivity scan only)isLinkDebouncing
- true -- Link layer is under debouncing
false -- Link layer is not under debouncingisConnected
- true -- device is connected to an AP currently
false -- device is not connected to an AP currentlyisDisconnected
- true -- WifiStateMachine is at disconnected state
false -- WifiStateMachine is not at disconnected stateisSupplicantTransient
- true -- supplicant is in a transient state
false -- supplicant is not in a transient state