summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/Helpers.java
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-08-29 14:19:22 -0700
committerDoug Zongker <dougz@android.com>2011-08-29 14:19:22 -0700
commitce3f6100a62a184d01125f3f4c5ece66c611bacc (patch)
tree10defb757deda94d4c0601ed5d6c57441808338e /src/com/android/providers/downloads/Helpers.java
parent253f76628cd44fa146020413fae59b092185e675 (diff)
downloadandroid_packages_providers_DownloadProvider-ce3f6100a62a184d01125f3f4c5ece66c611bacc.tar.gz
android_packages_providers_DownloadProvider-ce3f6100a62a184d01125f3f4c5ece66c611bacc.tar.bz2
android_packages_providers_DownloadProvider-ce3f6100a62a184d01125f3f4c5ece66c611bacc.zip
fix DownloadThread's use of ETag, range headers
DownloadThread was only maintaining ETag and the file size for the duration of one HTTP request, rather than over all the requests needed to fetch a file, which kind of defeats the point of having them. Fix this by moving several state variables from InnerState to State, and initializing the total bytes and current bytes values from the download database. Skip actually making the HTTP request if we've already downloaded all the bytes of the file. This works around bug 5217390 by making the second DownloadThread do nothing instead of trying to fetch past the end of the file. (A real fix would eliminate the race condition that causes the second thread to get created in the first place.) Bug: 5217390 Change-Id: Ib5b8f87398b4ed2cb3d7f09569e245b55a89da5a
Diffstat (limited to 'src/com/android/providers/downloads/Helpers.java')
0 files changed, 0 insertions, 0 deletions