Do not decorate committed spans.

Users rarely tap on committed words, and the cost of sending the spans back
through the input connection, back and forth to the target app, is too high.

Bug 21926256.

Change-Id: I8e55b57ce2148ed313dc927425b6d9c958634958
main
Dan Zivkovic 2015-06-23 10:25:58 -07:00
parent 4e9d260826
commit ee6de1466b
1 changed files with 4 additions and 3 deletions

View File

@ -2135,9 +2135,10 @@ public final class InputLogic {
final SuggestedWords suggestedWords = mSuggestedWords;
// TODO: Locale should be determined based on context and the text given.
final Locale locale = getDictionaryFacilitatorLocale();
final CharSequence chosenWordWithSuggestions =
SuggestionSpanUtils.getTextWithSuggestionSpan(mLatinIME, chosenWord,
suggestedWords, locale);
final CharSequence chosenWordWithSuggestions = chosenWord;
// b/21926256
// SuggestionSpanUtils.getTextWithSuggestionSpan(mLatinIME, chosenWord,
// suggestedWords, locale);
if (DebugFlags.DEBUG_ENABLED) {
long runTimeMillis = System.currentTimeMillis() - startTimeMillis;
Log.d(TAG, "commitChosenWord() : " + runTimeMillis + " ms to run "