DO NOT MERGE Push event logging down into libcore.EventLogger
This changes the default behavior of the EventLogger from logging
to the normal logs to logging to the event logs.
Change-Id: I4338a1605928b82246a369adb3514bd31cd552e8
Conflicts:
core/java/android/app/ActivityThread.java
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 812ac9e..1cd5fa2 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -109,6 +109,7 @@
import java.util.TimeZone;
import java.util.regex.Pattern;
+import libcore.io.EventLogger;
import libcore.io.IoUtils;
import dalvik.system.CloseGuard;
@@ -4870,6 +4871,13 @@
}
}
+ private static class EventLoggingReporter implements EventLogger.Reporter {
+ @Override
+ public void report (int code, Object... list) {
+ EventLog.writeEvent(code, list);
+ }
+ }
+
public static void main(String[] args) {
SamplingProfilerIntegration.start();
@@ -4880,6 +4888,9 @@
Environment.initForCurrentUser();
+ // Set the reporter for event logging in libcore
+ EventLogger.setReporter(new EventLoggingReporter());
+
Security.addProvider(new AndroidKeyStoreProvider());
Process.setArgV0("<pre-initialized>");