1 2 package com.android.server.wifi; 3 4 import java.io.FileDescriptor; 5 import java.io.PrintWriter; 6 7 /** 8 * 9 */ 10 public class BaseWifiLogger { 11 12 protected String mFirmwareVersion; 13 protected String mDriverVersion; 14 protected int mSupportedFeatureSet; 15 BaseWifiLogger()16 public BaseWifiLogger() { } 17 startLogging(boolean verboseEnabled)18 public synchronized void startLogging(boolean verboseEnabled) { 19 WifiNative wifiNative = WifiNative.getWlanNativeInterface(); 20 mFirmwareVersion = wifiNative.getFirmwareVersion(); 21 mDriverVersion = wifiNative.getDriverVersion(); 22 mSupportedFeatureSet = wifiNative.getSupportedLoggerFeatureSet(); 23 } 24 startPacketLog()25 public synchronized void startPacketLog() { } 26 stopPacketLog()27 public synchronized void stopPacketLog() { } 28 stopLogging()29 public synchronized void stopLogging() { } 30 reportConnectionFailure()31 synchronized void reportConnectionFailure() {} 32 captureBugReportData(int reason)33 public synchronized void captureBugReportData(int reason) { } 34 captureAlertData(int errorCode, byte[] alertData)35 public synchronized void captureAlertData(int errorCode, byte[] alertData) { } 36 dump(FileDescriptor fd, PrintWriter pw, String[] args)37 public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) { 38 dump(pw); 39 pw.println("*** firmware logging disabled, no debug data ****"); 40 pw.println("set config_wifi_enable_wifi_firmware_debugging to enable"); 41 } 42 dump(PrintWriter pw)43 protected synchronized void dump(PrintWriter pw) { 44 pw.println("Chipset information :-----------------------------------------------"); 45 pw.println("FW Version is: " + mFirmwareVersion); 46 pw.println("Driver Version is: " + mDriverVersion); 47 pw.println("Supported Feature set: " + mSupportedFeatureSet); 48 } 49 }