diff options
| author | 2019-02-12 16:44:36 +0000 | |
|---|---|---|
| committer | 2019-02-12 16:44:36 +0000 | |
| commit | 26ebfe8933b55e74be88e3984ee6f06523cad6ab (patch) | |
| tree | c3f32bbc6e8155d2b37204a3283598b5bb5372a5 | |
| parent | 83f81571a3c1b95639c043a55d081c2c08d8b4c4 (diff) | |
| parent | 744e7e1cf33d7c469ec9c912438ed3ee69c5694e (diff) | |
Merge "Test to null-check NotificationEntryManager.performRemoveNotification()"
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java | 10 |
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), |