Skip to content

Commit f00b4de

Browse files
Gilles DebunneAndroid (Google) Code Review
authored andcommitted
Merge "Bug 5327547: re-check word after it (may) have been added to user dictionary."
2 parents 6771c7f + 845d9c7 commit f00b4de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/java/android/widget/TextView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9986,7 +9986,9 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
99869986
intent.putExtra("word", originalText);
99879987
intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
99889988
getContext().startActivity(intent);
9989-
suggestionInfo.removeMisspelledFlag();
9989+
// There is no way to know if the word was indeed added. Re-check.
9990+
editable.removeSpan(suggestionInfo.suggestionSpan);
9991+
updateSpellCheckSpans(spanStart, spanEnd);
99909992
} else {
99919993
// SuggestionSpans are removed by replace: save them before
99929994
SuggestionSpan[] suggestionSpans = editable.getSpans(spanStart, spanEnd,

0 commit comments

Comments
 (0)