diff options
-rw-r--r-- | service/java/com/android/server/wifi/DummyLogMessage.java | 5 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/LogcatLog.java | 10 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiLog.java | 7 |
3 files changed, 22 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/DummyLogMessage.java b/service/java/com/android/server/wifi/DummyLogMessage.java index 726e44562..7eafcc701 100644 --- a/service/java/com/android/server/wifi/DummyLogMessage.java +++ b/service/java/com/android/server/wifi/DummyLogMessage.java @@ -39,6 +39,11 @@ public class DummyLogMessage implements WifiLog.LogMessage { } @Override + public WifiLog.LogMessage c(boolean value) { + return this; + } + + @Override public void flush() { // Nothing to do. } diff --git a/service/java/com/android/server/wifi/LogcatLog.java b/service/java/com/android/server/wifi/LogcatLog.java index 0bba098a1..ffe89505e 100644 --- a/service/java/com/android/server/wifi/LogcatLog.java +++ b/service/java/com/android/server/wifi/LogcatLog.java @@ -173,6 +173,16 @@ class LogcatLog implements WifiLog { } @Override + public WifiLog.LogMessage c(boolean value) { + copyUntilPlaceholder(); + if (mNextFormatCharPos < mFormat.length()) { + mStringBuilder.append(value); + ++mNextFormatCharPos; + } + return this; + } + + @Override public void flush() { if (mNextFormatCharPos < mFormat.length()) { mStringBuilder.append(mFormat, mNextFormatCharPos, mFormat.length()); diff --git a/service/java/com/android/server/wifi/WifiLog.java b/service/java/com/android/server/wifi/WifiLog.java index 859fec4d9..24dcda67c 100644 --- a/service/java/com/android/server/wifi/WifiLog.java +++ b/service/java/com/android/server/wifi/WifiLog.java @@ -187,6 +187,13 @@ public interface WifiLog { LogMessage c(char value); /** + * Like {@link #c(String) c(String)}, except that the value is a boolean. + */ + @CheckReturnValue + @NonNull + LogMessage c(boolean value); + + /** * Write this LogMessage to the logging daemon. Writing the * message is best effort. More specifically: * 1) The operation is non-blocking. If we’re unable to write |