diff options
author | Michael Plass <mplass@google.com> | 2020-02-18 15:02:20 -0800 |
---|---|---|
committer | Michael Plass <mplass@google.com> | 2020-03-09 15:22:09 -0700 |
commit | fffc50f24d3a0e7f250a91e40e758a4247560b8c (patch) | |
tree | d45ae87e58b265d6f8636c692040993d771c9050 | |
parent | e6813a5870911b10561db2c259c072123c1c513a (diff) |
[WifiConfigManager] Log the disable reason when re-enabling.
A network may have been disabled a long time ago, and re-enabling it
wipes out the reason it was disabled in the first place. This can be
an important clue for diagnosing problems from a bug report, so log the
previous status and reason before re-enabling a network.
Bug: 149238341
Test: atest com.android.server.wifi
Test: manual - check that the logging is present dumpsys output:
adb shell dumpsys wifi | grep -10 '^WifiConfigManager'
Change-Id: Id895918790a58e901b043bf607f83b30df9e8ebc
Merged-In: Id895918790a58e901b043bf607f83b30df9e8ebc
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index a2f10914a..9472367fb 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -1558,6 +1558,12 @@ public class WifiConfigManager { */ private void setNetworkSelectionEnabled(WifiConfiguration config) { NetworkSelectionStatus status = config.getNetworkSelectionStatus(); + if (status.getNetworkSelectionStatus() + != NetworkSelectionStatus.NETWORK_SELECTION_ENABLED) { + localLog("setNetworkSelectionEnabled: configKey=" + config.configKey() + + " old networkStatus=" + status.getNetworkStatusString() + + " disableReason=" + status.getNetworkDisableReasonString()); + } status.setNetworkSelectionStatus( NetworkSelectionStatus.NETWORK_SELECTION_ENABLED); status.setDisableTime( |