summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorMichael Plass <mplass@google.com>2018-05-21 11:49:44 -0700
committerMichael Plass <mplass@google.com>2018-05-21 13:32:43 -0700
commit1ee61b2af7ff4079416d863dd55b5383d3950f15 (patch)
treea7ec13a66dacc35fabb6fdcb617535f4f8ff16cc /service
parente93744bec9cb63b00b4597d49a20378749634358 (diff)
[WifiScoreReport] Don't report score if RSSI is invalid
Bug: 79338641 Test: Unit tests Change-Id: I392a1c021e34b9d30c53739a9d6a923a38ad00c2
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiScoreReport.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiScoreReport.java b/service/java/com/android/server/wifi/WifiScoreReport.java
index c6a7105be..d4d443bb2 100644
--- a/service/java/com/android/server/wifi/WifiScoreReport.java
+++ b/service/java/com/android/server/wifi/WifiScoreReport.java
@@ -89,6 +89,10 @@ public class WifiScoreReport {
*/
public void calculateAndReportScore(WifiInfo wifiInfo, NetworkAgent networkAgent,
WifiMetrics wifiMetrics) {
+ if (wifiInfo.getRssi() == WifiInfo.INVALID_RSSI) {
+ Log.d(TAG, "Not reporting score because RSSI is invalid");
+ return;
+ }
int score;
long millis = mClock.getWallClockMillis();