Skip to content

Commit 75e126f

Browse files
committed
Invalidate SuggestionSpan with FLAG_AUTO_CORRECTION when it's removed.
Bug: 5460262 Change-Id: I4ca71020a6d4b7057f60ca99944c479775cca8b7
1 parent 421648e commit 75e126f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/java/android/widget/TextView.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7682,8 +7682,9 @@ void spanChange(Spanned buf, Object what, int oldStart, int newStart, int oldEnd
76827682
}
76837683
}
76847684

7685-
if (what instanceof UpdateAppearance ||
7686-
what instanceof ParagraphStyle) {
7685+
if (what instanceof UpdateAppearance || what instanceof ParagraphStyle
7686+
|| (what instanceof SuggestionSpan && (((SuggestionSpan)what).getFlags()
7687+
& SuggestionSpan.FLAG_AUTO_CORRECTION) != 0)) {
76877688
if (ims == null || ims.mBatchEditNesting == 0) {
76887689
invalidate();
76897690
mHighlightPathBogus = true;

0 commit comments

Comments
 (0)