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

Commit e6bfa6b9 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Improve synchronization of ProcessCpuTracker

Bug: b/310775600
Test: presubmit
Change-Id: I578d4848a04a6d35d66fdeab4cc1f31a94621019
parent 3b84c2ca
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -337,6 +337,12 @@ public class ProcessCpuTracker {

    @UnsupportedAppUsage
    public void update() {
        synchronized (this) {
            updateLocked();
        }
    }

    private void updateLocked() {
        if (DEBUG) Slog.v(TAG, "Update: " + this);

        final long nowUptime = SystemClock.uptimeMillis();