Add support for snoozing notifications
To a notification listener, snoozing will appear as a cancel
(with reason snoozed) followed by a post (when the snooze period
ends).
Apps can repost a snoozed notification, but the updates will not be shown
to the user until the snooze period ends.
Snoozing is canceled if the posting app or a notification listener
cancels the notification.
Any notification listener can snooze a notification. Technically apps
can snooze their own notifications also, though that's not public.
In this iteration snoozed notifications will be lost on device reboot.
Test: included. Also, various post, snooze, update, cancel tests with
a listener.
Bug: 30997603
Change-Id: I568a6448196f0992a17d20a4dac296321ec5092b
10 files changed