Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 413c8855 authored by Jeremy Meyer's avatar Jeremy Meyer
Browse files

Change format of dump resources log headers and footers

Fixes: 219840991
Test: Manual, take a bug report and verify it looks correct
Change-Id: I75538feafbf348b6b15dcc5839ab0bbc031950c3
parent ec3e6791
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -15614,24 +15614,20 @@ public class ActivityManagerService extends IActivityManager.Stub
        }
        for (int i = 0, size = processes.size(); i < size; i++) {
            ProcessRecord app = processes.get(i);
            pw.println(String.format("------ DUMP RESOURCES %s (%s)  ------",
            pw.println(String.format("Resources History for %s (%s)",
                    app.processName,
                    app.info.packageName));
            pw.flush();
            try {
                TransferPipe tp = new TransferPipe();
                TransferPipe tp = new TransferPipe("  ");
                try {
                    IApplicationThread thread = app.getThread();
                    if (thread != null) {
                        app.getThread().dumpResources(tp.getWriteFd(), null);
                        tp.go(fd.getFileDescriptor(), 2000);
                        pw.println(String.format("------ END DUMP RESOURCES %s (%s)  ------",
                                app.processName,
                                app.info.packageName));
                        pw.flush();
                    } else {
                        pw.println(String.format(
                                "------ DUMP RESOURCES %s (%s) failed, no thread ------",
                                "  Resources history for %s (%s) failed, no thread",
                                app.processName,
                                app.info.packageName));
                    }
@@ -15639,11 +15635,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                    tp.kill();
                }
            } catch (IOException e) {
                pw.println(String.format(
                        "------ EXCEPTION DUMPING RESOURCES for %s (%s): %s ------",
                        app.processName,
                        app.info.packageName,
                        e.getMessage()));
                pw.println("  " + e.getMessage());
                pw.flush();
            }