diff options
author | Vasu Nori <vnori@google.com> | 2011-02-01 19:06:13 -0800 |
---|---|---|
committer | Vasu Nori <vnori@google.com> | 2011-02-01 22:38:05 -0800 |
commit | ea245800c69d6bc10dc2680e6a242f59e9cb49b6 (patch) | |
tree | c81dbd806cd7547534a17a27251c49cfc252e3a8 /src/com/android/providers/downloads/DownloadInfo.java | |
parent | 24aaafe358706db6a83c9b9e6f0d98314ffbac30 (diff) | |
download | android_packages_providers_DownloadProvider-ea245800c69d6bc10dc2680e6a242f59e9cb49b6.tar.gz android_packages_providers_DownloadProvider-ea245800c69d6bc10dc2680e6a242f59e9cb49b6.tar.bz2 android_packages_providers_DownloadProvider-ea245800c69d6bc10dc2680e6a242f59e9cb49b6.zip |
bug:3414192 if otaupdate column is set, don't check mobile download limits
this allows OTA update to work without being subject to download limits
on mobile networks.
Change-Id: I92c60ba3ecbde615bd93778b391a5fe067dbd2fe
Diffstat (limited to 'src/com/android/providers/downloads/DownloadInfo.java')
-rw-r--r-- | src/com/android/providers/downloads/DownloadInfo.java | 6 |
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 28a38b3b..f375b3f1 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; |