diff options
author | Steve Howard <showard@google.com> | 2010-09-29 17:03:32 -0700 |
---|---|---|
committer | Steve Howard <showard@google.com> | 2010-09-29 17:34:40 -0700 |
commit | 3e8c1d3a467bab889de7f92379be1f43d9c2d81e (patch) | |
tree | 14e845226e29aa69b4f980e9dc10ff1c0755fffe /core/tests/coretests/src/android/app/DownloadManagerStressTest.java | |
parent | 71e2486209856d33d027389be2bd4924a03c4f86 (diff) | |
download | frameworks_base-3e8c1d3a467bab889de7f92379be1f43d9c2d81e.zip frameworks_base-3e8c1d3a467bab889de7f92379be1f43d9c2d81e.tar.gz frameworks_base-3e8c1d3a467bab889de7f92379be1f43d9c2d81e.tar.bz2 |
Have download manager give more details when downloads are paused
This change introduces more detailed reporting of why downloads are paused in
the download manager.
First, it adds new, more detailed status constants in android.provider.Downloads
for when a download is paused, in place of the old catch-all
STATUS_RUNNING_PAUSED. I've eliminated some dead code there as well to ease the
change.
Second, in the public API, it changes COLUMN_ERROR_CODE to COLUMN_REASON, which
now reports useful info for STATUS_PAUSED in addition to STATUS_FAILED. It adds
some new PAUSED_* constants for reason values when a download is paused, and
adds code to generate these values appropriately.
Change-Id: Ie617d1c2c59357375e19466086923ace5e2fb122
Diffstat (limited to 'core/tests/coretests/src/android/app/DownloadManagerStressTest.java')
-rw-r--r-- | core/tests/coretests/src/android/app/DownloadManagerStressTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/tests/coretests/src/android/app/DownloadManagerStressTest.java b/core/tests/coretests/src/android/app/DownloadManagerStressTest.java index 4ff0295..ddf138f 100644 --- a/core/tests/coretests/src/android/app/DownloadManagerStressTest.java +++ b/core/tests/coretests/src/android/app/DownloadManagerStressTest.java @@ -145,7 +145,7 @@ public class DownloadManagerStressTest extends DownloadManagerBaseTest { cursor = getCursor(dlRequest); verifyInt(cursor, DownloadManager.COLUMN_STATUS, DownloadManager.STATUS_FAILED); - verifyInt(cursor, DownloadManager.COLUMN_ERROR_CODE, + verifyInt(cursor, DownloadManager.COLUMN_REASON, DownloadManager.ERROR_INSUFFICIENT_SPACE); } finally { if (cursor != null) { |