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

Commit c3a8e790 authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Remove foreground requirement for applying suppress notif"

parents bb14575f 2c10655d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -6078,7 +6078,6 @@ public class NotificationManagerService extends SystemService {
        if (!isAppForeground && metadata != null) {
            int flags = metadata.getFlags();
            flags &= ~Notification.BubbleMetadata.FLAG_AUTO_EXPAND_BUBBLE;
            flags &= ~Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION;
            metadata.setFlags(flags);
        }
    }
+1 −2
Original line number Diff line number Diff line
@@ -6531,9 +6531,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
        Notification notif = mService.getNotificationRecord(nr.getSbn().getKey()).getNotification();
        assertTrue(notif.isBubbleNotification());

        // Our flags should have failed since we're not foreground
        // The flag should have failed since we're not foreground
        assertFalse(notif.getBubbleMetadata().getAutoExpandBubble());
        assertFalse(notif.getBubbleMetadata().isNotificationSuppressed());
    }

    @Test