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

Commit bb29df8b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reverse check for multi-character ellipsis"

parents f45256ad 55fd45b2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2067,9 +2067,11 @@ public abstract class Layout {

        final String ellipsisString = TextUtils.getEllipsisString(method);
        final int ellipsisStringLen = ellipsisString.length();
        // Use the ellipsis string only if there are that at least as many characters to replace.
        final boolean useEllipsisString = ellipsisCount >= ellipsisStringLen;
        for (int i = 0; i < ellipsisCount; i++) {
            final char c;
            if (i < ellipsisStringLen && ellipsisCount <= ellipsisStringLen) {
            if (useEllipsisString && i < ellipsisStringLen) {
                c = ellipsisString.charAt(i);
            } else {
                c = TextUtils.ELLIPSIS_FILLER;