summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Will Brockman <brockman@google.com> 2019-01-25 10:37:30 -0500
committer Will Brockman <brockman@google.com> 2019-01-25 15:50:53 +0000
commitb020b5e57b1b4b71dd3976e032ae20762dd63e91 (patch)
tree00313da0a1346a3c651b8a0812e873188985dc0f
parent07182c8622947e0407c6cd72fea4f6ab629f4b55 (diff)
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
-rw-r--r--services/core/java/com/android/server/notification/NotificationRecord.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 02fc51f89e62..ac965faedd34 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();
}
}