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

Commit 2428ccbb authored by satok's avatar satok
Browse files

Fix spell checker framework

Change-Id: I281d031259dd220936832668e7a4556473ccb2ce
parent 0de2ed3b
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -281,9 +281,6 @@ public class SpellCheckerSession {
                        if (DBG) {
                            Log.w(TAG, "Get suggestions from the spell checker.");
                        }
                        if (scp.mTextInfos.length != 1) {
                            throw new IllegalArgumentException();
                        }
                        try {
                            session.onGetSentenceSuggestionsMultiple(
                                    scp.mTextInfos, scp.mSuggestionsLimit);
+2 −2
Original line number Diff line number Diff line
@@ -491,8 +491,8 @@ public class SpellChecker implements SpellCheckerSessionListener {
                wordStart = regionEnd;
                // TODO: Find the start position of the sentence.
                // Set span with the context
                final int spellCheckStart =  Math.min(
                        start, Math.max(wordStart, regionEnd - WORD_ITERATOR_INTERVAL));
                final int spellCheckStart =  Math.max(
                        0, Math.min(wordStart, regionEnd - WORD_ITERATOR_INTERVAL));
                if (regionEnd <= spellCheckStart) {
                    return;
                }