Source code

Revision control

Copy as Markdown

Other Tools

From: Michael Froman <mfroman@mozilla.com>
Date: Mon, 3 Aug 2026 13:50:00 -0500
Subject: Bug 2058693 - (fix-42b425a487) revert until we can build jni source
files.
---
rtc_base/java/src/org/webrtc/Logging.java | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/rtc_base/java/src/org/webrtc/Logging.java b/rtc_base/java/src/org/webrtc/Logging.java
index d306ed5da4..fd070dfe6c 100644
--- a/rtc_base/java/src/org/webrtc/Logging.java
+++ b/rtc_base/java/src/org/webrtc/Logging.java
@@ -16,7 +16,6 @@ import java.io.StringWriter;
import java.util.EnumSet;
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.jni_zero.NativeMethods;
import org.webrtc.Loggable;
/**
@@ -67,11 +66,11 @@ public class Logging {
public enum Severity { LS_VERBOSE, LS_INFO, LS_WARNING, LS_ERROR, LS_NONE }
public static void enableLogThreads() {
- LoggingJni.get().enableLogThreads();
+ nativeEnableLogThreads();
}
public static void enableLogTimeStamps() {
- LoggingJni.get().enableLogTimeStamps();
+ nativeEnableLogTimeStamps();
}
// Enable diagnostic logging for messages of `severity` to the platform debug
@@ -85,7 +84,7 @@ public class Logging {
"Logging to native debug output not supported while Loggable is injected. "
+ "Delete the Loggable before calling this method.");
}
- LoggingJni.get().enableLogToDebugOutput(severity.ordinal());
+ nativeEnableLogToDebugOutput(severity.ordinal());
loggingEnabled = true;
}
@@ -105,7 +104,7 @@ public class Logging {
// Try native logging if no loggable is injected.
if (loggingEnabled) {
- LoggingJni.get().log(severity.ordinal(), tag, message);
+ nativeLog(severity.ordinal(), tag, message);
return;
}
@@ -167,14 +166,8 @@ public class Logging {
return sw.toString();
}
- @NativeMethods
- interface Natives {
- void enableLogToDebugOutput(int nativeSeverity);
-
- void enableLogThreads();
-
- void enableLogTimeStamps();
-
- void log(int severity, String tag, String message);
- }
+ private static native void nativeEnableLogToDebugOutput(int nativeSeverity);
+ private static native void nativeEnableLogThreads();
+ private static native void nativeEnableLogTimeStamps();
+ private static native void nativeLog(int severity, String tag, String message);
}