Avoid unnecessary output to the system log.

The message this removes gets printed under normal conditions.
Normally dictionary files are compressed then crypted, but not
compressed a second time; however LatinIME tries to open a
compressed-crypted-compressed file first, because it could not
do it afterwards and we want to support this case. So under
normal operations, the first method LatinIME tries is actually
expected to fail.
Also, if we decide to stop compressing or/and encrypting dicts
LatinIME supports it as a valid use case. It should not print
errors to the log.

If the file cannot be open at all, then it is an unexpected
case, and Latin IME still reports to the log.

Change-Id: Ic5228c51365a101af1d03e2c893484d3050b5a1c
This commit is contained in:
Jean Chalard 2011-08-24 20:27:04 +09:00
parent 1d59e0dbdf
commit 20973de72b

View File

@ -168,7 +168,9 @@ public class BinaryDictionaryFileDumper {
// Success! Close files (through the finally{} clause) and return.
return AssetFileAddress.makeFromFileName(outputFileName);
} catch (Exception e) {
Log.e(TAG, "Can't open word list in mode " + mode + " : " + e);
if (DEBUG) {
Log.i(TAG, "Can't open word list in mode " + mode + " : " + e);
}
// Try the next method.
} finally {
// Ignore exceptions while closing files.