From 0c1baf9dd65a2a67ac1e56776e9ef71a7cfe0f09 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 3 Apr 2013 13:08:52 -0700 Subject: [PATCH] Nuke heavy parts of notification before archiving. Bug: 8537938 Change-Id: I2e4eccc3bd6d57fe5cef340d9e67986d78d3be95 --- .../com/android/server/NotificationManagerService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 5cf1c285f2db7..44d730ceb946c 100644 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -237,9 +237,15 @@ public class NotificationManagerService extends INotificationManager.Stub ArrayDeque mBuffer = new ArrayDeque(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(); }