Remove headsUpCommon, simplifies some code, adds tests
Previously, canHeadsUpCommon was shared between shouldHeadsUp and
shouldBubbleUp.
Some of the shared logic was not appropriate for bubbles.
- suppressPeek shouldn't apply to bubbles in this manner (this was
causing the bubble notification to be hidden from the shade when
"don't pop notif on screen" is enabled in DND.
- mUseHeadsUp is tied to the device allowing HUNs, which shouldn't
impact if bubbles appear or not
canAlertCommon: common checks for HUNs in all states & bubbles
canAlertAwakeCommon: common checks for HUNs when device is awake & bubbles
This CL:
- removes canHeadsUpCommon & moves appropriate checks into shouldHeadsUp
- defaults showInShade to be true, allowing canAlertCommon to work
correctly for bubbles
- adds tests for NotificationInterruptionStateProvider
- removes some unused code in ExpandableNotificationRow
Test: atest NotificationInterruptionStateProviderTest
Test: manual - turn "don't pop notif on screen" on in DND
- post a bubble
=> note that the bubble appears & notification is in shade
Bug: 133444037
Change-Id: If2b15ce9c322877e56a60e1b4c5fdf625b48c030
Loading
Please register or sign in to comment