summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2020-04-22 22:10:02 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-04-22 22:10:02 +0000
commit9b771f4641364dfdcfd6119306bf4fec40d5092a (patch)
tree4f89986b151aee0edf0c7cac267a833959ab7455
parent4afe56ecdda5a95f78c904677ac3421bd0aef778 (diff)
parent3c8a4edc74f6b8f09321a7d05d8fc649339a15f8 (diff)
Merge "wifi: allow WifiConnectivityManager logging via enableVerboseLogging()." into rvc-dev am: 3c8a4edc74
Change-Id: If6a4ffcef855064f4e47b256dd730160665b2b1e
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java1
-rw-r--r--service/java/com/android/server/wifi/WifiConnectivityManager.java9
2 files changed, 10 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index 00e02df4a..48dedc29d 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -1195,6 +1195,7 @@ public class ClientModeImpl extends StateMachine {
mWifiHealthMonitor.enableVerboseLogging(mVerboseLoggingEnabled);
mWifiInjector.getThroughputPredictor().enableVerboseLogging(mVerboseLoggingEnabled);
mWifiDataStall.enableVerboseLogging(mVerboseLoggingEnabled);
+ mWifiConnectivityManager.enableVerboseLogging(mVerboseLoggingEnabled);
}
/**
diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java
index 7178a0a5c..9148e3a9e 100644
--- a/service/java/com/android/server/wifi/WifiConnectivityManager.java
+++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java
@@ -165,6 +165,7 @@ public class WifiConnectivityManager {
private WifiScoreCard mWifiScoreCard;
private boolean mDbg = false;
+ private boolean mVerboseLoggingEnabled = false;
private boolean mWifiEnabled = false;
private boolean mAutoJoinEnabled = false; // disabled by default, enabled by external triggers
private boolean mRunning = false;
@@ -219,6 +220,14 @@ public class WifiConnectivityManager {
// be retrieved in bugreport.
private void localLog(String log) {
mLocalLog.log(log);
+ if (mVerboseLoggingEnabled) Log.v(TAG, log);
+ }
+
+ /**
+ * Enable verbose logging for WifiConnectivityManager.
+ */
+ public void enableVerboseLogging(boolean verbose) {
+ mVerboseLoggingEnabled = verbose;
}
// A periodic/PNO scan will be rescheduled up to MAX_SCAN_RESTART_ALLOWED times