aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/DictionaryFactory.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-27 18:08:08 +0900
committerJean Chalard <jchalard@google.com>2012-06-27 18:08:08 +0900
commitd8f0caa406a0ca1df488baeb3af05528085755b7 (patch)
tree94f31d3fbbbcd0ff78da3fdfb2d398665ff2f926 /java/src/com/android/inputmethod/latin/DictionaryFactory.java
parent089c11a08665d3670be9ca1678ac06545ecfcd6f (diff)
downloadlatinime-d8f0caa406a0ca1df488baeb3af05528085755b7.tar.gz
latinime-d8f0caa406a0ca1df488baeb3af05528085755b7.tar.xz
latinime-d8f0caa406a0ca1df488baeb3af05528085755b7.zip
Move constants to a better place.
Change-Id: I5c27a3ed99b17f850e26a8503de16f001c7111c1
Diffstat (limited to 'java/src/com/android/inputmethod/latin/DictionaryFactory.java')
-rw-r--r--java/src/com/android/inputmethod/latin/DictionaryFactory.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
index 7ccfe05cf..06a5f4b72 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
@@ -49,7 +49,7 @@ public class DictionaryFactory {
final Locale locale, final boolean useFullEditDistance) {
if (null == locale) {
Log.e(TAG, "No locale defined for dictionary");
- return new DictionaryCollection(Suggest.DICT_KEY_MAIN,
+ return new DictionaryCollection(Dictionary.TYPE_MAIN,
createBinaryDictionary(context, locale));
}
@@ -60,7 +60,7 @@ public class DictionaryFactory {
for (final AssetFileAddress f : assetFileList) {
final BinaryDictionary binaryDictionary =
new BinaryDictionary(context, f.mFilename, f.mOffset, f.mLength,
- useFullEditDistance, locale, Suggest.DICT_KEY_MAIN);
+ useFullEditDistance, locale, Dictionary.TYPE_MAIN);
if (binaryDictionary.isValidDictionary()) {
dictList.add(binaryDictionary);
}
@@ -70,7 +70,7 @@ public class DictionaryFactory {
// If the list is empty, that means we should not use any dictionary (for example, the user
// explicitly disabled the main dictionary), so the following is okay. dictList is never
// null, but if for some reason it is, DictionaryCollection handles it gracefully.
- return new DictionaryCollection(Suggest.DICT_KEY_MAIN, dictList);
+ return new DictionaryCollection(Dictionary.TYPE_MAIN, dictList);
}
/**
@@ -113,7 +113,7 @@ public class DictionaryFactory {
return null;
}
return new BinaryDictionary(context, sourceDir, afd.getStartOffset(), afd.getLength(),
- false /* useFullEditDistance */, locale, Suggest.DICT_KEY_MAIN);
+ false /* useFullEditDistance */, locale, Dictionary.TYPE_MAIN);
} catch (android.content.res.Resources.NotFoundException e) {
Log.e(TAG, "Could not find the resource");
return null;
@@ -141,7 +141,7 @@ public class DictionaryFactory {
long startOffset, long length, final boolean useFullEditDistance, Locale locale) {
if (dictionary.isFile()) {
return new BinaryDictionary(context, dictionary.getAbsolutePath(), startOffset, length,
- useFullEditDistance, locale, Suggest.DICT_KEY_MAIN);
+ useFullEditDistance, locale, Dictionary.TYPE_MAIN);
} else {
Log.e(TAG, "Could not find the file. path=" + dictionary.getAbsolutePath());
return null;