diff options
author | Hideki Hayami <hayami.hideki@sharp.co.jp> | 2012-02-14 14:19:52 +0900 |
---|---|---|
committer | Hideki Hayami <hayami.hideki@sharp.co.jp> | 2012-02-14 14:19:52 +0900 |
commit | 579be0d0d0de6af307ee94af07720a568ed2e7d1 (patch) | |
tree | 03c7dff12a88fb2beda4029c9304698d6e5e4d66 /src/com/android/providers | |
parent | 13a089576461d61a49e6770c41faa9afcdcc8816 (diff) | |
download | android_packages_providers_DownloadProvider-579be0d0d0de6af307ee94af07720a568ed2e7d1.tar.gz android_packages_providers_DownloadProvider-579be0d0d0de6af307ee94af07720a568ed2e7d1.tar.bz2 android_packages_providers_DownloadProvider-579be0d0d0de6af307ee94af07720a568ed2e7d1.zip |
avoid repetition of retrying download
If isReadyToStart returns 'true' for STATUS_INSUFFICIENT_SPACE_ERROR,
DownloadProvider retries downloading after it gets requests from
browser to download contents. The retrying loop won't stop until
its completion (recovering from space error), or user stops
downloading. This retry loop impacts to network traffic, battery
consumption and packet charge. So, change this method to return
'false' for the error in order to stop the loop.
Change-Id: Ia3466db60d86c5900842c7c28d294898ae3ff2bc
Diffstat (limited to 'src/com/android/providers')
-rw-r--r-- | src/com/android/providers/downloads/DownloadInfo.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java index 00b10452..47b7bc5a 100644 --- a/src/com/android/providers/downloads/DownloadInfo.java +++ b/src/com/android/providers/downloads/DownloadInfo.java @@ -312,11 +312,8 @@ public class DownloadInfo { // is the media mounted? return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED); case Downloads.Impl.STATUS_INSUFFICIENT_SPACE_ERROR: - // should check space to make sure it is worth retrying the download. - // but thats the first thing done by the thread when it retries to download - // it will fail pretty quickly if there is no space. - // so, it is not that bad to skip checking space availability here. - return true; + // avoids repetition of retrying download + return false; } return false; } |