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
main
Jean Chalard 2011-08-24 20:27:04 +09:00
parent 1d59e0dbdf
commit 20973de72b
1 changed files with 3 additions and 1 deletions

View File

@ -168,7 +168,9 @@ public class BinaryDictionaryFileDumper {
// Success! Close files (through the finally{} clause) and return. // Success! Close files (through the finally{} clause) and return.
return AssetFileAddress.makeFromFileName(outputFileName); return AssetFileAddress.makeFromFileName(outputFileName);
} catch (Exception e) { } 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. // Try the next method.
} finally { } finally {
// Ignore exceptions while closing files. // Ignore exceptions while closing files.