Loading core/java/android/view/textservice/SpellCheckerSession.java +0 −3 Original line number Diff line number Diff line Loading @@ -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); Loading core/java/android/widget/SpellChecker.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading
core/java/android/view/textservice/SpellCheckerSession.java +0 −3 Original line number Diff line number Diff line Loading @@ -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); Loading
core/java/android/widget/SpellChecker.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading