diff options
author | Daniel Sandler <dsandler@android.com> | 2013-05-21 17:35:17 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-05-21 17:35:17 +0000 |
commit | f5ceaf4b19362b3cf7882bf8a6d086841f551fed (patch) | |
tree | 3334da2fddea245bb3527c2b940d89364204bed1 /services/java/com/android/server/NotificationManagerService.java | |
parent | d258b1efe7717272c1e615fbe7884a93de198018 (diff) | |
parent | 26b81d594ceb3026f64e8fa6980044fcb867d05c (diff) |
Merge "Archive a copy of each dismissed notification." into jb-mr2-dev
Diffstat (limited to 'services/java/com/android/server/NotificationManagerService.java')
-rw-r--r-- | services/java/com/android/server/NotificationManagerService.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 4348a81178f3..868278b0748c 100644 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -287,13 +287,14 @@ public class NotificationManagerService extends INotificationManager.Stub } public void record(StatusBarNotification nr) { - // Nuke heavy parts of notification before storing in archive - nr.getNotification().lightenPayload(); - if (mBuffer.size() == BUFFER_SIZE) { mBuffer.removeFirst(); } - mBuffer.addLast(nr); + + // We don't want to store the heavy bits of the notification in the archive, + // but other clients in the system process might be using the object, so we + // store a (lightened) copy. + mBuffer.addLast(nr.cloneLight()); } |