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

Commit c55b4122 authored by Mady Mellor's avatar Mady Mellor
Browse files

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
parent d71f26f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment