summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java
index cad1a96b8075..79bc0a39d59c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java
@@ -521,6 +521,16 @@ public class NotificationEntryManagerTest extends SysuiTestCase {
verify(extender2).setShouldManageLifetime(mEntry, false);
}
+ /**
+ * Ensure that calling NotificationEntryManager.performRemoveNotification() doesn't crash when
+ * given a notification that has already been removed from NotificationData.
+ */
+ @Test
+ public void testPerformRemoveNotification_removedEntry() {
+ mEntryManager.getNotificationData().remove(mSbn.getKey(), null /* ranking */);
+ mEntryManager.performRemoveNotification(mSbn);
+ }
+
private Notification.Action createAction() {
return new Notification.Action.Builder(
Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon),