Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0847e4f authored by Iavor-Valentin Iftime's avatar Iavor-Valentin Iftime
Browse files

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
parent 634d93a1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);