summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorMeng Wang <mewan@google.com>2020-01-10 14:10:43 -0800
committerandroid-build-merger <android-build-merger@google.com>2020-01-10 14:10:43 -0800
commit9fc52ab1fc19199585b0bb9b0a26aebf75580463 (patch)
tree1a8960b8f6fb51d48f0f0a96ac856fa81956dfbb /core/java/android
parent8c517b7d1f0531c2662505a2b616d986788a5cda (diff)
parent00fe08f5bf1326d2d1a3d315d5323c91a3dd3305 (diff)
Merge "Add a copy of Rlog for the telephony mainline module"
am: 00fe08f5bf Change-Id: I60f6331c85b02409e6a9f359d978a03774eda21f
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/util/Log.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java
index 507790313bc2..0dd7338a5e3e 100644
--- a/core/java/android/util/Log.java
+++ b/core/java/android/util/Log.java
@@ -387,6 +387,25 @@ public final class Log {
public static native int println_native(int bufID, int priority, String tag, String msg);
/**
+ * Send a log message to the "radio" log buffer, which can be dumped with
+ * {@code adb logcat -b radio}.
+ *
+ * <p>Only the telephony mainline module should use it.
+ *
+ * <p>Note ART will protect {@code MODULE_LIBRARIES} system APIs from regular app code.
+ *
+ * @param priority Log priority.
+ * @param tag Used to identify the source of a log message. It usually identifies
+ * the class or activity where the log call occurs.
+ * @param message The message you would like logged.
+ * @hide
+ */
+ public static int logToRadioBuffer(@Level int priority, @Nullable String tag,
+ @Nullable String message) {
+ return println_native(LOG_ID_RADIO, priority, tag, message);
+ }
+
+ /**
* Return the maximum payload the log daemon accepts without truncation.
* @return LOGGER_ENTRY_MAX_PAYLOAD.
*/