From 94b916da2ce7b5fb8d87e884fad7132ef3091720 Mon Sep 17 00:00:00 2001 From: Jason Parks Date: Tue, 20 Jul 2010 12:39:07 -0500 Subject: Only print out wake locks in the if the wakelock was held. Change-Id: I742121b70bd0e56ca2efe05fffa9fe3e4ad7b619 --- core/java/android/os/BatteryStats.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index e3f3b87..0afd6cd 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -1237,10 +1237,9 @@ public abstract class BatteryStats implements Parcelable { linePrefix); if (!linePrefix.equals(": ")) { sb.append(" realtime"); - } else { - sb.append(": (nothing executed)"); + // Only print out wake locks that were held + pw.println(sb.toString()); } - pw.println(sb.toString()); } } } @@ -1453,11 +1452,10 @@ public abstract class BatteryStats implements Parcelable { "window", which, linePrefix); if (!linePrefix.equals(": ")) { sb.append(" realtime"); - } else { - sb.append(": (nothing executed)"); + // Only print out wake locks that were held + pw.println(sb.toString()); + uidActivity = true; } - pw.println(sb.toString()); - uidActivity = true; } } -- cgit v1.1