Skip to content

Commit 770f0fa

Browse files
author
Gilles Debunne
committed
Do not spell check the foreground ExtractEditText.
Bug 5755099 In extracted text mode, we spell check the background and the foreground edit text. All changes in the background are already propagated to the foreground, and updates on the foreground may trigger a spell check of the entire text since we use setText. Change-Id: Ie44c3d9113258082ac6df5890851d0e21c702ea2
1 parent f0bbc49 commit 770f0fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/TextView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7802,7 +7802,7 @@ void spanChange(Spanned buf, Object what, int oldStart, int newStart, int oldEnd
78027802
* Create new SpellCheckSpans on the modified region.
78037803
*/
78047804
private void updateSpellCheckSpans(int start, int end, boolean createSpellChecker) {
7805-
if (isTextEditable() && isSuggestionsEnabled()) {
7805+
if (isTextEditable() && isSuggestionsEnabled() && !(this instanceof ExtractEditText)) {
78067806
if (mSpellChecker == null && createSpellChecker) {
78077807
mSpellChecker = new SpellChecker(this);
78087808
}

0 commit comments

Comments
 (0)