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

Commit 26ebfe89 authored by Gustav Sennton's avatar Gustav Sennton Committed by Android (Google) Code Review
Browse files

Merge "Test to null-check NotificationEntryManager.performRemoveNotification()"

parents 83f81571 744e7e1c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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),