Merge "Fix race condition in MetricsLoggerService" into nyc-dev am: be3e539ff7
am: 54b3111fca
* commit '54b3111fca3dbd1067a8256b11ed268431a9486d':
Fix race condition in MetricsLoggerService
Change-Id: Ib79f15a534bcb53e2e4b737b23e56b20befad0f2
This commit is contained in:
@@ -106,11 +106,13 @@ public class MetricsLoggerService extends SystemService {
|
||||
}
|
||||
|
||||
private void resetThrottlingCounters(long currentTimeMillis) {
|
||||
for (int i = 0; i < mThrottlingCounters.length; i++) {
|
||||
mThrottlingCounters[i] = 0;
|
||||
synchronized (mThrottlingCounters) {
|
||||
for (int i = 0; i < mThrottlingCounters.length; i++) {
|
||||
mThrottlingCounters[i] = 0;
|
||||
}
|
||||
mThrottlingIntervalBoundaryMillis =
|
||||
currentTimeMillis + THROTTLING_TIME_INTERVAL_MILLIS;
|
||||
}
|
||||
mThrottlingIntervalBoundaryMillis =
|
||||
currentTimeMillis + THROTTLING_TIME_INTERVAL_MILLIS;
|
||||
}
|
||||
|
||||
private void addEvent(ConnectivityMetricsEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user