Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1276295b authored by Jay Shrauner's avatar Jay Shrauner Committed by Android Git Automerger
Browse files

am a3ea4be5: Prevent SpellChecker from setting invalid range - DO NOT MERGE

* commit 'a3ea4be5':
  Prevent SpellChecker from setting invalid range - DO NOT MERGE
parents 87e9e744 a3ea4be5
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -731,10 +731,14 @@ public class SpellChecker implements SpellCheckerSessionListener {
                }
                }
            }
            }


            if (scheduleOtherSpellCheck) {
            if (scheduleOtherSpellCheck && wordStart <= end) {
                // Update range span: start new spell check from last wordStart
                // Update range span: start new spell check from last wordStart
                setRangeSpan(editable, wordStart, end);
                setRangeSpan(editable, wordStart, end);
            } else {
            } else {
                if (DBG && scheduleOtherSpellCheck) {
                    Log.w(TAG, "Trying to schedule spellcheck for invalid region, from "
                            + wordStart + " to " + end);
                }
                removeRangeSpan(editable);
                removeRangeSpan(editable);
            }
            }