From 41e5b14ee3ba407d8ed1f7ba237d9f49ba23851c Mon Sep 17 00:00:00 2001 From: Lee Shombert Date: Tue, 18 May 2021 08:40:37 -0700 Subject: [PATCH] Fix the brief/full snapshot dumpsys Bug: 188272116 'dumpsys package snapshot' has a brief mode and a full mode. The sense of the flag is backwards in the dump routine. This fixes the flag. Test: Manual test after booting. * 'dumpsys package snapshot' - verify full listing * 'dumpsys package snapshot --full' - verify full listing * 'dumpsys package snapshot --brief' - verify brief listing Change-Id: I8495efc87cec60195a19d16a4aab66609a603389 --- .../core/java/com/android/server/pm/SnapshotStatistics.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/pm/SnapshotStatistics.java b/services/core/java/com/android/server/pm/SnapshotStatistics.java index 7bf00603f1321..95f80de04b820 100644 --- a/services/core/java/com/android/server/pm/SnapshotStatistics.java +++ b/services/core/java/com/android/server/pm/SnapshotStatistics.java @@ -625,7 +625,7 @@ public class SnapshotStatistics { * output. */ public void dump(PrintWriter pw, String indent, long now, int unrecorded, - int corkLevel, boolean full) { + int corkLevel, boolean brief) { // Grab the raw statistics under lock, but print them outside of the lock. Stats[] l; Stats[] s; @@ -639,7 +639,7 @@ public class SnapshotStatistics { unrecorded, corkLevel); pw.println(); dump(pw, indent, now, l, s, "stats"); - if (!full) { + if (brief) { return; } pw.println();