diff options
author | xshu <xshu@google.com> | 2020-07-21 19:01:53 -0700 |
---|---|---|
committer | Oscar Shu <xshu@google.com> | 2020-07-29 20:46:18 +0000 |
commit | 6b983b4e0c5a1e4073983e0fda3d3d6a57e9f6a2 (patch) | |
tree | a50ebc14c9709ad99272df3d651880063885040d /service | |
parent | 9b3fb0d1c18c2559c1ad5a7be9de3ad5ce3c12c9 (diff) |
Ringbuffer stops logging after wifi toggle
Fix ringbuffer not updating after wifi is toggled when "Wi-Fi scanning"
is turned on.
Bug: 161307741
Test: atest com.android.server.wifi
Test: manual test
Change-Id: I6b6d3d1b11aaaa407f1cbda4a45c3349805fe43d
Merged-In: I6b6d3d1b11aaaa407f1cbda4a45c3349805fe43d
(cherry picked from commit e05ba2e7cc29ba5c084401a2961a7a4aa93099e8)
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiDiagnostics.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/WifiDiagnostics.java b/service/java/com/android/server/wifi/WifiDiagnostics.java index 6fc75c6ea..38045625e 100644 --- a/service/java/com/android/server/wifi/WifiDiagnostics.java +++ b/service/java/com/android/server/wifi/WifiDiagnostics.java @@ -226,6 +226,10 @@ class WifiDiagnostics extends BaseWifiDiagnostics { if (!mActiveInterfaces.isEmpty()) { return; } + if (mLogLevel != VERBOSE_NO_LOG) { + stopLoggingAllBuffers(); + mRingBuffers = null; + } if (mIsLoggingEventHandlerRegistered) { if (!mWifiNative.resetLogHandler()) { mLog.wC("Fail to reset log handler"); @@ -236,10 +240,6 @@ class WifiDiagnostics extends BaseWifiDiagnostics { // the log handler is in an indeterminate state. mIsLoggingEventHandlerRegistered = false; } - if (mLogLevel != VERBOSE_NO_LOG) { - stopLoggingAllBuffers(); - mRingBuffers = null; - } } @Override |