Update scanresult capability check

Scan results now have [ESS], [IBSS] & [P2P] to represent an
access point, ad-hoc network & p2p network.

Fix open network check.

Bug: 4998496
Change-Id: I0bf3f168677b0cd8cb27297427b539e768210995
This commit is contained in:
Irfan Sheriff
2011-08-04 16:55:54 -07:00
parent b491877331
commit fdd5f95a81

View File

@ -1592,7 +1592,10 @@ public class WifiService extends IWifiManager.Stub {
for (int i = scanResults.size() - 1; i >= 0; i--) {
ScanResult scanResult = scanResults.get(i);
if (TextUtils.isEmpty(scanResult.capabilities)) {
//A capability of [ESS] represents an open access point
//that is available for an STA to connect
if (scanResult.capabilities != null &&
scanResult.capabilities.equals("[ESS]")) {
numOpenNetworks++;
}
}