Merge "Use different user dict name for spell checker."
commit
dff7153820
|
@ -86,7 +86,12 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary {
|
||||||
|
|
||||||
public UserBinaryDictionary(final Context context, final Locale locale,
|
public UserBinaryDictionary(final Context context, final Locale locale,
|
||||||
final boolean alsoUseMoreRestrictiveLocales, final File dictFile) {
|
final boolean alsoUseMoreRestrictiveLocales, final File dictFile) {
|
||||||
super(context, getDictName(NAME, locale, dictFile), locale, Dictionary.TYPE_USER, dictFile);
|
this(context, locale, alsoUseMoreRestrictiveLocales, dictFile, NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected UserBinaryDictionary(final Context context, final Locale locale,
|
||||||
|
final boolean alsoUseMoreRestrictiveLocales, final File dictFile, final String name) {
|
||||||
|
super(context, getDictName(name, locale, dictFile), locale, Dictionary.TYPE_USER, dictFile);
|
||||||
if (null == locale) throw new NullPointerException(); // Catch the error earlier
|
if (null == locale) throw new NullPointerException(); // Catch the error earlier
|
||||||
final String localeStr = locale.toString();
|
final String localeStr = locale.toString();
|
||||||
if (SubtypeLocaleUtils.NO_LANGUAGE.equals(localeStr)) {
|
if (SubtypeLocaleUtils.NO_LANGUAGE.equals(localeStr)) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public final class SynchronouslyLoadedUserBinaryDictionary extends UserBinaryDictionary {
|
public final class SynchronouslyLoadedUserBinaryDictionary extends UserBinaryDictionary {
|
||||||
|
private static final String NAME = "spellcheck_user";
|
||||||
private final Object mLock = new Object();
|
private final Object mLock = new Object();
|
||||||
|
|
||||||
public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale) {
|
public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale) {
|
||||||
|
@ -35,7 +36,7 @@ public final class SynchronouslyLoadedUserBinaryDictionary extends UserBinaryDic
|
||||||
|
|
||||||
public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale,
|
public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale,
|
||||||
final boolean alsoUseMoreRestrictiveLocales) {
|
final boolean alsoUseMoreRestrictiveLocales) {
|
||||||
super(context, locale, alsoUseMoreRestrictiveLocales, null /* dictFile */);
|
super(context, locale, alsoUseMoreRestrictiveLocales, null /* dictFile */, NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue