diff options
author | Vasu Nori <vnori@google.com> | 2011-02-08 17:16:41 -0800 |
---|---|---|
committer | Vasu Nori <vnori@google.com> | 2011-02-08 18:10:11 -0800 |
commit | 789745f667c65661d82ccbd5ef49fdb132911736 (patch) | |
tree | c264e45bc316434d3af7f9915828fb45f0441e5b /src/com/android/providers/downloads/DownloadService.java | |
parent | 7806290088fbd6f802288021ec551ddd9469892a (diff) | |
download | android_packages_providers_DownloadProvider-789745f667c65661d82ccbd5ef49fdb132911736.tar.gz android_packages_providers_DownloadProvider-789745f667c65661d82ccbd5ef49fdb132911736.tar.bz2 android_packages_providers_DownloadProvider-789745f667c65661d82ccbd5ef49fdb132911736.zip |
bug:3435895 listen to media_mounted broadcast intent
and retry downloads that failed due to the error "sdcard media not mounted"
Change-Id: Id181b8167d331214f72679c85f18cc8b9b969e40
Diffstat (limited to 'src/com/android/providers/downloads/DownloadService.java')
-rw-r--r-- | src/com/android/providers/downloads/DownloadService.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java index d06c8803..83001fd1 100644 --- a/src/com/android/providers/downloads/DownloadService.java +++ b/src/com/android/providers/downloads/DownloadService.java @@ -301,7 +301,10 @@ public class DownloadService extends Service { DownloadInfo.Reader reader = new DownloadInfo.Reader(getContentResolver(), cursor); int idColumn = cursor.getColumnIndexOrThrow(Downloads.Impl._ID); - + if (Constants.LOGVV) { + Log.i(Constants.TAG, "number of rows from downloads-db: " + + cursor.getCount()); + } for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) { long id = cursor.getLong(idColumn); idsNoLongerInDatabase.remove(id); @@ -425,7 +428,7 @@ public class DownloadService extends Service { mDownloads.put(info.mId, info); if (Constants.LOGVV) { - info.logVerboseInfo(); + Log.v(Constants.TAG, "processing inserted download " + info.mId); } info.startIfReady(now, mStorageManager); @@ -440,6 +443,8 @@ public class DownloadService extends Service { int oldStatus = info.mStatus; reader.updateFromDatabase(info); + Log.v(Constants.TAG, "processing updated download " + info.mId + + ", status: " + info.mStatus); boolean lostVisibility = oldVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED |