diff options
| author | Seigo Nonaka <nona@google.com> | 2018-05-21 14:56:40 -0700 |
|---|---|---|
| committer | Seigo Nonaka <nona@google.com> | 2018-05-21 14:56:40 -0700 |
| commit | 50fe78805d9873d28d4ff017f0e60534dcf2783f (patch) | |
| tree | 315ee88c5e1cf2ffe81f1a249dfdbb1494f15968 /core/java | |
| parent | 1d4fe4323c0863c6aa9f78ea385a5f49e41b7258 (diff) | |
Reorder the drawing of underline/stroke and text
The underline and stroke should be top of the text.
This regression happens on O-MR1 and the root cause is still unknown,
but the drawning underline/stroke should do before drawing text.
Bug: 79906191
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
Change-Id: Idc2f99b9c0fa125af331e496da8daa326d14bfac
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/text/TextLine.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java index 64365fa5d0ff..b6f9f9457d41 100644 --- a/core/java/android/text/TextLine.java +++ b/core/java/android/text/TextLine.java @@ -824,6 +824,9 @@ public class TextLine { wp.setColor(previousColor); } + drawTextRun(c, wp, start, end, contextStart, contextEnd, runIsRtl, + leftX, y + wp.baselineShift); + if (numDecorations != 0) { for (int i = 0; i < numDecorations; i++) { final DecorationInfo info = decorations.get(i); @@ -866,8 +869,6 @@ public class TextLine { } } - drawTextRun(c, wp, start, end, contextStart, contextEnd, runIsRtl, - leftX, y + wp.baselineShift); } return runIsRtl ? -totalWidth : totalWidth; |
