diff options
| author | 2025-02-26 17:26:49 +0000 | |
|---|---|---|
| committer | 2025-03-03 06:12:00 -0800 | |
| commit | aa47a2f870ad753f597f153fac8ba398505853de (patch) | |
| tree | 7ca340af5c521766f09d64640f9797945717a30c /libs/androidfw/PathUtils.cpp | |
| parent | 4fba341d09f5712b1df4bb28fa551e21307a8f10 (diff) | |
[SB][Notif] When HUN is PinnedByUser, always immediately show it.
Each HUN has a minimum earliestRemovalTime to ensure that a user sees a
HUN for long enough before a new HUN shows. However, if a user taps a
status bar chip, then we should *immediately* show that chip's HUN so
that the UI is responsive, even if there's a currently-showing HUN that
hasn't met its earliest removal time yet.
To do this, this CL:
- Adds a `requestedPinnedStatus` field to `HeadsUpEntry`
- Updates `AvalancheController#getDuration` to return a data class
instead of a raw duration. If the next HUN is PinnedByUser (which is
the state we use everywhere to know if a user tapped a status bar
chip), then `#getDuration` returns `HideImmediately`.
- If HeadsUpManagerImpl gets a `HideImmediately` value, it immediately
hides the currently-showing HUN.
See demo videos in bug.
Fixes: 397505145
Bug: 364653005
Flag: com.android.systemui.status_bar_notification_chips
Test: Have 2 status bar notification chips. Tap on one chip then
immediately tap on the other chip -> verify the second HUN immediately
shows
Test: Tap on notification chip then trigger normal HUN -> verify normal
HUN still shows after 3s
Test: Send HUNs 0,1,2,3. While HUN 0 shows, tap chip to show HUN ->
verify chip HUN shows for 5 seconds, then hides (HUNs 1, 2, 3 discarded)
Test: atest HeadsUpManagerImplTest AvalancheControllerTest
Change-Id: I0c0a15147f00ec8cfda94ad22e4f5bcfe58ded17
Diffstat (limited to 'libs/androidfw/PathUtils.cpp')
0 files changed, 0 insertions, 0 deletions