Skip to content
Snippets Groups Projects
Commit 23980cdb authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Do not pass misspelled flags to TextView"

parents fec6837a 65ebe190
No related branches found
No related tags found
No related merge requests found
...@@ -131,16 +131,11 @@ public class SuggestionSpanUtils { ...@@ -131,16 +131,11 @@ public class SuggestionSpanUtils {
sameAsTyped = true; sameAsTyped = true;
} }
} }
// TODO: Share the implementation for checking typed word validity between the IME
// and the spell checker.
final int flag = (sameAsTyped && !suggestedWords.mTypedWordValid)
? (OBJ_FLAG_EASY_CORRECT | OBJ_FLAG_MISSPELLED)
: 0;
// TODO: We should avoid adding suggestion span candidates that came from the bigram // TODO: We should avoid adding suggestion span candidates that came from the bigram
// prediction. // prediction.
final Object[] args = final Object[] args =
{ context, null, suggestionsList.toArray(new String[suggestionsList.size()]), flag, { context, null, suggestionsList.toArray(new String[suggestionsList.size()]), 0,
(Class<?>) SuggestionSpanPickedNotificationReceiver.class }; (Class<?>) SuggestionSpanPickedNotificationReceiver.class };
final Object ss = CompatUtils.newInstance(CONSTRUCTOR_SuggestionSpan, args); final Object ss = CompatUtils.newInstance(CONSTRUCTOR_SuggestionSpan, args);
if (ss == null) { if (ss == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment