diff options
author | Kai Shi <kaishi@google.com> | 2020-05-21 16:20:52 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-21 16:20:52 +0000 |
commit | 8dddd90021f0d9419a3caf4cd07ba4c5af8746c7 (patch) | |
tree | 457426b936d0be421811e659726bc8b1e5c01474 /service | |
parent | 25ada1ff4b9782d3175a1d5fd93e97a1559bcb84 (diff) | |
parent | 7ac44dcfd673f0408ecfa668bf05dea637bad2a0 (diff) |
Merge "Increase security bonus score to 40 and reduce rssi cap" into rvc-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ScoringParams.java | 2 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/ThroughputScorer.java | 2 | ||||
-rw-r--r-- | service/res/values/config.xml | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/ScoringParams.java b/service/java/com/android/server/wifi/ScoringParams.java index 460cb9c20..f2a318261 100644 --- a/service/java/com/android/server/wifi/ScoringParams.java +++ b/service/java/com/android/server/wifi/ScoringParams.java @@ -91,7 +91,7 @@ public class ScoringParams { public int unmeteredNetworkBonus = 1000; public int currentNetworkBonusMin = 20; public int currentNetworkBonusPercent = 20; - public int secureNetworkBonus = 10; + public int secureNetworkBonus = 40; public int lastSelectionMinutes = 480; public static final int MIN_MINUTES = 1; public static final int MAX_MINUTES = Integer.MAX_VALUE / (60 * 1000); diff --git a/service/java/com/android/server/wifi/ThroughputScorer.java b/service/java/com/android/server/wifi/ThroughputScorer.java index 0371568b6..ed0d0da73 100644 --- a/service/java/com/android/server/wifi/ThroughputScorer.java +++ b/service/java/com/android/server/wifi/ThroughputScorer.java @@ -70,7 +70,7 @@ final class ThroughputScorer implements WifiCandidates.CandidateScorer { * Calculates an individual candidate's score. */ private ScoredCandidate scoreCandidate(Candidate candidate) { - int rssiSaturationThreshold = mScoringParams.getGoodRssi(candidate.getFrequency()); + int rssiSaturationThreshold = mScoringParams.getSufficientRssi(candidate.getFrequency()); int rssi = Math.min(candidate.getScanRssi(), rssiSaturationThreshold); int rssiBaseScore = (rssi + RSSI_SCORE_OFFSET) * RSSI_SCORE_SLOPE_IS_4; diff --git a/service/res/values/config.xml b/service/res/values/config.xml index 635b3ada1..dc2538cbc 100644 --- a/service/res/values/config.xml +++ b/service/res/values/config.xml @@ -101,7 +101,7 @@ <!-- Integer specifying the percent bonus for current network. The percent is applied to the sum of rssi base score and throughput score--> <integer translatable="false" name="config_wifiFrameworkCurrentNetworkBonusPercent">20</integer> - <integer translatable="false" name="config_wifiFrameworkSecureNetworkBonus">10</integer> + <integer translatable="false" name="config_wifiFrameworkSecureNetworkBonus">40</integer> <!-- The duration in minutes to strongly favor the last-selected network over other options. --> <integer translatable="false" name="config_wifiFrameworkLastSelectionMinutes">480</integer> |