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
This commit is contained in:
Gilles Debunne
2011-12-13 14:47:19 -08:00
parent f0bbc494d6
commit 770f0fa92e

View File

@@ -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);
}