Ensure the notification is removed when bubble is removed & fix cancel all
Bubbles has some particular notification behaviour needs:
1) Whenever there is a bubble, the notif is kept around but may be hidden
from the shade
2) When the bubble is dismissed, if the notif is no longer in the
shade => really remove the notification
3) When the bubble is dismissed, if there is still a notification in the
shade => notif stays around and is normal
4) Clear all should only hide the bubble notification, not remove the
bubble
5) Apps canceling a notification that has a bubble will cancel the bubble
This CL does this by:
* Including the removal reason removeNotification path
* Adding a NotificationRemoveInterceptor that gets the option of overriding
the removal
* BubbleController has this new interceptor and uses the removal reason
to determine what should happen to the bubble & if the notification
should be allowed to be removed
* When the bubble is dismissed, if the notif is no longer in the shade,
then actually remove that notification
Test: atest BubbleControllerTest NotificationEntryManagerTest
Bug: 130347307
Bug: 130687293
Change-Id: I4459864a2ee5522076117f84ae37022bdfe4ee5d
13 files changed