From a4c82c1c78cdd37e0dea1b5b2f44c25cc584034c Mon Sep 17 00:00:00 2001 From: satok Date: Wed, 9 May 2012 11:20:17 +0900 Subject: Not to add invalid spell check spans Bug: 6464197 Change-Id: I6e9d359847b200e2afae61f85eb7cfe7f179b888 --- core/java/android/widget/SpellChecker.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/java') diff --git a/core/java/android/widget/SpellChecker.java b/core/java/android/widget/SpellChecker.java index e1103dd..11e15df 100644 --- a/core/java/android/widget/SpellChecker.java +++ b/core/java/android/widget/SpellChecker.java @@ -611,6 +611,9 @@ public class SpellChecker implements SpellCheckerSessionListener { if (spellCheckEnd < start) { break; } + if (spellCheckEnd <= spellCheckStart) { + break; + } if (createSpellCheckSpan) { addSpellCheckSpan(editable, spellCheckStart, spellCheckEnd); } -- cgit v1.1