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

Commit 08925e65 authored by Abodunrinwa Toki's avatar Abodunrinwa Toki
Browse files

Properly invalidate text classification cache.

Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: I02b77fc0edf53d13b1623631f4521487cd0bf081
Fixes: 38247676
parent 6bf9b9a5
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -400,6 +400,7 @@ final class SelectionActionModeHelper {
                CharSequence text, int selectionStart, int selectionEnd, LocaleList locales) {
                CharSequence text, int selectionStart, int selectionEnd, LocaleList locales) {
            mTextClassifier = Preconditions.checkNotNull(textClassifier);
            mTextClassifier = Preconditions.checkNotNull(textClassifier);
            mText = Preconditions.checkNotNull(text).toString();
            mText = Preconditions.checkNotNull(text).toString();
            mLastClassificationText = null; // invalidate.
            Preconditions.checkArgument(selectionEnd > selectionStart);
            Preconditions.checkArgument(selectionEnd > selectionStart);
            mSelectionStart = selectionStart;
            mSelectionStart = selectionStart;
            mSelectionEnd = selectionEnd;
            mSelectionEnd = selectionEnd;