diff options
| author | 2014-11-18 22:17:33 +0000 | |
|---|---|---|
| committer | 2014-11-18 22:17:35 +0000 | |
| commit | bde9ffbd56cb420b51f11ca05b5225c1953f048d (patch) | |
| tree | 5706a43c9a186f57c411b1cf98d7ae7eb4396667 | |
| parent | 6807e5f0feac3cfc85e9fe74378b94bc32a141c5 (diff) | |
| parent | 396879f3f88e6384588c421c7e57ceef932aad59 (diff) | |
Merge "Fix missing ellipsis when just one character is truncated" into lmp-mr1-dev
| -rw-r--r-- | core/java/android/text/StaticLayout.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java index e82057ce81e7..02297e3c3356 100644 --- a/core/java/android/text/StaticLayout.java +++ b/core/java/android/text/StaticLayout.java @@ -383,7 +383,6 @@ public class StaticLayout extends Layout { okBottom = fitBottom; } } else { - final boolean moreChars; int endPos; int above, below, top, bottom; float currentTextWidth; @@ -395,7 +394,6 @@ public class StaticLayout extends Layout { top = okTop; bottom = okBottom; currentTextWidth = okWidth; - moreChars = (j + 1 < spanEnd); } else if (fit != here) { endPos = fit; above = fitAscent; @@ -403,7 +401,6 @@ public class StaticLayout extends Layout { top = fitTop; bottom = fitBottom; currentTextWidth = fitWidth; - moreChars = (j + 1 < spanEnd); } else { // must make progress, so take next character endPos = here + 1; @@ -417,7 +414,6 @@ public class StaticLayout extends Layout { top = fmTop; bottom = fmBottom; currentTextWidth = widths[here - paraStart]; - moreChars = (endPos < spanEnd); } v = out(source, here, endPos, @@ -425,7 +421,7 @@ public class StaticLayout extends Layout { v, spacingmult, spacingadd, chooseHt,chooseHtv, fm, hasTabOrEmoji, needMultiply, chdirs, dir, easy, bufEnd, includepad, trackpad, chs, widths, paraStart, ellipsize, ellipsizedWidth, - currentTextWidth, paint, moreChars); + currentTextWidth, paint, true); here = endPos; j = here - 1; // restart j-span loop from here, compensating for the j++ |