From 05c053992b6ff47826cbb404c6ff025ccd7f9904 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Wed, 9 Jul 2014 16:49:33 +0900 Subject: [PATCH] Fix test failur on pre-L devices This is a follow up CL for Iafbf2877db393dbd040295c21d. BUG: 16029304 Change-Id: I0bfdcf901adb3178e6b9201d598ce9f588dcd253 --- .../android/inputmethod/compat/TextInfoCompatUtilsTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java b/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java index e71d77460..5721ed1ff 100644 --- a/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java +++ b/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java @@ -57,7 +57,8 @@ public class TextInfoCompatUtilsTests extends AndroidTestCase { TEST_SEQUENCE_NUMBER); final Spanned expectedSpanned = (Spanned) text.subSequence(TEST_CHAR_SEQUENCE_START, TEST_CHAR_SEQUENCE_END); - final CharSequence actualCharSequence = TextInfoCompatUtils.getCharSequence(textInfo, null); + final CharSequence actualCharSequence = + TextInfoCompatUtils.getCharSequence(textInfo, textInfo.getText()); // This should be valid even if TextInfo#getCharSequence is not supported. assertTrue(TextUtils.equals(expectedSpanned, actualCharSequence));