aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-08-23 23:17:31 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-23 23:17:31 -0700
commit8b21eb2507c8db3e8f5ea310bccfe0cb2cd12768 (patch)
tree4084288ef0d7db84ff9e8fe0cc6845f35c568614 /java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
parentfd47b5d09c12a83145a2ee5d11473ca4f6fe3fc9 (diff)
parent7b1f74bb9ddae952f4da6c8d9bbb0057984b0988 (diff)
downloadlatinime-8b21eb2507c8db3e8f5ea310bccfe0cb2cd12768.tar.gz
latinime-8b21eb2507c8db3e8f5ea310bccfe0cb2cd12768.tar.xz
latinime-8b21eb2507c8db3e8f5ea310bccfe0cb2cd12768.zip
Merge "Refactoring: cut out a method for caching a word list"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java')
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
index 5d2dab0a9..38344300c 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
@@ -205,7 +205,7 @@ class BinaryDictionaryGetter {
* @param context the context on which to open the files upon.
* @return an array of binary dictionary files, which may be empty but may not be null.
*/
- private static File[] getCachedDictionaryList(final Locale locale,
+ private static File[] getCachedWordLists(final Locale locale,
final Context context) {
final String directoryName = getCacheDirectoryForLocale(locale, context);
final File[] cacheFiles = new File(directoryName).listFiles();
@@ -235,11 +235,11 @@ class BinaryDictionaryGetter {
public static List<AssetFileAddress> getDictionaryFiles(final Locale locale,
final Context context, final int fallbackResId) {
- // cacheDictionariesFromContentProvider returns the list of files it copied to local
+ // cacheWordListsFromContentProvider returns the list of files it copied to local
// storage, but we don't really care about what was copied NOW: what we want is the
// list of everything we ever cached, so we ignore the return value.
- BinaryDictionaryFileDumper.cacheDictionariesFromContentProvider(locale, context);
- final File[] cachedDictionaryList = getCachedDictionaryList(locale, context);
+ BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context);
+ final File[] cachedWordLists = getCachedWordLists(locale, context);
final String mainDictId = getMainDictId(locale);
@@ -247,8 +247,8 @@ class BinaryDictionaryGetter {
boolean foundMainDict = false;
final ArrayList<AssetFileAddress> fileList = new ArrayList<AssetFileAddress>();
- // cachedDictionaryList may not be null, see doc for getCachedDictionaryList
- for (final File f : cachedDictionaryList) {
+ // cachedWordLists may not be null, see doc for getCachedDictionaryList
+ for (final File f : cachedWordLists) {
final String wordListId = getWordListIdFromFileName(f.getName());
if (wordListId.equals(mainDictId)) {
foundMainDict = true;