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

Commit 33db676d authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB] Reset chip width calculations on rotation or unfold.

A user may not have enough room for 2 chips in portrait, but does have
room for 2 chips in landscape or when unfolded. This CL updates the
secondary chip to re-calculate if it has enough space whenever the screen
bounds change, which happens on rotation or unfold.

It also updates the chip text to re-calculate if it has enough space.

Fixes: 385740234
Fixes: 385740683
Fixes: 351069457

Bug: 364653005
Flag: com.android.systemui.status_bar_notification_chips

Test: Trigger 2 chips where only 1 chip fits in portrait, then rotate to
landscape -> verify 2nd chip shows. Rotate back to portrait -> verify
2nd chip hides again
Test: Show timer chip on large font size then decrease font size or
rotate to landscape -> verify timer shows again
Test: With small font size, trigger 2 chips and see 2 chips. Increase
font size -> verify 2nd chip shrinks and disappears at largest font
size. Decrease font size -> verify 2nd chip re-shows and shows with text
if there's enough room

Change-Id: I21f6ed401c8f882f96611f164bf55500699c8be6
parent 80dbd94b
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