summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/Log.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2017-05-19 10:10:23 -0700
committerTyler Gunn <tgunn@google.com>2017-05-19 10:24:24 -0700
commit2db81b599b342de99fd80001ed1a131b9fc67f6a (patch)
treef0efbfd721a772666ba9a67e868b2e9d0e4d6bf1 /telecomm/java/android/telecom/Log.java
parentd4ae914be27a29b4d764846ec57af9fb9fe4a69e (diff)
Add ability to dump events in a timeline view.
Adding new event dump which shows the events for all call, sorted by time of event. Test: Manual Bug: 38450166 Change-Id: I9fd4ce92bdf62ef48d6940f03db1f2388003e9fc
Diffstat (limited to 'telecomm/java/android/telecom/Log.java')
-rw-r--r--telecomm/java/android/telecom/Log.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Log.java b/telecomm/java/android/telecom/Log.java
index 610789586830..640c9e12079b 100644
--- a/telecomm/java/android/telecom/Log.java
+++ b/telecomm/java/android/telecom/Log.java
@@ -269,6 +269,23 @@ public class Log {
}
/**
+ * Dumps the events in a timeline format.
+ * @param pw The {@link IndentingPrintWriter} to write to.
+ * @hide
+ */
+ public static void dumpEventsTimeline(IndentingPrintWriter pw) {
+ // If the Events logger has not been initialized, then there have been no events logged.
+ // Don't load it now!
+ synchronized (sSingletonSync) {
+ if (sEventManager != null) {
+ getEventManager().dumpEventsTimeline(pw);
+ } else {
+ pw.println("No Historical Events Logged.");
+ }
+ }
+ }
+
+ /**
* Enable or disable extended telecom logging.
*
* @param isExtendedLoggingEnabled {@code true} if extended logging should be enabled,