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

Commit 867be803 authored by Eric Miao's avatar Eric Miao Committed by Android (Google) Code Review
Browse files

Merge "Report memory snapshot only when read info successfully from procfs" into main

parents ebfa3e79 0b619cda
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ public class MetricsLoggerWrapper {
        }

        ProcfsMemoryUtil.MemorySnapshot m = ProcfsMemoryUtil.readMemorySnapshotFromProcfs();
        if (m != null) {
            int oom_score_adj = ProcfsMemoryUtil.readOomScoreAdjFromProcfs();
            Runtime runtime = Runtime.getRuntime();
            FrameworkStatsLog.write(FrameworkStatsLog.POSTGC_MEMORY_SNAPSHOT,
@@ -103,3 +104,4 @@ public class MetricsLoggerWrapper {
                runtime.maxMemory());
        }
    }
}