summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConnectivityManager.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java
index 8200ef633..dd182dd16 100644
--- a/service/java/com/android/server/wifi/WifiConnectivityManager.java
+++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java
@@ -663,10 +663,11 @@ public class WifiConnectivityManager {
boolean isFullBandScan = true;
// If the WiFi traffic is heavy, only partial scan is initiated.
- if (mWifiInfo.txSuccessRate
- > mConfigManager.MAX_TX_PACKET_FOR_FULL_SCANS
- || mWifiInfo.rxSuccessRate
- > mConfigManager.MAX_RX_PACKET_FOR_FULL_SCANS) {
+ if (mWifiState == WIFI_STATE_CONNECTED
+ && (mWifiInfo.txSuccessRate
+ > mConfigManager.MAX_TX_PACKET_FOR_FULL_SCANS
+ || mWifiInfo.rxSuccessRate
+ > mConfigManager.MAX_RX_PACKET_FOR_FULL_SCANS)) {
localLog("No full band scan due to heavy traffic, txSuccessRate="
+ mWifiInfo.txSuccessRate + " rxSuccessRate="
+ mWifiInfo.rxSuccessRate);