From 1e01d16982e6b22ec4c0e2d6dc1e261eb6f92c8e Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 4 Dec 2014 17:46:42 -0800 Subject: Fix issue #17323751: Additional items in aggregated battery stats - Now aggregate number of times each process has crashed and ANRed. - Now aggregate total number of connectivity changes. - Now record connectivity changes in the history. Crash and ANR counts are new entries at the end of "pr" in checkin. Connectivity change counts is a new entry at the end of "m" in checkin. Connectivity changes in the history checkin are Ecn and include the type of connection and its state. Change-Id: I0c01186446034cf6c3fb97d45f5e3b5c69a0438a --- core/java/android/util/Log.java | 5 +++++ core/java/android/util/Slog.java | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'core/java/android/util') diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java index a9b3571..121485a 100644 --- a/core/java/android/util/Log.java +++ b/core/java/android/util/Log.java @@ -295,6 +295,11 @@ public final class Log { return bytes; } + static void wtfQuiet(int logId, String tag, String msg, boolean system) { + TerribleFailure what = new TerribleFailure(msg, null); + sWtfHandler.onTerribleFailure(tag, what, system); + } + /** * Sets the terrible failure handler, for testing. * diff --git a/core/java/android/util/Slog.java b/core/java/android/util/Slog.java index e92b846..58a2703 100644 --- a/core/java/android/util/Slog.java +++ b/core/java/android/util/Slog.java @@ -83,6 +83,13 @@ public final class Slog { } /** + * Like {@link #wtf(String, String)}, but does not output anything to the log. + */ + public static void wtfQuiet(String tag, String msg) { + Log.wtfQuiet(Log.LOG_ID_SYSTEM, tag, msg, true); + } + + /** * Like {@link Log#wtfStack(String, String)}, but will never cause the caller to crash, and * will always be handled asynchronously. Primarily for use by coding running within * the system process. -- cgit v1.1