Merge "APs from old scans should not have RSSI values set." into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
65c00b2f4e
@@ -511,7 +511,10 @@ public class AccessPoint implements Comparable<AccessPoint> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mSeen = seen;
|
// Only replace the previous value if we have a recent scan result to use
|
||||||
|
if (seen != 0) {
|
||||||
|
mSeen = seen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -940,8 +943,10 @@ public class AccessPoint implements Comparable<AccessPoint> {
|
|||||||
security = getSecurity(result);
|
security = getSecurity(result);
|
||||||
if (security == SECURITY_PSK)
|
if (security == SECURITY_PSK)
|
||||||
pskType = getPskType(result);
|
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) {
|
public void saveWifiState(Bundle savedState) {
|
||||||
|
|||||||
Reference in New Issue
Block a user