From e214fb4f25c775b16f15fbcc3ca34713e033b5ca Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Fri, 28 Aug 2020 11:25:04 -0400 Subject: [PATCH] Add log to NoMan for canceled cancels In the case where a notification_cancel is skipped when finding a more recently enqueued notification for the same key, now throw a log so we know that we're dropping a message from the system. Bug: 162652224 Test: manual Change-Id: I313076f8b15b00286f532ace1bbe7da2f7db4afe --- .../android/server/notification/NotificationManagerService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index e42dd359dad13..5d0981da19067 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -6245,6 +6245,8 @@ public class NotificationManagerService extends SystemService { for (NotificationRecord r : enqueued) { if (r.mUpdateTimeMs > mWhen) { // At least one enqueue was posted after the cancel, so we're invalid + Slog.i(TAG, "notification cancel ignored due to newer enqueued entry" + + "key=" + r.getSbn().getKey()); return; } }