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

Commit 50fe7880 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

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
parent 1d4fe432
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;