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

Commit 3154fc45 authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Fix spell checker framework"

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