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

Commit 1af397c9 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Revert "Close print writers"

This reverts commit 390b2423.

The reverted change closed the output PrintWriter too early
and led to truncated dumps.

Bug: 74423421
Change-Id: I62902f2aa20be460b6dec42e811b21bf953fcfe3
Test: manual
parent 390b2423
Loading
Loading
Loading
Loading
+64 −68
Original line number Diff line number Diff line
@@ -18751,7 +18751,7 @@ public class PackageManagerService extends IPackageManager.Stub
        return true;
    }
    private static final class ClearStorageConnection implements ServiceConnection {
    private final class ClearStorageConnection implements ServiceConnection {
        IMediaContainerService mContainerService;
        @Override
@@ -21462,7 +21462,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
                // the given package is involved with.
                if (dumpState.onTitlePrinted()) pw.println();
                try (final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ", 120)) {
                final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ", 120);
                ipw.println();
                ipw.println("Frozen packages:");
                ipw.increaseIndent();
@@ -21475,12 +21475,11 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
                }
                ipw.decreaseIndent();
            }
            }
            if (!checkin && dumpState.isDumping(DumpState.DUMP_VOLUMES) && packageName == null) {
                if (dumpState.onTitlePrinted()) pw.println();
                try (final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ", 120)) {
                final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ", 120);
                ipw.println();
                ipw.println("Loaded volumes:");
                ipw.increaseIndent();
@@ -21493,7 +21492,6 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
                }
                ipw.decreaseIndent();
            }
            }
            if (!checkin && dumpState.isDumping(DumpState.DUMP_SERVICE_PERMISSIONS)
                    && packageName == null) {
@@ -21621,7 +21619,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
    }
    private void dumpDexoptStateLPr(PrintWriter pw, String packageName) {
        try (final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ")) {
        final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ");
        ipw.println();
        ipw.println("Dexopt state:");
        ipw.increaseIndent();
@@ -21646,10 +21644,9 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
            ipw.decreaseIndent();
        }
    }
    }
    private void dumpCompilerStatsLPr(PrintWriter pw, String packageName) {
        try (final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ")) {
        final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, "  ");
        ipw.println();
        ipw.println("Compiler stats:");
        ipw.increaseIndent();
@@ -21679,7 +21676,6 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
            ipw.decreaseIndent();
        }
    }
    }
    private String dumpDomainString(String packageName) {
        List<IntentFilterVerificationInfo> iviList = getIntentFilterVerifications(packageName)