From 81e5b5f2f85ea0a00c4ee51f648dbe37b25ab9bd Mon Sep 17 00:00:00 2001 From: Christoph Studer Date: Wed, 22 Oct 2014 17:19:56 +0200 Subject: [PATCH] NoMan: Log canceled notifications In addition to logging cancelation command, also log actually canceled notifications via the new eventlog tag notification_canceled. Bug: 18083122 Change-Id: I1e3e1e1368f39519f34c002ae374f318f647a401 --- services/core/java/com/android/server/EventLogTags.logtags | 2 ++ .../android/server/notification/NotificationManagerService.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/services/core/java/com/android/server/EventLogTags.logtags b/services/core/java/com/android/server/EventLogTags.logtags index f7925f0b6e152..eec97f3f76862 100644 --- a/services/core/java/com/android/server/EventLogTags.logtags +++ b/services/core/java/com/android/server/EventLogTags.logtags @@ -71,6 +71,8 @@ option java_package com.android.server 27520 notification_clicked (key|3) # when a notification action button has been clicked 27521 notification_action_clicked (key|3),(action_index|1) +# when a notification has been canceled +27530 notification_canceled (key|3),(reason|1) # --------------------------- # Watchdog.java diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index e0708cbcb4171..090967f74e293 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -2372,6 +2372,8 @@ public class NotificationManagerService extends SystemService { // Save it for users of getHistoricalNotifications() mArchive.record(r.sbn); + + EventLogTags.writeNotificationCanceled(r.getKey(), reason); } /**