Skip to content

Commit 845d9c7

Browse files
author
Gilles Debunne
committed
Bug 5327547: re-check word after it (may) have been added to user dictionary.
Change-Id: Id4f32477c3368a140883dd34c97578aab46b04db
1 parent eba3d92 commit 845d9c7

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
@@ -9996,7 +9996,9 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
99969996
intent.putExtra("word", originalText);
99979997
intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
99989998
getContext().startActivity(intent);
9999-
suggestionInfo.removeMisspelledFlag();
9999+
// There is no way to know if the word was indeed added. Re-check.
10000+
editable.removeSpan(suggestionInfo.suggestionSpan);
10001+
updateSpellCheckSpans(spanStart, spanEnd);
1000010002
} else {
1000110003
// SuggestionSpans are removed by replace: save them before
1000210004
SuggestionSpan[] suggestionSpans = editable.getSpans(spanStart, spanEnd,

0 commit comments

Comments
 (0)