Nuke heavy parts of notification before archiving.

Bug: 8537938
Change-Id: I2e4eccc3bd6d57fe5cef340d9e67986d78d3be95
This commit is contained in:
Jeff Sharkey
2013-04-03 13:08:52 -07:00
parent 75e181ddfe
commit 0c1baf9dd6

View File

@@ -237,9 +237,15 @@ public class NotificationManagerService extends INotificationManager.Stub
ArrayDeque<StatusBarNotification> mBuffer = new ArrayDeque<StatusBarNotification>(BUFFER_SIZE);
public Archive() {
}
public void record(StatusBarNotification nr) {
// Nuke heavy parts of notification before storing in archive
nr.notification.tickerView = null;
nr.notification.contentView = null;
nr.notification.bigContentView = null;
nr.notification.largeIcon = null;
if (mBuffer.size() == BUFFER_SIZE) {
mBuffer.removeFirst();
}