commit | e0aaeaaaf18be7969def21e3f441da3b81b2cc30 | [log] [tgz] |
---|---|---|
author | Chris Wren <cwren@android.com> | Tue Jun 21 14:38:04 2016 -0400 |
committer | Chris Wren <cwren@android.com> | Tue Jun 21 14:41:55 2016 -0400 |
tree | 7e5d52e7f082058051725f2058ded4e783537cc6 | |
parent | 1e7d8d381768ddb8868ba50612a1e48d44bfce6f [diff] |
registerUpdatedByApp should be synchronized Bug: 29524139 Change-Id: I226b5f32fdab6b369451d0c64310f788944495d0
diff --git a/services/core/java/com/android/server/notification/NotificationUsageStats.java b/services/core/java/com/android/server/notification/NotificationUsageStats.java index 07142f0..34c5283 100644 --- a/services/core/java/com/android/server/notification/NotificationUsageStats.java +++ b/services/core/java/com/android/server/notification/NotificationUsageStats.java
@@ -146,7 +146,8 @@ /** * 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) {