b/2383073 Add fine-grained status codes for failed downloads.

Introduces new download status codes (STATUS_DEVICE_NOT_FOUND_ERROR and
STATUS_INSUFFICIENT_SPACE_ERROR) to allow apps to show more accurate and
informative error messages upon failed downloads.
This commit is contained in:
Attila Bodis
2010-01-26 14:52:32 -08:00
parent 9903f71b04
commit f238ad7746

View File

@@ -517,6 +517,8 @@ public final class Downloads {
/**
* This download couldn't be completed because of a storage issue.
* Typically, that's because the filesystem is missing or full.
* Use the more specific {@link #STATUS_INSUFFICIENT_SPACE_ERROR}
* and {@link #STATUS_DEVICE_NOT_FOUND_ERROR} when appropriate.
* @hide
*/
public static final int STATUS_FILE_ERROR = 492;
@@ -557,6 +559,21 @@ public final class Downloads {
*/
public static final int STATUS_TOO_MANY_REDIRECTS = 497;
/**
* This download couldn't be completed due to insufficient storage
* space. Typically, this is because the SD card is full.
* @hide
*/
public static final int STATUS_INSUFFICIENT_SPACE_ERROR = 498;
/**
* This download couldn't be completed because no external storage
* device was found. Typically, this is because the SD card is not
* mounted.
* @hide
*/
public static final int STATUS_DEVICE_NOT_FOUND_ERROR = 499;
/**
* This download is visible but only shows in the notifications
* while it's in progress.
@@ -1019,6 +1036,8 @@ public final class Downloads {
/**
* This download couldn't be completed because of a storage issue.
* Typically, that's because the filesystem is missing or full.
* Use the more specific {@link #STATUS_INSUFFICIENT_SPACE_ERROR}
* and {@link #STATUS_DEVICE_NOT_FOUND_ERROR} when appropriate.
*/
public static final int STATUS_FILE_ERROR = 492;
@@ -1053,6 +1072,19 @@ public final class Downloads {
*/
public static final int STATUS_TOO_MANY_REDIRECTS = 497;
/**
* This download couldn't be completed due to insufficient storage
* space. Typically, this is because the SD card is full.
*/
public static final int STATUS_INSUFFICIENT_SPACE_ERROR = 498;
/**
* This download couldn't be completed because no external storage
* device was found. Typically, this is because the SD card is not
* mounted.
*/
public static final int STATUS_DEVICE_NOT_FOUND_ERROR = 499;
/**
* This download is visible but only shows in the notifications
* while it's in progress.