From 0a4824862d6bb81c5f2c4d27400e21f34ee16e86 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Mon, 12 Oct 2020 11:46:51 -0400 Subject: [PATCH] Log autogroups in addition to app set groups Test: make Bug: 165021650 Change-Id: I8cc0be1f8c0e5c01cc701a36d3e6b6b77dd4e309 --- .../server/notification/NotificationManagerService.java | 2 +- .../server/notification/NotificationManagerServiceTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 23798c0622fc5..5cc4790113555 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -6644,7 +6644,7 @@ public class NotificationManagerService extends SystemService { // Log event to statsd mNotificationRecordLogger.maybeLogNotificationPosted(r, old, position, - buzzBeepBlinkLoggingCode, getGroupInstanceId(n.getGroupKey())); + buzzBeepBlinkLoggingCode, getGroupInstanceId(r.getSbn().getGroupKey())); } finally { int N = mEnqueuedNotifications.size(); for (int i = 0; i < N; i++) { diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java index 6ee5831642843..1100496dffbeb 100755 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java @@ -1883,7 +1883,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { public void testGroupInstanceIds() throws Exception { final NotificationRecord group1 = generateNotificationRecord( mTestNotificationChannel, 1, "group1", true); - mBinderService.enqueueNotificationWithTag(PKG, PKG, "testFindGroupNotificationsLocked", + mBinderService.enqueueNotificationWithTag(PKG, PKG, "testGroupInstanceIds", group1.getSbn().getId(), group1.getSbn().getNotification(), group1.getSbn().getUserId()); waitForIdle(); @@ -1891,7 +1891,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { // same group, child, should be returned final NotificationRecord group1Child = generateNotificationRecord( mTestNotificationChannel, 2, "group1", false); - mBinderService.enqueueNotificationWithTag(PKG, PKG, "testFindGroupNotificationsLocked", + mBinderService.enqueueNotificationWithTag(PKG, PKG, "testGroupInstanceIds", group1Child.getSbn().getId(), group1Child.getSbn().getNotification(), group1Child.getSbn().getUserId()); waitForIdle();