diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-07-20 16:06:35 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-07-20 16:06:59 -0700 |
commit | ebcc93801eb9545004536587d10f82db378aeab5 (patch) | |
tree | 2fae19d343c764f209bff040e7ae6d798c212d50 /src/com/android/providers/downloads/DownloadThread.java | |
parent | 450e3aa05e4109ed0c75d1193d8601a960c692dd (diff) | |
download | android_packages_providers_DownloadProvider-ebcc93801eb9545004536587d10f82db378aeab5.tar.gz android_packages_providers_DownloadProvider-ebcc93801eb9545004536587d10f82db378aeab5.tar.bz2 android_packages_providers_DownloadProvider-ebcc93801eb9545004536587d10f82db378aeab5.zip |
Reduce deletion logging.
Bug: 6544953
Change-Id: I4157c67b9b9cddab4ade795c328a202f6a230f95
Diffstat (limited to 'src/com/android/providers/downloads/DownloadThread.java')
-rw-r--r-- | src/com/android/providers/downloads/DownloadThread.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index bd91eaa1..37db32b1 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -33,7 +33,6 @@ import android.provider.Downloads; import android.text.TextUtils; import android.util.Log; import android.util.Pair; -import android.util.Slog; import org.apache.http.Header; import org.apache.http.HttpResponse; @@ -330,7 +329,9 @@ public class DownloadThread extends Thread { closeDestination(state); if (state.mFilename != null && Downloads.Impl.isStatusError(finalStatus)) { - Slog.d(TAG, "cleanupDestination() deleting " + state.mFilename); + if (Constants.LOGVV) { + Log.d(TAG, "cleanupDestination() deleting " + state.mFilename); + } new File(state.mFilename).delete(); state.mFilename = null; } @@ -847,8 +848,10 @@ public class DownloadThread extends Thread { long fileLength = f.length(); if (fileLength == 0) { // The download hadn't actually started, we can restart from scratch - Slog.d(TAG, "setupDestinationFile() found fileLength=0, deleting " - + state.mFilename); + if (Constants.LOGVV) { + Log.d(TAG, "setupDestinationFile() found fileLength=0, deleting " + + state.mFilename); + } f.delete(); state.mFilename = null; if (Constants.LOGV) { @@ -857,8 +860,10 @@ public class DownloadThread extends Thread { } } else if (mInfo.mETag == null && !mInfo.mNoIntegrity) { // This should've been caught upon failure - Slog.d(TAG, "setupDestinationFile() unable to resume download, deleting " - + state.mFilename); + if (Constants.LOGVV) { + Log.d(TAG, "setupDestinationFile() unable to resume download, deleting " + + state.mFilename); + } f.delete(); throw new StopRequestException(Downloads.Impl.STATUS_CANNOT_RESUME, "Trying to resume a download that can't be resumed"); |