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

Commit 95560907 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Chips] For call notifs that are also promoted, prefer promoted chip

Previously, we'd decided that call notifications that are also promoted
notifications should get the call chip treatment (accent color, must
show timer, ranked above any other promoted notification, tapping chip
opens activity).

Now, we're going to reverse the preference: Call notifications that are
also promoted notifications will get the *promoted* chip treatment
(system color, control over text, ranked similarly to other promoted
notifications, tapping chip shows notification).

This CL makes that reversal by not showing the call chip whenever a
notification has requested to be promoted. This means that a call
notification from an app that's *requesting to* show Live Updates but
isn't allowed to (because the user has blocked them) will get *no* chip
at all (not even a call chip).

Bug: 414830065
Bug: 364653005
Bug: 388521980
Flag: android.app.ui_rich_ongoing
Flag: android.app.opt_in_rich_ongoing

Test the following with android.app.opt_in_rich_ongoing flag on:

Test: Post a CallStyle.Ongoing notification that doesn't meet promotion
criteria (ONGOING isn't set, REQUEST_PROMOTED isn't set, COLORIZED not
set or set) -> verify it gets a call chip with accent color and forced
timer. Verify it doesn't get AOD treatment or demotion menu.

Test: Post a CallStyle.Ongoing notification that does meet promotion
criteria (ONGOING & REQUEST_PROMOTED set, COLORIZED not set) -> verify
it gets a promoted chip with system color and customized text, verify
a call chip is *not* shown

Test: Post a CallStyle.Ongoing notification that meets promotion
criteria -> verify it has the demotion menu. Then, demote the app ->
verify promoted chip hides and  call chip does *not* show up

Test: Post promoted CallStyle.Ongoing notif while app is demoted ->
verify no chip ever shows up. Then un-demote app -> verify promoted chip
appears

Test: Post a CallStyle.Ongoing notification that requests both promotion
and colorization (ONGOING, REQUEST_PROMOTED, and COLORIZED all set) ->
verify it doesn't get *any* chip at all

Test: Verify the notification shade ranking matches the chip ranking,
for both call chips and other kinds of chips

Test: With opt_in_rich_ongoing flag off, verify nothing is majorly
broken with any of those test cases. Specifically, verify that an
ongoing call notification that has ONGIONG and COLORIZED set does *not*
show 2 chips

Test: atest SystemUITests

Change-Id: I6750f6da52111deb0f189d040071eceb3a27b6bd
parent fb8a50e8
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