Merge "Remove foreground requirement for applying suppress notif"
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user