From c97d8463727f1ccac55c83842f9446dbdc55ac3e Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 29 May 2018 09:49:34 -0700 Subject: [PATCH] Report when a notification is shown in the popup Change-Id: I5c06b18f731e2dc8e47bacba59746fc4cc02c42c --- .../android/launcher3/notification/NotificationMainView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/launcher3/notification/NotificationMainView.java b/src/com/android/launcher3/notification/NotificationMainView.java index 33caded4d7..5c0e259414 100644 --- a/src/com/android/launcher3/notification/NotificationMainView.java +++ b/src/com/android/launcher3/notification/NotificationMainView.java @@ -116,6 +116,10 @@ public class NotificationMainView extends FrameLayout implements SwipeDetector.L */ public void applyNotificationInfo(NotificationInfo mainNotification, boolean animate) { mNotificationInfo = mainNotification; + NotificationListener listener = NotificationListener.getInstanceIfConnected(); + if (listener != null) { + listener.setNotificationsShown(new String[] {mNotificationInfo.notificationKey}); + } CharSequence title = mNotificationInfo.title; CharSequence text = mNotificationInfo.text; if (!TextUtils.isEmpty(title) && !TextUtils.isEmpty(text)) {