diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2010-07-19 09:26:48 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2010-07-19 09:26:48 -0700 |
commit | 8e64adfed603d808a712f0caad97425a5ef038f4 (patch) | |
tree | 747894e5d2fa4c415c22cc9748d71331243728a1 /src/com/android/providers | |
parent | 4ea79e3117967550720dc2ea15a2e52a8b6da888 (diff) | |
parent | 31073f8e470e9fe2782ecf95890c0a4acc91b8be (diff) | |
download | android_packages_providers_DownloadProvider-8e64adfed603d808a712f0caad97425a5ef038f4.tar.gz android_packages_providers_DownloadProvider-8e64adfed603d808a712f0caad97425a5ef038f4.tar.bz2 android_packages_providers_DownloadProvider-8e64adfed603d808a712f0caad97425a5ef038f4.zip |
merge from open-source master
Change-Id: I706a8164dbb3f499736e6dcef0e8b65f3c309c44
Diffstat (limited to 'src/com/android/providers')
-rw-r--r-- | src/com/android/providers/downloads/DownloadThread.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index 8188eaae..c488c0cd 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -16,13 +16,16 @@ package com.android.providers.downloads; +import org.apache.http.conn.params.ConnRouteParams; + import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.drm.mobile1.DrmRawContent; -import android.net.Uri; import android.net.http.AndroidHttpClient; +import android.net.Proxy; +import android.net.Uri; import android.os.FileUtils; import android.os.PowerManager; import android.os.Process; @@ -179,6 +182,10 @@ public class DownloadThread extends Thread { */ http_request_loop: while (true) { + // Set or unset proxy, which may have changed since last GET request. + // setDefaultProxy() supports null as proxy parameter. + ConnRouteParams.setDefaultProxy(client.getParams(), + Proxy.getPreferredHttpHost(mContext, mInfo.mUri)); // Prepares the request and fires it. HttpGet request = new HttpGet(mInfo.mUri); |