Loading java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java +2 −2 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ public final class AndroidSpellCheckerSession extends AndroidWordLevelSpellCheck */ private SentenceSuggestionsInfo[] splitAndSuggest(TextInfo[] textInfos, int suggestionsLimit) { if (textInfos == null || textInfos.length == 0) { return SentenceLevelAdapter.EMPTY_SENTENCE_SUGGESTIONS_INFOS; return SentenceLevelAdapter.getEmptySentenceSuggestionsInfo(); } SentenceLevelAdapter sentenceLevelAdapter; synchronized(this) { Loading @@ -168,7 +168,7 @@ public final class AndroidSpellCheckerSession extends AndroidWordLevelSpellCheck } } if (sentenceLevelAdapter == null) { return SentenceLevelAdapter.EMPTY_SENTENCE_SUGGESTIONS_INFOS; return SentenceLevelAdapter.getEmptySentenceSuggestionsInfo(); } final int infosSize = textInfos.length; final SentenceSuggestionsInfo[] retval = new SentenceSuggestionsInfo[infosSize]; Loading java/src/com/android/inputmethod/latin/spellcheck/SentenceLevelAdapter.java +9 −2 Original line number Diff line number Diff line Loading @@ -35,9 +35,16 @@ import java.util.Locale; * rewrite everything for any small change. */ public class SentenceLevelAdapter { private static class EmptySentenceSuggestionsInfosInitializationHolder { public static final SentenceSuggestionsInfo[] EMPTY_SENTENCE_SUGGESTIONS_INFOS = new SentenceSuggestionsInfo[]{}; } private static final SuggestionsInfo EMPTY_SUGGESTIONS_INFO = new SuggestionsInfo(0, null); public static SentenceSuggestionsInfo[] getEmptySentenceSuggestionsInfo() { return EmptySentenceSuggestionsInfosInitializationHolder.EMPTY_SENTENCE_SUGGESTIONS_INFOS; } /** * Container for split TextInfo parameters */ Loading Loading
java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java +2 −2 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ public final class AndroidSpellCheckerSession extends AndroidWordLevelSpellCheck */ private SentenceSuggestionsInfo[] splitAndSuggest(TextInfo[] textInfos, int suggestionsLimit) { if (textInfos == null || textInfos.length == 0) { return SentenceLevelAdapter.EMPTY_SENTENCE_SUGGESTIONS_INFOS; return SentenceLevelAdapter.getEmptySentenceSuggestionsInfo(); } SentenceLevelAdapter sentenceLevelAdapter; synchronized(this) { Loading @@ -168,7 +168,7 @@ public final class AndroidSpellCheckerSession extends AndroidWordLevelSpellCheck } } if (sentenceLevelAdapter == null) { return SentenceLevelAdapter.EMPTY_SENTENCE_SUGGESTIONS_INFOS; return SentenceLevelAdapter.getEmptySentenceSuggestionsInfo(); } final int infosSize = textInfos.length; final SentenceSuggestionsInfo[] retval = new SentenceSuggestionsInfo[infosSize]; Loading
java/src/com/android/inputmethod/latin/spellcheck/SentenceLevelAdapter.java +9 −2 Original line number Diff line number Diff line Loading @@ -35,9 +35,16 @@ import java.util.Locale; * rewrite everything for any small change. */ public class SentenceLevelAdapter { private static class EmptySentenceSuggestionsInfosInitializationHolder { public static final SentenceSuggestionsInfo[] EMPTY_SENTENCE_SUGGESTIONS_INFOS = new SentenceSuggestionsInfo[]{}; } private static final SuggestionsInfo EMPTY_SUGGESTIONS_INFO = new SuggestionsInfo(0, null); public static SentenceSuggestionsInfo[] getEmptySentenceSuggestionsInfo() { return EmptySentenceSuggestionsInfosInitializationHolder.EMPTY_SENTENCE_SUGGESTIONS_INFOS; } /** * Container for split TextInfo parameters */ Loading