From d711426a87ed131c527beb8f7a9160daa14d1f94 Mon Sep 17 00:00:00 2001 From: Jatin Matani Date: Thu, 9 Jul 2015 11:50:10 -0700 Subject: Remove android.util.Log from FileUtils FileUtils is being used for other non android projects and hence breaks when built. Instead use the log statements at caller to record Log.e messages. Hence there is no side effect here. Bug:22042371 Change-Id: Ieb100006ff38e013bc30542637465f58bfc0f2f2 --- .../src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java') diff --git a/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java b/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java index 11cccd5fa..cea2e13b1 100644 --- a/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java @@ -314,7 +314,10 @@ public class DictionaryInfoUtils { final String cacheFilename = cacheDirectoryForLocale + File.separator + fileId; final File cacheFile = new File(cacheFilename); // move the staging file to cache file. - FileUtils.renameTo(stagingFile, cacheFile); + if (!FileUtils.renameTo(stagingFile, cacheFile)) { + Log.e(TAG, String.format("Failed to rename from %s to %s.", + stagingFile.getAbsoluteFile(), cacheFile.getAbsoluteFile())); + } } } } -- cgit v1.2.3-83-g751a