diff options
author | 2014-11-28 03:05:43 +0000 | |
---|---|---|
committer | 2014-11-28 03:05:43 +0000 | |
commit | c9952fa7d089870a17dddb30e56ad7347cb37669 (patch) | |
tree | 63cd35877445e24cda51b94bdbd85ad6ce03bf6f /java/src/com/android/inputmethod/latin/DictionaryFactory.java | |
parent | 4ea7092aa320c3e5962cafd9c451caa98e54b1b6 (diff) | |
parent | 063b2e8d7141641dff06093c807e75737a082818 (diff) | |
download | latinime-c9952fa7d089870a17dddb30e56ad7347cb37669.tar.gz latinime-c9952fa7d089870a17dddb30e56ad7347cb37669.tar.xz latinime-c9952fa7d089870a17dddb30e56ad7347cb37669.zip |
am 063b2e8d: Merge "Make LocaleUtils.constructLocaleFromString as @Nonnull"
* commit '063b2e8d7141641dff06093c807e75737a082818':
Make LocaleUtils.constructLocaleFromString as @Nonnull
Diffstat (limited to 'java/src/com/android/inputmethod/latin/DictionaryFactory.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/DictionaryFactory.java | 36 |
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 4de1f99af..781ab06c5 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java @@ -98,25 +98,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); } } |