Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -96284,6 +96284,17 @@ visibility="public" > </field> <field name="ERROR_CANNOT_RESUME" type="int" transient="false" volatile="false" value="1008" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ERROR_DEVICE_NOT_FOUND" type="int" transient="false" core/java/android/net/DownloadManager.java +11 −1 Original line number Diff line number Diff line Loading @@ -184,6 +184,12 @@ public class DownloadManager { */ public final static int ERROR_DEVICE_NOT_FOUND = 1007; /** * Value of {@link #COLUMN_ERROR_CODE} when some possibly transient error occurred but we can't * resume the download. */ public final static int ERROR_CANNOT_RESUME = 1008; /** * Broadcast intent action sent by the download manager when a download completes. */ Loading Loading @@ -715,7 +721,8 @@ public class DownloadManager { if (translateStatus(status) != STATUS_FAILED) { return 0; // arbitrary value when status is not an error } if ((400 <= status && status < 490) || (500 <= status && status < 600)) { if ((400 <= status && status < Downloads.Impl.MIN_ARTIFICIAL_ERROR_STATUS) || (500 <= status && status < 600)) { // HTTP status code return status; } Loading @@ -740,6 +747,9 @@ public class DownloadManager { case Downloads.STATUS_DEVICE_NOT_FOUND_ERROR: return ERROR_DEVICE_NOT_FOUND; case Downloads.Impl.STATUS_CANNOT_RESUME: return ERROR_CANNOT_RESUME; default: return ERROR_UNKNOWN; } Loading core/java/android/provider/Downloads.java +10 −0 Original line number Diff line number Diff line Loading @@ -1059,6 +1059,16 @@ public final class Downloads { */ public static final int STATUS_PRECONDITION_FAILED = 412; /** * The lowest-valued error status that is not an actual HTTP status code. */ public static final int MIN_ARTIFICIAL_ERROR_STATUS = 489; /** * Some possibly transient error occurred, but we can't resume the download. */ public static final int STATUS_CANNOT_RESUME = 489; /** * This download was canceled */ Loading Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -96284,6 +96284,17 @@ visibility="public" > </field> <field name="ERROR_CANNOT_RESUME" type="int" transient="false" volatile="false" value="1008" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ERROR_DEVICE_NOT_FOUND" type="int" transient="false"
core/java/android/net/DownloadManager.java +11 −1 Original line number Diff line number Diff line Loading @@ -184,6 +184,12 @@ public class DownloadManager { */ public final static int ERROR_DEVICE_NOT_FOUND = 1007; /** * Value of {@link #COLUMN_ERROR_CODE} when some possibly transient error occurred but we can't * resume the download. */ public final static int ERROR_CANNOT_RESUME = 1008; /** * Broadcast intent action sent by the download manager when a download completes. */ Loading Loading @@ -715,7 +721,8 @@ public class DownloadManager { if (translateStatus(status) != STATUS_FAILED) { return 0; // arbitrary value when status is not an error } if ((400 <= status && status < 490) || (500 <= status && status < 600)) { if ((400 <= status && status < Downloads.Impl.MIN_ARTIFICIAL_ERROR_STATUS) || (500 <= status && status < 600)) { // HTTP status code return status; } Loading @@ -740,6 +747,9 @@ public class DownloadManager { case Downloads.STATUS_DEVICE_NOT_FOUND_ERROR: return ERROR_DEVICE_NOT_FOUND; case Downloads.Impl.STATUS_CANNOT_RESUME: return ERROR_CANNOT_RESUME; default: return ERROR_UNKNOWN; } Loading
core/java/android/provider/Downloads.java +10 −0 Original line number Diff line number Diff line Loading @@ -1059,6 +1059,16 @@ public final class Downloads { */ public static final int STATUS_PRECONDITION_FAILED = 412; /** * The lowest-valued error status that is not an actual HTTP status code. */ public static final int MIN_ARTIFICIAL_ERROR_STATUS = 489; /** * Some possibly transient error occurred, but we can't resume the download. */ public static final int STATUS_CANNOT_RESUME = 489; /** * This download was canceled */ Loading