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

Commit 1a645058 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

WifiService: Update all scan result values in our scan result cache.



Previously only the level was being updated, resulting in out of date values
being left in the cache.
Patch was provided by Motorola.

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 2383415a
Loading
Loading
Loading
Loading
+31 −28
Original line number Diff line number Diff line
@@ -1349,11 +1349,6 @@ public class WifiService extends IWifiManager.Stub {
                        level = 0;
                    }

                    // bssid is the hash key
                    scanResult = mScanResultCache.get(bssid);
                    if (scanResult != null) {
                        scanResult.level = level;
                    } else {
                    /*
                     * The formatting of the results returned by
                     * wpa_supplicant is intended to make the fields
@@ -1382,6 +1377,14 @@ public class WifiService extends IWifiManager.Stub {
                        ssid = "";
                    }

                    // bssid is the hash key
                    scanResult = mScanResultCache.get(bssid);
                    if (scanResult != null) {
                        scanResult.level = level;
                        scanResult.SSID = ssid;
                        scanResult.capabilities = flags;
                        scanResult.frequency = frequency;
                    } else {
                        // Do not add scan results that have no SSID set
                        if (0 < ssid.trim().length()) {
                            scanResult =