Merge "Stop passing in statsFile fds as they will be leaked when returned to the caller." into rvc-qpr-dev am: 19c43a01a7

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia8622ca830f6ab6f3d8b9d343802a11fc35fccee
This commit is contained in:
TreeHugger Robot
2021-02-15 23:04:02 +00:00
committed by Automerger Merge Worker

View File

@@ -2610,7 +2610,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++) {
@@ -2620,7 +2619,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++) {