Merge "registerUpdatedByApp should be synchronized" into nyc-dev

This commit is contained in:
Chris Wren
2016-06-21 21:46:33 +00:00
committed by Android (Google) Code Review

View File

@@ -146,7 +146,8 @@ public class NotificationUsageStats {
/**
* Called when a notification has been updated.
*/
public void registerUpdatedByApp(NotificationRecord notification, NotificationRecord old) {
public synchronized void registerUpdatedByApp(NotificationRecord notification,
NotificationRecord old) {
notification.stats.updateFrom(old.stats);
AggregatedStats[] aggregatedStatsArray = getAggregatedStatsLocked(notification);
for (AggregatedStats stats : aggregatedStatsArray) {