am 48b07124: Merge "Share decoders among latinime components."
* commit '48b071249cd662a5448ae0178e16b0b5026ee4cf': Share decoders among latinime components.main
commit
c8828eb8b4
|
@ -20,7 +20,7 @@ package com.android.inputmethod.latin;
|
||||||
* Factory for instantiating DictionaryFacilitator objects.
|
* Factory for instantiating DictionaryFacilitator objects.
|
||||||
*/
|
*/
|
||||||
public class DictionaryFacilitatorProvider {
|
public class DictionaryFacilitatorProvider {
|
||||||
public static DictionaryFacilitator getDictionaryFacilitator() {
|
public static DictionaryFacilitator getDictionaryFacilitator(boolean isNeededForSpellChecking) {
|
||||||
return new DictionaryFacilitatorImpl();
|
return new DictionaryFacilitatorImpl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,8 @@ public class DictionaryFacilitatorLruCache {
|
||||||
public DictionaryFacilitatorLruCache(final Context context, final String dictionaryNamePrefix) {
|
public DictionaryFacilitatorLruCache(final Context context, final String dictionaryNamePrefix) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mDictionaryNamePrefix = dictionaryNamePrefix;
|
mDictionaryNamePrefix = dictionaryNamePrefix;
|
||||||
mDictionaryFacilitator = DictionaryFacilitatorProvider.getDictionaryFacilitator();
|
mDictionaryFacilitator = DictionaryFacilitatorProvider.getDictionaryFacilitator(
|
||||||
|
true /* isNeededForSpellChecking */);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void waitForLoadingMainDictionary(
|
private static void waitForLoadingMainDictionary(
|
||||||
|
|
|
@ -126,7 +126,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
final Settings mSettings;
|
final Settings mSettings;
|
||||||
private final DictionaryFacilitator mDictionaryFacilitator =
|
private final DictionaryFacilitator mDictionaryFacilitator =
|
||||||
DictionaryFacilitatorProvider.getDictionaryFacilitator();
|
DictionaryFacilitatorProvider.getDictionaryFacilitator(
|
||||||
|
false /* isNeededForSpellChecking */);
|
||||||
final InputLogic mInputLogic = new InputLogic(this /* LatinIME */,
|
final InputLogic mInputLogic = new InputLogic(this /* LatinIME */,
|
||||||
this /* SuggestionStripViewAccessor */, mDictionaryFacilitator);
|
this /* SuggestionStripViewAccessor */, mDictionaryFacilitator);
|
||||||
// We expect to have only one decoder in almost all cases, hence the default capacity of 1.
|
// We expect to have only one decoder in almost all cases, hence the default capacity of 1.
|
||||||
|
|
Loading…
Reference in New Issue