diff options
| author | 2012-03-08 06:12:59 -0800 | |
|---|---|---|
| committer | 2012-03-08 06:12:59 -0800 | |
| commit | a4fb0cb1fe63262170c13a7853be4ccd45083670 (patch) | |
| tree | 70bc2a78c30b7c78ae12b9208767f26d24286ddb | |
| parent | ffb66ec254d8266c03cf37b2937fe0570a3e8e24 (diff) | |
| parent | fe5a51ee0440beb54f9ccba8b85f43b5f47f4cc2 (diff) | |
Merge "Optimization of the request of the sentence level spell check"
| -rw-r--r-- | core/java/android/widget/SpellChecker.java | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/core/java/android/widget/SpellChecker.java b/core/java/android/widget/SpellChecker.java index 4f700a2d75b1..9afaee3c786c 100644 --- a/core/java/android/widget/SpellChecker.java +++ b/core/java/android/widget/SpellChecker.java @@ -494,6 +494,10 @@ public class SpellChecker implements SpellCheckerSessionListener {                      editable.removeSpan(mRange);                      return;                  } +                // Stop spell checking when there are no characters in the range. +                if (wordEnd < start) { +                    return; +                }                  wordStart = regionEnd;                  // TODO: Find the start position of the sentence.                  // Set span with the context |