Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ import android.service.notification.NotificationListenerService.RankingMap; import android.service.notification.StatusBarNotification; import android.util.ArrayMap; import android.util.Pair; import android.util.Slog; import androidx.annotation.NonNull; import androidx.annotation.Nullable; Loading Loading @@ -756,6 +755,7 @@ public class NotifCollection implements Dumpable { && !entry.getSbn().getNotification().isGroupSummary() && !hasFlag(entry, Notification.FLAG_ONGOING_EVENT) && !hasFlag(entry, Notification.FLAG_BUBBLE) && !hasFlag(entry, Notification.FLAG_NO_CLEAR) && entry.getDismissState() != DISMISSED; } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -1468,6 +1468,18 @@ public class NotifCollectionTest extends SysuiTestCase { container, container.getSbn().getGroupKey())); } @Test public void testCannotDismissNoClearNotifications() { // GIVEN an no-clear notification final NotificationEntry container = new NotificationEntryBuilder() .setFlag(mContext, FLAG_NO_CLEAR, true) .build(); // THEN its children are not dismissible assertFalse(mCollection.shouldAutoDismissChildren( container, container.getSbn().getGroupKey())); } @Test public void testCanDismissFgsNotificationChildren() { // GIVEN an FGS but not ongoing notification Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ import android.service.notification.NotificationListenerService.RankingMap; import android.service.notification.StatusBarNotification; import android.util.ArrayMap; import android.util.Pair; import android.util.Slog; import androidx.annotation.NonNull; import androidx.annotation.Nullable; Loading Loading @@ -756,6 +755,7 @@ public class NotifCollection implements Dumpable { && !entry.getSbn().getNotification().isGroupSummary() && !hasFlag(entry, Notification.FLAG_ONGOING_EVENT) && !hasFlag(entry, Notification.FLAG_BUBBLE) && !hasFlag(entry, Notification.FLAG_NO_CLEAR) && entry.getDismissState() != DISMISSED; } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -1468,6 +1468,18 @@ public class NotifCollectionTest extends SysuiTestCase { container, container.getSbn().getGroupKey())); } @Test public void testCannotDismissNoClearNotifications() { // GIVEN an no-clear notification final NotificationEntry container = new NotificationEntryBuilder() .setFlag(mContext, FLAG_NO_CLEAR, true) .build(); // THEN its children are not dismissible assertFalse(mCollection.shouldAutoDismissChildren( container, container.getSbn().getGroupKey())); } @Test public void testCanDismissFgsNotificationChildren() { // GIVEN an FGS but not ongoing notification Loading