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

Skip to content
Commit 48a980e1 authored by Tyler Freeman's avatar Tyler Freeman
Browse files

fix(high contrast text): draw contrasting backgrounds when text changes color via Spans

We take into account the CharacterStyle spans that change the color of
the text to be different than the original global Paint color. This
matches the high contrast background to each span of text that is a
different color.

Also, fix the isHighContrastTextDark() function which was converting
LAB wrong because of incorrect documentation (see b/343778621)

Fix: 340552436
Flag: ACONFIG com.android.graphics.hwui.flags.high_contrast_text_small_text_rect TRUNKFOOD
Test: atest frameworks/base/core/tests/coretests/src/android/text/LayoutTest.java
 && atest frameworks/base/core/tests/coretests/src/android/text/SpanColorsTest.java

Change-Id: I8e9723409b8219ad9c869dc5a7c767d2ec669939
parent 99bbe52e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment