Merge "Create a new ProcessStats instance for each file read"
This commit is contained in:
@@ -634,7 +634,6 @@ public final class ProcessStatsService extends IProcessStats.Stub {
|
||||
if (files != null) {
|
||||
String highWaterMarkStr =
|
||||
DateFormat.format("yyyy-MM-dd-HH-mm-ss", highWaterMarkMs).toString();
|
||||
ProcessStats stats = new ProcessStats(false);
|
||||
for (int i = files.size() - 1; i >= 0; i--) {
|
||||
String fileName = files.get(i);
|
||||
try {
|
||||
@@ -647,7 +646,7 @@ public final class ProcessStatsService extends IProcessStats.Stub {
|
||||
new File(fileName),
|
||||
ParcelFileDescriptor.MODE_READ_ONLY);
|
||||
InputStream is = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
|
||||
stats.reset();
|
||||
final ProcessStats stats = new ProcessStats(false);
|
||||
stats.read(is);
|
||||
is.close();
|
||||
if (stats.mTimePeriodStartClock > newHighWaterMark) {
|
||||
|
||||
Reference in New Issue
Block a user