commit | 0e3c5e827235911d33312e431975533f046421e7 | [log] [tgz] |
---|---|---|
author | Raph Levien <raph@google.com> | Thu Dec 04 13:26:07 2014 -0800 |
committer | Raph Levien <raph@google.com> | Thu Dec 04 22:32:48 2014 +0000 |
tree | 15b642335c97e3802f53adbda19cacd6762f3bf8 | |
parent | 6ca3ba73b78be57dd50fe5813f076b3e166cc659 [diff] |
Fix off-by-one error in computeEllipsis In the Truncate.MIDDLE case, when the line is less than half the layout width, the computeEllipsis logic could go past the left edge of the string. This patch fixes the off-by-one and avoids the resulting index out of bounds crash, and also changes the behavior so that when ellipsizing at the middle, the string to the end of the paragraph is taken into account. Bug: 18508627 Change-Id: I24be09c23a5aa158791a9717419307613b8a22e8