summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/11.xml11
-rw-r--r--api/current.xml11
-rw-r--r--core/java/android/app/DownloadManager.java9
-rw-r--r--core/java/android/provider/Downloads.java6
4 files changed, 37 insertions, 0 deletions
diff --git a/api/11.xml b/api/11.xml
index 4a40c36..291d8db 100644
--- a/api/11.xml
+++ b/api/11.xml
@@ -29418,6 +29418,17 @@
<parameter name="uri" type="android.net.Uri">
</parameter>
</method>
+<method name="setDownloadToBeOtaUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="setMimeType"
return="android.app.DownloadManager.Request"
abstract="false"
diff --git a/api/current.xml b/api/current.xml
index 4a40c36..291d8db 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -29418,6 +29418,17 @@
<parameter name="uri" type="android.net.Uri">
</parameter>
</method>
+<method name="setDownloadToBeOtaUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="setMimeType"
return="android.app.DownloadManager.Request"
abstract="false"
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index 297d246..d37983f 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -339,6 +339,7 @@ public class DownloadManager {
private boolean mIsVisibleInDownloadsUi = true;
private boolean mScannable = false;
private boolean mUseSystemCache = false;
+ private boolean mOtaUpdate = false;
/** if a file is designated as a MediaScanner scannable file, the following value is
* stored in the database column {@link Downloads.Impl#COLUMN_MEDIA_SCANNED}.
*/
@@ -605,6 +606,13 @@ public class DownloadManager {
}
/**
+ * Set whether the download request is OTA Update. By default, it is set to false.
+ */
+ public void setDownloadToBeOtaUpdate() {
+ mOtaUpdate = true;
+ }
+
+ /**
* Set whether this download should be displayed in the system's Downloads UI. True by
* default.
* @param isVisible whether to display this download in the Downloads UI
@@ -650,6 +658,7 @@ public class DownloadManager {
values.put(Downloads.Impl.COLUMN_ALLOWED_NETWORK_TYPES, mAllowedNetworkTypes);
values.put(Downloads.Impl.COLUMN_ALLOW_ROAMING, mRoamingAllowed);
values.put(Downloads.Impl.COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI, mIsVisibleInDownloadsUi);
+ values.put(Downloads.Impl.COLUMN_IGNORE_SIZE_LIMITS, mOtaUpdate);
return values;
}
diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java
index 013edd3..ad0140b 100644
--- a/core/java/android/provider/Downloads.java
+++ b/core/java/android/provider/Downloads.java
@@ -397,6 +397,12 @@ public final class Downloads {
*/
public static final String COLUMN_LAST_UPDATESRC = "lastUpdateSrc";
+ /** Set this column to true if the given download should ignore the mobile network
+ * download limits.
+ * <P>Type: Boolean</P>
+ */
+ public static final String COLUMN_IGNORE_SIZE_LIMITS = "otaupdate";
+
/**
* default value for {@link #COLUMN_LAST_UPDATESRC}.
* This value is used when this column's value is not relevant.