Merge "Fix race condition in MetricsLoggerService" into nyc-dev
am: be3e539ff7
* commit 'be3e539ff7b26d497f930fb2faf761e94fa99297':
Fix race condition in MetricsLoggerService
Change-Id: I6c5b3d2b4889bef57ff169199081bdb79b8117e8
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