Skip to content
Snippets Groups Projects
Commit a8c9946b authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Remember the locale in the Suggest object (A1)"

parents 7bb8e95b 8e17f6d9
No related branches found
No related tags found
No related merge requests found
......@@ -91,16 +91,21 @@ public class Suggest {
private boolean mIsAllUpperCase;
private int mTrailingSingleQuotesCount;
// Locale used for upper- and title-casing words
final private Locale mLocale;
private static final int MINIMUM_SAFETY_NET_CHAR_LENGTH = 4;
public Suggest(final Context context, final Locale locale) {
initAsynchronously(context, locale);
mLocale = locale;
}
/* package for test */ Suggest(final Context context, final File dictionary,
final long startOffset, final long length, final Locale locale) {
final Dictionary mainDict = DictionaryFactory.createDictionaryForTest(context, dictionary,
startOffset, length /* useFullEditDistance */, false, locale);
mLocale = locale;
mMainDictionary = mainDict;
addOrReplaceDictionary(mDictionaries, DICT_KEY_MAIN, mainDict);
initWhitelistAndAutocorrectAndPool(context, locale);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment