From b020b5e57b1b4b71dd3976e032ae20762dd63e91 Mon Sep 17 00:00:00 2001 From: Will Brockman Date: Fri, 25 Jan 2019 10:37:30 -0500 Subject: [PATCH] In NotificationRecord, clean out adjustments once they've been applied. This frees up some memory and prevents unnecessary re-processing of the adjustments. It also deduplicates the NOTIFICATION_ASSISTANT tron log record that is written every time a new notification is created. It also prevents any other duplication of event logs. Bug: 122823423 Test: atest SystemUITests NotificationAssistantServiceTest and manual testing. Change-Id: Ie2514e8e9ac19f79b1ad0afcde4d96649fe28069 --- .../com/android/server/notification/NotificationRecord.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java index 02fc51f89e624..ac965faedd345 100644 --- a/services/core/java/com/android/server/notification/NotificationRecord.java +++ b/services/core/java/com/android/server/notification/NotificationRecord.java @@ -690,6 +690,8 @@ public final class NotificationRecord { importance)); } } + // We have now gotten all the information out of the adjustments and can forget them. + mAdjustments.clear(); } }