summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2011-02-02 17:15:16 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-02 17:15:16 -0800
commitb73fb5401e44014d6c6906b22a7cc6563cb54b92 (patch)
treee25040b29a31225c52226b4ba33fb3e85248dbec /core
parent3fe81c9e2b03dd2dc5920ea1f85692312554606a (diff)
parent99e8e0470249ce145003cc1eabc5ae391af34a06 (diff)
downloadframeworks_base-b73fb5401e44014d6c6906b22a7cc6563cb54b92.zip
frameworks_base-b73fb5401e44014d6c6906b22a7cc6563cb54b92.tar.gz
frameworks_base-b73fb5401e44014d6c6906b22a7cc6563cb54b92.tar.bz2
am 99e8e047: am 6bc710f7: Merge "bug:3414192 new API to designate a download to be OTA update" into honeycomb
* commit '99e8e0470249ce145003cc1eabc5ae391af34a06': bug:3414192 new API to designate a download to be OTA update
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/DownloadManager.java9
-rw-r--r--core/java/android/provider/Downloads.java6
2 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index e82bad7..f0a63d3 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -344,6 +344,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}.
*/
@@ -614,6 +615,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
@@ -659,6 +667,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 5557a0d..fb117bf 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.