Commit f5c525eb authored by Randy Pan's avatar Randy Pan Committed by The Android Automerger
Browse files

WifiConnectivityManager: partial scan only when connected

Starts partial scan only when Wifi is connected and traffic
is heavy. This is to work around an issue that WifiInfo
tx/rx rate is not updated to reflect the Wifi state. Ideally
the tx/rx rate should have been reset to 0 when Wifi is
disconnected.

Bug: 28831562
Change-Id: Ifa415b14e2b216654ddd8a2a0c885754da489bef
Test: Wifi Framework Unit Tests, manual tests
parent ea0d993f
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment