Ack, wrap advisePersistThreshold() in lock.

Bug: 6449725
Change-Id: I702dc2ff9d4b237c46d89bcae41289bc3e9ef2f8
This commit is contained in:
Jeff Sharkey
2012-05-07 11:08:49 -07:00
parent c78bc60039
commit 24a69bbd60

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();
synchronized (mStatsLock) {
mDevRecorder.maybePersistLocked(currentTime);
mXtRecorder.maybePersistLocked(currentTime);
mUidRecorder.maybePersistLocked(currentTime);
mUidTagRecorder.maybePersistLocked(currentTime);
}
// re-arm global alert
registerGlobalAlert();