Merge "Properly invalidate text classification cache." into oc-dev

This commit is contained in:
Abodunrinwa Toki
2017-05-12 23:07:57 +00:00
committed by Android (Google) Code Review

View File

@@ -400,6 +400,7 @@ final class SelectionActionModeHelper {
CharSequence text, int selectionStart, int selectionEnd, LocaleList locales) {
mTextClassifier = Preconditions.checkNotNull(textClassifier);
mText = Preconditions.checkNotNull(text).toString();
mLastClassificationText = null; // invalidate.
Preconditions.checkArgument(selectionEnd > selectionStart);
mSelectionStart = selectionStart;
mSelectionEnd = selectionEnd;