diff options
author | Randy Pan <zpan@google.com> | 2017-05-11 00:52:33 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-11 00:52:33 +0000 |
commit | 11d3a5ccc9dc19f2908a4e257f280938a2f4d6d2 (patch) | |
tree | 521366e34cdd6ab17292c9c09829a404d21ce4d2 | |
parent | e4c345919566617ed37dd5dcb8e498c43bcf1bd4 (diff) | |
parent | 2cd1b16e18f6ed80b57044141dca449165fb0d2e (diff) |
Merge "SavedNetworkEvaluator: improve logging" into oc-dev
am: 2cd1b16e18
Change-Id: Id27720afb34b82f63a15d85bd52e1c1676299c21
-rw-r--r-- | service/java/com/android/server/wifi/SavedNetworkEvaluator.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java index 5e75fbe8f..d691ee2cf 100644 --- a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java +++ b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java @@ -165,7 +165,8 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat int score = 0; boolean is5GHz = scanResult.is5GHz(); - sbuf.append("[ ").append(scanResult).append("] "); + sbuf.append("[ ").append(scanResult.SSID).append(" ").append(scanResult.BSSID) + .append(" RSSI:").append(scanResult.level).append(" ] "); // Calculate the RSSI score. int rssiSaturationThreshold = is5GHz ? mThresholdSaturatedRssi5 : mThresholdSaturatedRssi24; int rssi = scanResult.level < rssiSaturationThreshold ? scanResult.level @@ -188,7 +189,7 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat if (timeDifference > 0) { int bonus = mLastSelectionAward - (int) (timeDifference / 1000 / 60); score += bonus > 0 ? bonus : 0; - sbuf.append(" User selected it last time ").append(timeDifference / 1000 / 60) + sbuf.append(" User selection ").append(timeDifference / 1000 / 60) .append(" minutes ago, bonus: ").append(bonus).append(","); } } @@ -199,8 +200,7 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat //TODO(b/36788683): re-enable linked configuration check /* || network.isLinked(currentNetwork) */)) { score += mSameNetworkAward; - sbuf.append(" Same network the current one bonus: ") - .append(mSameNetworkAward).append(","); + sbuf.append(" Same network bonus: ").append(mSameNetworkAward).append(","); // When firmware roaming is supported, equivalent BSSIDs (the ones under the // same network as the currently connected one) get the same BSSID award. @@ -215,8 +215,7 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat // Same BSSID award. if (currentBssid != null && currentBssid.equals(scanResult.BSSID)) { score += mSameBssidAward; - sbuf.append(" Same BSSID as the current one bonus: ").append(mSameBssidAward) - .append(","); + sbuf.append(" Same BSSID bonus: ").append(mSameBssidAward).append(","); } // Security award. |