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

Commit 7cba1ea4 authored by Richard Gaywood's avatar Richard Gaywood Committed by Automerger Merge Worker
Browse files

Merge "Stop passing in statsFile fds as they will be leaked when returned to...

Merge "Stop passing in statsFile fds as they will be leaked when returned to the caller." into sc-dev am: 098c3d74

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13495667

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5ac42c9c6b897f32e3b0d48fd0d644043bb960c3
parents 31f29aab 098c3d74
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2509,7 +2509,6 @@ public class StatsPullAtomService extends SystemService {
        try {
            // force procstats to flush & combine old files into one store
            long lastHighWaterMark = readProcStatsHighWaterMark(section);
            List<ParcelFileDescriptor> statsFiles = new ArrayList<>();

            ProtoOutputStream[] protoStreams = new ProtoOutputStream[MAX_PROCSTATS_SHARDS];
            for (int i = 0; i < protoStreams.length; i++) {
@@ -2519,7 +2518,7 @@ public class StatsPullAtomService extends SystemService {
            ProcessStats procStats = new ProcessStats(false);
            // Force processStatsService to aggregate all in-storage and in-memory data.
            long highWaterMark = processStatsService.getCommittedStatsMerged(
                    lastHighWaterMark, section, true, statsFiles, procStats);
                    lastHighWaterMark, section, true, null, procStats);
            procStats.dumpAggregatedProtoForStatsd(protoStreams, MAX_PROCSTATS_RAW_SHARD_SIZE);

            for (int i = 0; i < protoStreams.length; i++) {