Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f00b4dec authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Bug 5327547: re-check word after it (may) have been added to user dictionary."

parents 6771c7fd 845d9c7f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -9986,7 +9986,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                intent.putExtra("word", originalText);
                intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
                getContext().startActivity(intent);
                suggestionInfo.removeMisspelledFlag();
                // There is no way to know if the word was indeed added. Re-check.
                editable.removeSpan(suggestionInfo.suggestionSpan);
                updateSpellCheckSpans(spanStart, spanEnd);
            } else {
                // SuggestionSpans are removed by replace: save them before
                SuggestionSpan[] suggestionSpans = editable.getSpans(spanStart, spanEnd,