From 5e4c0caac31edcb48e851b2aefe7851c69abaf36 Mon Sep 17 00:00:00 2001 From: Dan Zivkovic Date: Wed, 24 Jun 2015 18:54:14 -0700 Subject: [PATCH] Add some more logging. Why not. Change-Id: I536212e1b3c35d75ed93f9ab3762908e3deb9a97 --- .../android/inputmethod/dictionarypack/UpdateHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java index 93725729c..df3fd4060 100644 --- a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java +++ b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java @@ -416,8 +416,7 @@ public final class UpdateHandler { /* package */ static void downloadFinished(final Context context, final Intent intent) { // Get and check the ID of the file that was downloaded final long fileId = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, NOT_AN_ID); - PrivateLog.log("Download finished with id " + fileId); - DebugLogUtils.l("DownloadFinished with id", fileId); + Log.i(TAG, "downloadFinished() : DownloadId = " + fileId); if (NOT_AN_ID == fileId) return; // Spurious wake-up: ignore final DownloadManagerWrapper manager = new DownloadManagerWrapper(context); @@ -439,11 +438,15 @@ public final class UpdateHandler { try { if (downloadInfo.wasSuccessful()) { downloadSuccessful = handleDownloadedFile(context, record, manager, fileId); + Log.i(TAG, "downloadFinished() : Success = " + downloadSuccessful); } } finally { + final String resultMessage = downloadSuccessful ? "Success" : "Failure"; if (record.isMetadata()) { + Log.i(TAG, "downloadFinished() : Metadata " + resultMessage); publishUpdateMetadataCompleted(context, downloadSuccessful); } else { + Log.i(TAG, "downloadFinished() : WordList " + resultMessage); final SQLiteDatabase db = MetadataDbHelper.getDb(context, record.mClientId); publishUpdateWordListCompleted(context, downloadSuccessful, fileId, db, record.mAttributes, record.mClientId);