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

Commit 2c224209 authored by Pavel Zhamaitsiak's avatar Pavel Zhamaitsiak Committed by android-build-merger
Browse files

Merge "Fix race condition in MetricsLoggerService" into nyc-dev

am: be3e539f

* commit 'be3e539f':
  Fix race condition in MetricsLoggerService

Change-Id: I970f50bc2ab6686aeabcad251f31f3934ab2e4ec
parents 5283f95e be3e539f
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) {