am d33f7e84: am ac82983f: am 6d7a0810: Merge "Fix a verifier error on ICS." into lmp-dev
* commit 'd33f7e84ab44bb27c82c300b431518bb48919883': Fix a verifier error on ICS.main
commit
275079c9ae
|
@ -153,7 +153,7 @@ public final class AndroidSpellCheckerSession extends AndroidWordLevelSpellCheck
|
||||||
*/
|
*/
|
||||||
private SentenceSuggestionsInfo[] splitAndSuggest(TextInfo[] textInfos, int suggestionsLimit) {
|
private SentenceSuggestionsInfo[] splitAndSuggest(TextInfo[] textInfos, int suggestionsLimit) {
|
||||||
if (textInfos == null || textInfos.length == 0) {
|
if (textInfos == null || textInfos.length == 0) {
|
||||||
return SentenceLevelAdapter.EMPTY_SENTENCE_SUGGESTIONS_INFOS;
|
return SentenceLevelAdapter.getEmptySentenceSuggestionsInfo();
|
||||||
}
|
}
|
||||||
SentenceLevelAdapter sentenceLevelAdapter;
|
SentenceLevelAdapter sentenceLevelAdapter;
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
|
@ -168,7 +168,7 @@ public final class AndroidSpellCheckerSession extends AndroidWordLevelSpellCheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sentenceLevelAdapter == null) {
|
if (sentenceLevelAdapter == null) {
|
||||||
return SentenceLevelAdapter.EMPTY_SENTENCE_SUGGESTIONS_INFOS;
|
return SentenceLevelAdapter.getEmptySentenceSuggestionsInfo();
|
||||||
}
|
}
|
||||||
final int infosSize = textInfos.length;
|
final int infosSize = textInfos.length;
|
||||||
final SentenceSuggestionsInfo[] retval = new SentenceSuggestionsInfo[infosSize];
|
final SentenceSuggestionsInfo[] retval = new SentenceSuggestionsInfo[infosSize];
|
||||||
|
|
|
@ -35,9 +35,16 @@ import java.util.Locale;
|
||||||
* rewrite everything for any small change.
|
* rewrite everything for any small change.
|
||||||
*/
|
*/
|
||||||
public class SentenceLevelAdapter {
|
public class SentenceLevelAdapter {
|
||||||
public static final SentenceSuggestionsInfo[] EMPTY_SENTENCE_SUGGESTIONS_INFOS =
|
private static class EmptySentenceSuggestionsInfosInitializationHolder {
|
||||||
new SentenceSuggestionsInfo[] {};
|
public static final SentenceSuggestionsInfo[] EMPTY_SENTENCE_SUGGESTIONS_INFOS =
|
||||||
|
new SentenceSuggestionsInfo[]{};
|
||||||
|
}
|
||||||
private static final SuggestionsInfo EMPTY_SUGGESTIONS_INFO = new SuggestionsInfo(0, null);
|
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
|
* Container for split TextInfo parameters
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue