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

Skip to content
Commit a3f96c47 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Notif] Also use chip's normal width constraints for text truncation

Commit I2c7db5d7c49bea770ccff3fb8d9f4c2124b5e04b added logic to see how
much of the status bar chip's text could fit into 96dp, and hid the text
if too much was hidden.

That works for the first chip, which will always have at least 96dp
available. But that doesn't work for the second chip, which could have <
96dp if the first chip is wide.

This CL updates the text truncation helper to also take into account the
chip's normal width constraints when deciding how to render the text.

Before/after shown in b/364653005#comment52.

Bug: 364653005
Flag: com.android.systemui.status_bar_notification_chips
Test: manual: trigger two chips -> verify second chip text gets cropped
correctly
Test: atest ChipTextTruncationHelperTest

Change-Id: I4073682bf9527783252af241d8d76686b3cc3c64
parent 49f92f50
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