summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorAttila Bodis <attila@google.com>2010-01-26 14:52:32 -0800
committerAttila Bodis <attila@google.com>2010-01-26 14:52:32 -0800
commitf238ad7746d04d641f55bbed3461ba87a2ba4aeb (patch)
tree3df6b313bba7a5192c345ff88fe0906fadf91632 /core/java/android
parent9903f71b046e29bf6c1a3b7d3dc7facf372aa6f4 (diff)
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.
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/provider/Downloads.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java
index 6bf09b592528..08ab166c6571 100644
--- a/core/java/android/provider/Downloads.java
+++ b/core/java/android/provider/Downloads.java
@@ -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;
@@ -558,6 +560,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.
* @hide
@@ -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;
@@ -1054,6 +1073,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.
*/