summaryrefslogtreecommitdiff
path: root/core/java/android/util/StatsLog.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/util/StatsLog.java')
-rw-r--r--core/java/android/util/StatsLog.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/core/java/android/util/StatsLog.java b/core/java/android/util/StatsLog.java
index f7077bb2a418..ae9966b7b934 100644
--- a/core/java/android/util/StatsLog.java
+++ b/core/java/android/util/StatsLog.java
@@ -224,12 +224,25 @@ public final class StatsLog extends StatsLogInternal {
/**
* Write an event to stats log using the raw format.
*
- * @param buffer The encoded buffer of data to write..
+ * @param buffer The encoded buffer of data to write.
* @param size The number of bytes from the buffer to write.
* @hide
*/
+ // TODO(b/144935988): Mark deprecated.
@SystemApi
- public static native void writeRaw(@NonNull byte[] buffer, int size);
+ public static void writeRaw(@NonNull byte[] buffer, int size) {
+ // TODO(b/144935988): make this no-op once clients have migrated to StatsEvent.
+ writeImpl(buffer, size, 0);
+ }
+
+ /**
+ * Write an event to stats log using the raw format.
+ *
+ * @param buffer The encoded buffer of data to write.
+ * @param size The number of bytes from the buffer to write.
+ * @param atomId The id of the atom to which the event belongs.
+ */
+ private static native void writeImpl(@NonNull byte[] buffer, int size, int atomId);
private static void enforceDumpCallingPermission(Context context) {
context.enforceCallingPermission(android.Manifest.permission.DUMP, "Need DUMP permission.");