diff options
author | 2024-12-16 20:28:00 +0000 | |
---|---|---|
committer | 2024-12-18 19:00:34 +0000 | |
commit | a3f96c47c9d7704d7f018792e31c0327c69108b3 (patch) | |
tree | 3a16bd7bfb10c18c10d9212906e47ff2e63ce372 /libs/androidfw/Util.cpp | |
parent | 49f92f50a9076352940c8ebab419ac9cfe60802c (diff) |
[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
Diffstat (limited to 'libs/androidfw/Util.cpp')
0 files changed, 0 insertions, 0 deletions