Turn off kerning when testing TextUtils.ellipsize().

Otherwise, the different text measurement methods produce slightly
different results and cause the text to show different results for
Spanned vs. non-Spanned source strings.

Bug 1837826
This commit is contained in:
Eric Fischer
2009-07-01 18:03:09 -07:00
parent c08dd9e27e
commit 1f0dac38df

View File

@@ -276,6 +276,7 @@ public class TextUtilsTest extends TestCase {
Spannable s3 = new SpannableString(s1);
s3.setSpan(new StyleSpan(0), 5, 10, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
TextPaint p = new TextPaint();
p.setFlags(p.getFlags() & ~p.DEV_KERN_TEXT_FLAG);
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 3; j++) {