Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdd5f95a authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

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
parent b4918773
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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++;
                    }
                }