diff options
| author | 2025-03-07 11:04:25 +0800 | |
|---|---|---|
| committer | 2025-03-20 15:36:08 +0800 | |
| commit | ca62784f68f78d3486005bfe39360e685251b220 (patch) | |
| tree | ce34af831f5bfb05e7be7cb982a473cf3c07f606 /libs/androidfw/FileStream.cpp | |
| parent | 09558664c3d588c5bef8a43369410103ad50fed5 (diff) | |
fix(HCT): White outline with white text when text following an wahitespace
Goal:
Ensure the accurate rendering of the background rectangle color(e.g. white text with balck background) for text following an whitespace.
Root Cause:
The text color is updated during the whitespace character processing in determineContrastingBackgroundColor, but the bgPaint update is skipped due to the 'skip draw background on whitespace' condition in onCharacterBounds. Consequently, subsequent text color change checks return "no text color change", resulting in the return of an incorrect bgPaint color.
Solution:
Implement synchronized updates for both the text color and bgPaint.
Bug: 401070918
Flag: com.android.graphics.hwui.flags.high_contrast_text_small_text_rect
Test: manually test on whitespace case (e.g. whitespace + text)
Test: atest core/tests/coretests/src/android/text/LayoutTest.java
Test: atest cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/TextViewHighContrastTextTests.kt
Change-Id: Icf43fc57755f07b33d47324f5436894ce7dbcfde
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions