aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/DictionaryFactory.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-11-17 18:07:35 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-11-21 12:02:06 +0900
commitebe5b42f71bd63973edffbda691b498611326c6f (patch)
tree3678307310e30775937e01d6cb2add65c1f7d52f /java/src/com/android/inputmethod/latin/DictionaryFactory.java
parenta94733cbca5bc3544fa73fa1649bbb1dadf31356 (diff)
downloadlatinime-ebe5b42f71bd63973edffbda691b498611326c6f.tar.gz
latinime-ebe5b42f71bd63973edffbda691b498611326c6f.tar.xz
latinime-ebe5b42f71bd63973edffbda691b498611326c6f.zip
Make LocaleUtils.constructLocaleFromString as @Nonnull
Change-Id: I82d574c67b25239510f3ecc8882efe46e40677eb
Diffstat (limited to 'java/src/com/android/inputmethod/latin/DictionaryFactory.java')
-rw-r--r--java/src/com/android/inputmethod/latin/DictionaryFactory.java36
1 files changed, 17 insertions, 19 deletions
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
index 3459b426d..a395fdeef 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
@@ -101,25 +101,23 @@ public final class DictionaryFactory {
}
final String wordlistId =
DictionaryInfoUtils.getWordListIdFromFileName(new File(f.mFilename).getName());
- if (null != wordlistId) {
- // TODO: this is a reasonable last resort, but it is suboptimal.
- // The following will remove the entry for this dictionary with the dictionary
- // provider. When the metadata is downloaded again, we will try downloading it
- // again.
- // However, in the practice that will mean the user will find themselves without
- // the new dictionary. That's fine for languages where it's included in the APK,
- // but for other languages it will leave the user without a dictionary at all until
- // the next update, which may be a few days away.
- // Ideally, we would trigger a new download right away, and use increasing retry
- // delays for this particular id/version combination.
- // Then again, this is expected to only ever happen in case of human mistake. If
- // the wrong file is on the server, the following is still doing the right thing.
- // If it's a file left over from the last version however, it's not great.
- BinaryDictionaryFileDumper.reportBrokenFileToDictionaryProvider(
- providerClient,
- context.getString(R.string.dictionary_pack_client_id),
- wordlistId);
- }
+ // TODO: this is a reasonable last resort, but it is suboptimal.
+ // The following will remove the entry for this dictionary with the dictionary
+ // provider. When the metadata is downloaded again, we will try downloading it
+ // again.
+ // However, in the practice that will mean the user will find themselves without
+ // the new dictionary. That's fine for languages where it's included in the APK,
+ // but for other languages it will leave the user without a dictionary at all until
+ // the next update, which may be a few days away.
+ // Ideally, we would trigger a new download right away, and use increasing retry
+ // delays for this particular id/version combination.
+ // Then again, this is expected to only ever happen in case of human mistake. If
+ // the wrong file is on the server, the following is still doing the right thing.
+ // If it's a file left over from the last version however, it's not great.
+ BinaryDictionaryFileDumper.reportBrokenFileToDictionaryProvider(
+ providerClient,
+ context.getString(R.string.dictionary_pack_client_id),
+ wordlistId);
}
}