diff options
author | mukesh agrawal <quiche@google.com> | 2017-03-27 17:19:17 -0700 |
---|---|---|
committer | mukesh agrawal <quiche@google.com> | 2017-03-29 16:05:42 -0700 |
commit | ad71cfd481443b600b06e4421e8971e09fb44de7 (patch) | |
tree | 58a417e604d160e39918a225bf106e525f064b53 /service | |
parent | eb37292950237a906c4220acfc03406db2ef44cb (diff) |
WifiStateMachine: exclude CMD_RSSI_POLL for LogRecs
Due to the frequency with which we execute CMD_RSSI_POLL
(every 3 seconds, when the screen is on), the CMD_RSSI_POLL
LogRecs often crowd out more useful information.
To resolve this problem: don't include CMD_RSSI_POLL
in the log records maintained by StateMachine. But, to
facilitate debugging of CMD_RSSI_POLL issues, _do_
include CMD_RSSI_POLL when verbose logging is enabled.
Ideally, we'd solve this in some other way, so that the
LogRecs include all commands processed by the WifiStateMachine.
My hope is that we don't lose too much relevant information with
this change, because the consumers of the RSSI data do their
own logging.
Bug: 26960649
Test: unit tests
Change-Id: Icea22f9fe23c29cb5d2ad97b10955b74977d5e1a
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index e8d85cd75..ccd1d465a 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -2185,6 +2185,16 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss } } + @Override + protected boolean recordLogRec(Message msg) { + switch (msg.what) { + case CMD_RSSI_POLL: + return mVerboseLoggingEnabled; + default: + return true; + } + } + /** * Return the additional string to be logged by LogRec, default * |