summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadThread.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2012-04-19 20:51:24 -0700
committerJeff Sharkey <jsharkey@android.com>2012-04-19 20:51:24 -0700
commitf8b1f373fd884fffe384acf564d0a4e374de8e02 (patch)
treef6b4c327a5658de96d3f3f9e715e38c15b68cd30 /src/com/android/providers/downloads/DownloadThread.java
parentc3f3d992e415185a8e2d89ab8f8dfbcb538ec21e (diff)
downloadandroid_packages_providers_DownloadProvider-f8b1f373fd884fffe384acf564d0a4e374de8e02.tar.gz
android_packages_providers_DownloadProvider-f8b1f373fd884fffe384acf564d0a4e374de8e02.tar.bz2
android_packages_providers_DownloadProvider-f8b1f373fd884fffe384acf564d0a4e374de8e02.zip
More slogging around download deletion.
Bug: 6362988 Change-Id: Iab4b86cfcaa6aeed6466f88ff49eb935f96db495
Diffstat (limited to 'src/com/android/providers/downloads/DownloadThread.java')
-rw-r--r--src/com/android/providers/downloads/DownloadThread.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java
index 4de5134b..bd91eaa1 100644
--- a/src/com/android/providers/downloads/DownloadThread.java
+++ b/src/com/android/providers/downloads/DownloadThread.java
@@ -16,6 +16,8 @@
package com.android.providers.downloads;
+import static com.android.providers.downloads.Constants.TAG;
+
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
@@ -31,6 +33,7 @@ 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;
@@ -327,6 +330,7 @@ public class DownloadThread extends Thread {
closeDestination(state);
if (state.mFilename != null && Downloads.Impl.isStatusError(finalStatus)) {
+ Slog.d(TAG, "cleanupDestination() deleting " + state.mFilename);
new File(state.mFilename).delete();
state.mFilename = null;
}
@@ -843,6 +847,8 @@ 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);
f.delete();
state.mFilename = null;
if (Constants.LOGV) {
@@ -851,6 +857,8 @@ 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);
f.delete();
throw new StopRequestException(Downloads.Impl.STATUS_CANNOT_RESUME,
"Trying to resume a download that can't be resumed");