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

Commit 1182a91d authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Chips] Don't throw if we can't fetch a StatusBarIconView.

This is theoretically possible when a notification is removed because
we clear out ConnectedDisplaysStatusBarNotificationIconViewStore before
we clear out the chip. SysUI shouldn't crash in this circumstance.
Instead, we'll just show a chip with no icon (which looks bad, but
should rarely-if-ever-happen and is better than crashing).

Fixes: 397713944
Bug: 364653005
Flag: com.android.systemui.shared.status_bar_connected_displays

Verify the following with status_bar_connected_displays flag both on and
off:

Test: trigger chip with missing icon -> verify no crash
Test: trigger chip with icon, verify icon shows & responds to dark/light
theme changes
Test: Post 2 promoted ongoing notifications, then dismiss one -> verify
no crash (b/390231934 doesn't re-occur)
Test: Post 2 promoted ongoing notifications -> verify both chips show
the right icons
Test: Add & remove various chips -> verify the chips always show the
right icon, and SysUI never crashes
Test: Post promoted ongoing notification then switch small icon in
notification -> verify chip updates to correct icon

Change-Id: I2a3c718ad809c84c229ad2e2fcfa0d161d5e4822

Change-Id: Ib5ad082e039f029e0ff1ef30140d5631a7e64dd3
parent e584e114
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