summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/providers/downloads/DownloadInfo.java')
-rw-r--r--src/com/android/providers/downloads/DownloadInfo.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java
index 3587dbfb..0ff51260 100644
--- a/src/com/android/providers/downloads/DownloadInfo.java
+++ b/src/com/android/providers/downloads/DownloadInfo.java
@@ -90,6 +90,7 @@ public class DownloadInfo {
info.mDescription = getString(Downloads.Impl.COLUMN_DESCRIPTION);
info.mBypassRecommendedSizeLimit =
getInt(Downloads.Impl.COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT);
+ info.mOtaUpdate = getInt(Constants.OTA_UPDATE) == 1;
synchronized (this) {
info.mControl = getInt(Downloads.Impl.COLUMN_CONTROL);
@@ -212,6 +213,7 @@ public class DownloadInfo {
public String mTitle;
public String mDescription;
public int mBypassRecommendedSizeLimit;
+ public boolean mOtaUpdate;
public int mFuzz;
@@ -410,6 +412,10 @@ public class DownloadInfo {
if (networkType == ConnectivityManager.TYPE_WIFI) {
return NETWORK_OK; // anything goes over wifi
}
+ if (mOtaUpdate) {
+ // OTA update download can use mobile network with no size limits
+ return NETWORK_OK;
+ }
Long maxBytesOverMobile = mSystemFacade.getMaxBytesOverMobile();
if (maxBytesOverMobile != null && mTotalBytes > maxBytesOverMobile) {
return NETWORK_UNUSABLE_DUE_TO_SIZE;