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

Commit 00717e2d authored by Mike Lockwood's avatar Mike Lockwood
Browse files

WifiService: Hash based on both SSID and BSSID in scan result cache.



Fixes problem with base stations that have multiple SSIDs.

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 6ba7ae1e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1209,8 +1209,9 @@ public class WifiService extends IWifiManager.Stub {
                        ssid = "";
                    }

                    // bssid is the hash key
                    scanResult = mScanResultCache.get(bssid);
                    // bssid + ssid is the hash key
                    String key = bssid + ssid;
                    scanResult = mScanResultCache.get(key);
                    if (scanResult != null) {
                        scanResult.level = level;
                        scanResult.SSID = ssid;
@@ -1222,7 +1223,7 @@ public class WifiService extends IWifiManager.Stub {
                            scanResult =
                                new ScanResult(
                                    ssid, bssid, flags, level, frequency);
                            mScanResultCache.put(bssid, scanResult);
                            mScanResultCache.put(key, scanResult);
                        }
                    }
                } else {