summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brad Ebinger <breadley@google.com> 2017-10-11 22:56:47 +0000
committer android-build-merger <android-build-merger@google.com> 2017-10-11 22:56:47 +0000
commitbb38194a552bd69ac855a8eaf1e400a95170c461 (patch)
treedc131ef5462f0f480eb035a08312900336cc762c
parent6530612cee5ebdf4c1f38c09699d3ccf46794ed6 (diff)
parent014d73e287ca91bb3dbffd11684cb81b7e6101f6 (diff)
Merge "Add new Download Error Codes" am: e9bd5449b5 am: 946ff79971
am: 014d73e287 Change-Id: I7c7dc265bf5ba27b61794d114937c2c4c0816470
-rw-r--r--api/current.txt4
-rw-r--r--api/system-current.txt4
-rw-r--r--api/test-current.txt4
-rw-r--r--telephony/java/android/telephony/MbmsDownloadSession.java41
4 files changed, 48 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt
index 5ee2e6cd35a9..df0413df64b5 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -39994,8 +39994,12 @@ package android.telephony {
field public static final java.lang.String EXTRA_MBMS_DOWNLOAD_RESULT = "android.telephony.extra.MBMS_DOWNLOAD_RESULT";
field public static final java.lang.String EXTRA_MBMS_FILE_INFO = "android.telephony.extra.MBMS_FILE_INFO";
field public static final int RESULT_CANCELLED = 2; // 0x2
+ field public static final int RESULT_DOWNLOAD_FAILURE = 6; // 0x6
field public static final int RESULT_EXPIRED = 3; // 0x3
+ field public static final int RESULT_FILE_ROOT_UNREACHABLE = 8; // 0x8
field public static final int RESULT_IO_ERROR = 4; // 0x4
+ field public static final int RESULT_OUT_OF_STORAGE = 7; // 0x7
+ field public static final int RESULT_SERVICE_ID_NOT_DEFINED = 5; // 0x5
field public static final int RESULT_SUCCESSFUL = 1; // 0x1
field public static final int STATUS_ACTIVELY_DOWNLOADING = 1; // 0x1
field public static final int STATUS_PENDING_DOWNLOAD = 2; // 0x2
diff --git a/api/system-current.txt b/api/system-current.txt
index 878c7e93222a..54e49b77ee83 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -43437,8 +43437,12 @@ package android.telephony {
field public static final java.lang.String EXTRA_MBMS_FILE_INFO = "android.telephony.extra.MBMS_FILE_INFO";
field public static final java.lang.String MBMS_DOWNLOAD_SERVICE_ACTION = "android.telephony.action.EmbmsDownload";
field public static final int RESULT_CANCELLED = 2; // 0x2
+ field public static final int RESULT_DOWNLOAD_FAILURE = 6; // 0x6
field public static final int RESULT_EXPIRED = 3; // 0x3
+ field public static final int RESULT_FILE_ROOT_UNREACHABLE = 8; // 0x8
field public static final int RESULT_IO_ERROR = 4; // 0x4
+ field public static final int RESULT_OUT_OF_STORAGE = 7; // 0x7
+ field public static final int RESULT_SERVICE_ID_NOT_DEFINED = 5; // 0x5
field public static final int RESULT_SUCCESSFUL = 1; // 0x1
field public static final int STATUS_ACTIVELY_DOWNLOADING = 1; // 0x1
field public static final int STATUS_PENDING_DOWNLOAD = 2; // 0x2
diff --git a/api/test-current.txt b/api/test-current.txt
index f7306c509e4f..0e6f150cbd9b 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -40265,8 +40265,12 @@ package android.telephony {
field public static final java.lang.String EXTRA_MBMS_DOWNLOAD_RESULT = "android.telephony.extra.MBMS_DOWNLOAD_RESULT";
field public static final java.lang.String EXTRA_MBMS_FILE_INFO = "android.telephony.extra.MBMS_FILE_INFO";
field public static final int RESULT_CANCELLED = 2; // 0x2
+ field public static final int RESULT_DOWNLOAD_FAILURE = 6; // 0x6
field public static final int RESULT_EXPIRED = 3; // 0x3
+ field public static final int RESULT_FILE_ROOT_UNREACHABLE = 8; // 0x8
field public static final int RESULT_IO_ERROR = 4; // 0x4
+ field public static final int RESULT_OUT_OF_STORAGE = 7; // 0x7
+ field public static final int RESULT_SERVICE_ID_NOT_DEFINED = 5; // 0x5
field public static final int RESULT_SUCCESSFUL = 1; // 0x1
field public static final int STATUS_ACTIVELY_DOWNLOADING = 1; // 0x1
field public static final int STATUS_PENDING_DOWNLOAD = 2; // 0x2
diff --git a/telephony/java/android/telephony/MbmsDownloadSession.java b/telephony/java/android/telephony/MbmsDownloadSession.java
index 764b7b22f3d2..9a9877a88517 100644
--- a/telephony/java/android/telephony/MbmsDownloadSession.java
+++ b/telephony/java/android/telephony/MbmsDownloadSession.java
@@ -77,8 +77,9 @@ public class MbmsDownloadSession implements AutoCloseable {
* Integer extra that Android will attach to the intent supplied via
* {@link android.telephony.mbms.DownloadRequest.Builder#setAppIntent(Intent)}
* Indicates the result code of the download. One of
- * {@link #RESULT_SUCCESSFUL}, {@link #RESULT_EXPIRED}, {@link #RESULT_CANCELLED}, or
- * {@link #RESULT_IO_ERROR}.
+ * {@link #RESULT_SUCCESSFUL}, {@link #RESULT_EXPIRED}, {@link #RESULT_CANCELLED},
+ * {@link #RESULT_IO_ERROR}, {@link #RESULT_DOWNLOAD_FAILURE}, {@link #RESULT_OUT_OF_STORAGE},
+ * {@link #RESULT_SERVICE_ID_NOT_DEFINED}, or {@link #RESULT_FILE_ROOT_UNREACHABLE}.
*
* This extra may also be used by the middleware when it is sending intents to the app.
*/
@@ -142,11 +143,41 @@ public class MbmsDownloadSession implements AutoCloseable {
/**
* Indicates that the download will not be completed due to an I/O error incurred while
- * writing to temp files. This commonly indicates that the device is out of storage space,
- * but may indicate other conditions as well (such as an SD card being removed).
+ * writing to temp files.
+ *
+ * This is likely a transient error and another {@link DownloadRequest} should be sent to try
+ * the download again.
*/
public static final int RESULT_IO_ERROR = 4;
- // TODO - more results!
+
+ /**
+ * Indicates that the Service ID specified in the {@link DownloadRequest} is incorrect due to
+ * the Id being incorrect, stale, expired, or similar.
+ */
+ public static final int RESULT_SERVICE_ID_NOT_DEFINED = 5;
+
+ /**
+ * Indicates that there was an error while processing downloaded files, such as a file repair or
+ * file decoding error and is not due to a file I/O error.
+ *
+ * This is likely a transient error and another {@link DownloadRequest} should be sent to try
+ * the download again.
+ */
+ public static final int RESULT_DOWNLOAD_FAILURE = 6;
+
+ /**
+ * Indicates that the file system is full and the {@link DownloadRequest} can not complete.
+ * Either space must be made on the current file system or the temp file root location must be
+ * changed to a location that is not full to download the temp files.
+ */
+ public static final int RESULT_OUT_OF_STORAGE = 7;
+
+ /**
+ * Indicates that the file root that was set is currently unreachable. This can happen if the
+ * temp files are set to be stored on external storage and the SD card was removed, for example.
+ * The temp file root should be changed before sending another DownloadRequest.
+ */
+ public static final int RESULT_FILE_ROOT_UNREACHABLE = 8;
/** @hide */
@Retention(RetentionPolicy.SOURCE)