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

Fixes problem with base stations that have multiple SSIDs.

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-08-17 10:09:36 -04:00
parent 6ba7ae1e4c
commit 00717e2d04

View File

@@ -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 {