Merge "Ack, wrap advisePersistThreshold() in lock." into jb-dev

This commit is contained in:
Jeff Sharkey
2012-05-07 11:16:01 -07:00
committed by Android (Google) Code Review

View File

@@ -616,10 +616,12 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
// persist if beyond new thresholds
final long currentTime = mTime.hasCache() ? mTime.currentTimeMillis()
: System.currentTimeMillis();
mDevRecorder.maybePersistLocked(currentTime);
mXtRecorder.maybePersistLocked(currentTime);
mUidRecorder.maybePersistLocked(currentTime);
mUidTagRecorder.maybePersistLocked(currentTime);
synchronized (mStatsLock) {
mDevRecorder.maybePersistLocked(currentTime);
mXtRecorder.maybePersistLocked(currentTime);
mUidRecorder.maybePersistLocked(currentTime);
mUidTagRecorder.maybePersistLocked(currentTime);
}
// re-arm global alert
registerGlobalAlert();