Fix #155437855: "dumpsys activity" package filtering doesn't filter everything
Clean up various code paths to correctly use the "packageName" option to
limit its output to only information about that package.
Also do a little re-arranging of the output to cleanup a bit recent
stuff that was added, so the end of the output is still the important
high-level summary of process states.
Bug: 155437855
Test: manually inspected various "dumpsys activity" output.
Change-Id: I2ebe6f7ab3d433281993eb3959d375e2e53e0df9
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 511baa5..6a8d5d9 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -4926,7 +4926,7 @@
boolean printed = ActivityStackSupervisor.printThisActivity(pw,
mRootWindowContainer.getTopResumedActivity(), dumpPackage, needSep,
- " ResumedActivity: ");
+ " ResumedActivity: ", null);
if (printed) {
printedAnything = true;
needSep = false;