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

Commit 4c7dbc04 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #4584320 Single Line EditText not drawing correctly with spans applied (ICS)

- provide a better fix by still using the full context of the text (versus using the text only)

Change-Id: I542335e98117921d75c191e90a9b2018ca356ac9
parent 880f64ac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1601,8 +1601,8 @@ public class Paint {
        int contextLen = contextEnd - contextStart;
        int len = end - start;
        char[] buf = TemporaryBuffer.obtain(contextLen);
        TextUtils.getChars(text, start, end, buf, 0);
        float result = getTextRunAdvances(buf, 0, len,
        TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
        float result = getTextRunAdvances(buf, start - contextStart, len,
                0, contextLen, flags, advances, advancesIndex, reserved);
        TemporaryBuffer.recycle(buf);
        return result;