diff options
author | Vasu Nori <vnori@google.com> | 2011-02-01 23:00:40 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-02-01 23:00:40 -0800 |
commit | 93842036405d99a1c26471d5d06fe3f1b5048b2d (patch) | |
tree | f3e4377ae2091239170dc065386f97b23f6cbf3a /src/com/android/providers/downloads/DownloadInfo.java | |
parent | 74436b8ffc8e1d83508441270ee087893220798b (diff) | |
parent | 8db8fba215a981edd24ad1f7118d3397be0114d2 (diff) | |
download | android_packages_providers_DownloadProvider-93842036405d99a1c26471d5d06fe3f1b5048b2d.tar.gz android_packages_providers_DownloadProvider-93842036405d99a1c26471d5d06fe3f1b5048b2d.tar.bz2 android_packages_providers_DownloadProvider-93842036405d99a1c26471d5d06fe3f1b5048b2d.zip |
am 8db8fba2: am ea245800: bug:3414192 if otaupdate column is set, don\'t check mobile download limits
* commit '8db8fba215a981edd24ad1f7118d3397be0114d2':
bug:3414192 if otaupdate column is set, don't check mobile download limits
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 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; |