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

Commit f9404438 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

am: 2c224209

* commit '2c224209':
  Fix race condition in MetricsLoggerService

Change-Id: I8013675f7269e6fcbb1120091e0cb6381a2df242
parents 2ef40020 2c224209
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) {