summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadThread.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-03-26 11:18:16 -0700
committerJeff Sharkey <jsharkey@android.com>2013-03-26 11:18:16 -0700
commitff0220f5b4624049a1052bd868d7706eee5a0daf (patch)
tree6bd49c8d18c7094188db467f29d8cef65cb21bd6 /src/com/android/providers/downloads/DownloadThread.java
parent0f2f63932bd8d963764d37527b3237d219fdaa4d (diff)
downloadandroid_packages_providers_DownloadProvider-ff0220f5b4624049a1052bd868d7706eee5a0daf.tar.gz
android_packages_providers_DownloadProvider-ff0220f5b4624049a1052bd868d7706eee5a0daf.tar.bz2
android_packages_providers_DownloadProvider-ff0220f5b4624049a1052bd868d7706eee5a0daf.zip
Unregister observer when tearing down service.
Also reduce and adjust some logging. Bug: 8470658 Change-Id: Ia1f1cbd315ded04edd2113506e5c5a1db5ec85b4
Diffstat (limited to 'src/com/android/providers/downloads/DownloadThread.java')
-rw-r--r--src/com/android/providers/downloads/DownloadThread.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java
index f1add241..6a0eb47e 100644
--- a/src/com/android/providers/downloads/DownloadThread.java
+++ b/src/com/android/providers/downloads/DownloadThread.java
@@ -193,7 +193,7 @@ public class DownloadThread implements Runnable {
// while performing download, register for rules updates
netPolicy.registerListener(mPolicyListener);
- Log.i(Constants.TAG, "Initiating download " + mInfo.mId);
+ Log.i(Constants.TAG, "Download " + mInfo.mId + " starting");
// Remember which network this download started on; used to
// determine if errors were due to network changes.
@@ -216,9 +216,6 @@ public class DownloadThread implements Runnable {
executeDownload(state);
- if (Constants.LOGV) {
- Log.v(Constants.TAG, "download completed for " + mInfo.mUri);
- }
finalizeDestinationFile(state);
finalStatus = Downloads.Impl.STATUS_SUCCESS;
} catch (StopRequestException error) {
@@ -272,6 +269,9 @@ public class DownloadThread implements Runnable {
cleanupDestination(state, finalStatus);
notifyDownloadCompleted(state, finalStatus, errorMsg, numFailed);
+ Log.i(Constants.TAG, "Download " + mInfo.mId + " finished with status "
+ + Downloads.Impl.statusToString(finalStatus));
+
netPolicy.unregisterListener(mPolicyListener);
if (wakeLock != null) {