From 20973de72b8e3ba607d17e50bb4fbc3cc815a6eb Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 24 Aug 2011 20:27:04 +0900 Subject: [PATCH] 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 --- .../android/inputmethod/latin/BinaryDictionaryFileDumper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java index 24bb7b78a..a4f20181c 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java @@ -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.