summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-03-29 06:08:30 (GMT)
committerSteve Kondik <shade@chemlab.org>2012-03-29 06:08:30 (GMT)
commit861e4fa398710cdc9dcfdfde934d8e08bf83f38e (patch)
tree35cbb86e8258211e903fadc1136549e9984d063e
parent3aa25385202b61c12512ced16f3724ed064fb974 (diff)
parent3855dff9082b04a388f6cbf7a78b6b3ea519207f (diff)
downloadandroid_packages_providers_DownloadProvider-ics.zip
android_packages_providers_DownloadProvider-ics.tar.gz
android_packages_providers_DownloadProvider-ics.tar.bz2
Merge branch 'ics-mr1-release' of https://android.googlesource.com/platform/packages/providers/DownloadProvider into aospics-releaseicscm-9.1.0
-rw-r--r--src/com/android/providers/downloads/DownloadInfo.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java
index 76dfff0..1e376e2 100644
--- a/src/com/android/providers/downloads/DownloadInfo.java
+++ b/src/com/android/providers/downloads/DownloadInfo.java
@@ -397,8 +397,9 @@ public class DownloadInfo {
*/
private int checkIsNetworkTypeAllowed(int networkType) {
if (mIsPublicApi) {
- int flag = translateNetworkTypeToApiFlag(networkType);
- if ((flag & mAllowedNetworkTypes) == 0) {
+ final int flag = translateNetworkTypeToApiFlag(networkType);
+ final boolean allowAllNetworkTypes = mAllowedNetworkTypes == ~0;
+ if (!allowAllNetworkTypes && (flag & mAllowedNetworkTypes) == 0) {
return NETWORK_TYPE_DISALLOWED_BY_REQUESTOR;
}
}