Merge "Use different contacts dict name for spell checker."

main
Keisuke Kuroyanagi 2014-04-28 07:58:41 +00:00 committed by Android (Google) Code Review
commit a5202c7143
2 changed files with 8 additions and 2 deletions

View File

@ -77,7 +77,12 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary {
public ContactsBinaryDictionary(final Context context, final Locale locale, public ContactsBinaryDictionary(final Context context, final Locale locale,
final File dictFile) { final File dictFile) {
super(context, getDictName(NAME, locale, dictFile), locale, Dictionary.TYPE_CONTACTS, this(context, locale, dictFile, NAME);
}
protected ContactsBinaryDictionary(final Context context, final Locale locale,
final File dictFile, final String name) {
super(context, getDictName(name, locale, dictFile), locale, Dictionary.TYPE_CONTACTS,
dictFile); dictFile);
mLocale = locale; mLocale = locale;
mUseFirstLastBigrams = useFirstLastBigramsForLocale(locale); mUseFirstLastBigrams = useFirstLastBigramsForLocale(locale);

View File

@ -27,10 +27,11 @@ import java.util.ArrayList;
import java.util.Locale; import java.util.Locale;
public final class SynchronouslyLoadedContactsBinaryDictionary extends ContactsBinaryDictionary { public final class SynchronouslyLoadedContactsBinaryDictionary extends ContactsBinaryDictionary {
private static final String NAME = "spellcheck_contacts";
private final Object mLock = new Object(); private final Object mLock = new Object();
public SynchronouslyLoadedContactsBinaryDictionary(final Context context, final Locale locale) { public SynchronouslyLoadedContactsBinaryDictionary(final Context context, final Locale locale) {
super(context, locale); super(context, locale, null /* dictFile */, NAME);
} }
@Override @Override