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

Commit 65c00b2f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "APs from old scans should not have RSSI values set." into oc-dev

parents 215ebb94 24128172
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -511,8 +511,11 @@ public class AccessPoint implements Comparable<AccessPoint> {
            }
        }

        // Only replace the previous value if we have a recent scan result to use
        if (seen != 0) {
            mSeen = seen;
        }
    }

    /**
     * Returns if the network is marked metered. Metering can be marked through its config in
@@ -940,8 +943,10 @@ public class AccessPoint implements Comparable<AccessPoint> {
        security = getSecurity(result);
        if (security == SECURITY_PSK)
            pskType = getPskType(result);
        mRssi = result.level;
        mSeen = result.timestamp;

        mScanResultCache.put(result.BSSID, result);
        updateRssi();
        mSeen = result.timestamp; // even if the timestamp is old it is still valid
    }

    public void saveWifiState(Bundle savedState) {