summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authormukesh agrawal <quiche@google.com>2016-06-23 11:50:59 -0700
committerMukesh Agrawal <quiche@google.com>2016-07-11 23:12:07 +0000
commit20d76f6f2f264cc27a8821e46ad1bd1dc50700e7 (patch)
tree2b710c7858a68024520f929a970385d82f77b7e6 /service
parentd0a7e444a6af85ccaa03e52bcb82de7f66033cfb (diff)
WifiConfigManager: move dumping of LocalLog
The dump() method of WifiConfigManager dumps the LocalLog that's used by WCM. That would make sense, except that the LocalLog that WCM uses isn't actually owned by WCM. Instead, the LocalLog is allocated by WifiNative, and shared by multiple objects. (The sharing is safe, because LocalLog's methods are synchronized.) Since the LocalLog in question is a shared facility, let's move dumping of the LocalLog to WifiLogger. BUG=29424414 TEST=unit tests TEST=manual Manual test $ adb bugreport foo.zip $ unzip foo.zip $ grep 'WifiNative LocalLog' bugreport*.txt -> expect a match Change-Id: I291ac29385472fd0e56fcb522d818dcffcedfe36 (cherry picked from commit 6b42d03b9d92d6167a0629b042b2a3c2e2489a1b)
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java6
-rw-r--r--service/java/com/android/server/wifi/WifiLogger.java5
2 files changed, 5 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index ab3b31484..c1a334a5d 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -2975,11 +2975,7 @@ public class WifiConfigManager {
pw.println(s);
}
}
- if (mLocalLog != null) {
- pw.println("WifiConfigManager - Log Begin ----");
- mLocalLog.dump(fd, pw, args);
- pw.println("WifiConfigManager - Log End ----");
- }
+
if (mMOManager.isConfigured()) {
pw.println("Begin dump of ANQP Cache");
mAnqpCache.dump(pw);
diff --git a/service/java/com/android/server/wifi/WifiLogger.java b/service/java/com/android/server/wifi/WifiLogger.java
index a9a906a29..c15e2a841 100644
--- a/service/java/com/android/server/wifi/WifiLogger.java
+++ b/service/java/com/android/server/wifi/WifiLogger.java
@@ -231,8 +231,11 @@ class WifiLogger extends BaseWifiLogger {
}
dumpPacketFates(pw);
-
pw.println("--------------------------------------------------------------------");
+
+ pw.println("WifiNative - Log Begin ----");
+ mWifiNative.getLocalLog().dump(fd, pw, args);
+ pw.println("WifiNative - Log End ----");
}
/* private methods and data */