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

Commit e8fc84b4 authored by Pavel Zhamaitsiak's avatar Pavel Zhamaitsiak
Browse files

Fix race condition in MetricsLoggerService

Bug: 28204408
Change-Id: I7e0577d2161f6083ae84ab29db24f23415d145be
parent beb3d299
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -106,12 +106,14 @@ public class MetricsLoggerService extends SystemService {
    }

    private void resetThrottlingCounters(long currentTimeMillis) {
        synchronized (mThrottlingCounters) {
            for (int i = 0; i < mThrottlingCounters.length; i++) {
                mThrottlingCounters[i] = 0;
            }
            mThrottlingIntervalBoundaryMillis =
                    currentTimeMillis + THROTTLING_TIME_INTERVAL_MILLIS;
        }
    }

    private void addEvent(ConnectivityMetricsEvent e) {
        if (VDBG) {