From 770f0fa92e0745c523be466e3520d22f51e28bb1 Mon Sep 17 00:00:00 2001 From: Gilles Debunne Date: Tue, 13 Dec 2011 14:47:19 -0800 Subject: 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 --- core/java/android/widget/TextView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 67facbcb6997..b9d3d43e0a7c 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7802,7 +7802,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * Create new SpellCheckSpans on the modified region. */ private void updateSpellCheckSpans(int start, int end, boolean createSpellChecker) { - if (isTextEditable() && isSuggestionsEnabled()) { + if (isTextEditable() && isSuggestionsEnabled() && !(this instanceof ExtractEditText)) { if (mSpellChecker == null && createSpellChecker) { mSpellChecker = new SpellChecker(this); } -- cgit v1.2.3-59-g8ed1b