summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Iavor-Valentin Iftime <valiiftime@google.com> 2024-09-19 14:34:08 +0000
committer Iavor-Valentin Iftime <valiiftime@google.com> 2024-09-19 14:34:08 +0000
commitd0847e4f433b63a0d7a8748608e77e57b96b50f6 (patch)
tree3de1b7e2e1408bc24aaecf4c89fe6e4c4dcbb620
parent634d93a1302c0aa0b87933a518b6731767c5d63b (diff)
Add correct flags dependency for force-grouping tests
The tests below should only run when FLAG_CHECK_AUTOGROUP_BEFORE_POST is also enabled: - testOnlyForceGroupIfNeeded_newNotification_wasAutogrouped - testOnlyForceGroupIfNeeded_newNotification_notAutogrouped Flag: android.service.notification.notification_force_grouping Change-Id: I810a6f74c91b480686a126b0727c5eb3e27bf916 Test: atest NotificationManagerServiceTest Bug: 367511025
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java6
1 files changed, 4 insertions, 2 deletions
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 96ddf8079e17..b8f9767b5512 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -2815,7 +2815,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
}
@Test
- @EnableFlags(FLAG_NOTIFICATION_FORCE_GROUPING)
+ @EnableFlags({FLAG_NOTIFICATION_FORCE_GROUPING,
+ android.app.Flags.FLAG_CHECK_AUTOGROUP_BEFORE_POST})
public void testOnlyForceGroupIfNeeded_newNotification_notAutogrouped() {
NotificationRecord r = generateNotificationRecord(mTestNotificationChannel, 0, null, false);
when(mGroupHelper.onNotificationPosted(any(), anyBoolean())).thenReturn(false);
@@ -2834,7 +2835,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
}
@Test
- @EnableFlags(FLAG_NOTIFICATION_FORCE_GROUPING)
+ @EnableFlags({FLAG_NOTIFICATION_FORCE_GROUPING,
+ android.app.Flags.FLAG_CHECK_AUTOGROUP_BEFORE_POST})
public void testOnlyForceGroupIfNeeded_newNotification_wasAutogrouped() {
NotificationRecord r = generateNotificationRecord(mTestNotificationChannel, 0, null, false);
when(mGroupHelper.onNotificationPosted(any(), anyBoolean())).thenReturn(true);