Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow downloads when no network restriction set.

Fixes bug where DownloadManager would block downloads on WiMAX,
bluetooth, and ethernet networks, even when no network restrictions
had been set.

Bug: 5689335
Change-Id: I6d1bb78cbccb3c5eb1fce40a13b0689be0c3fa13
  • Loading branch information...
commit f720bc684b1a8332eb4d5f8d25c5feaf7eb54433 1 parent a318a7f
@jsharkey jsharkey authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/com/android/providers/downloads/DownloadInfo.java
View
5 src/com/android/providers/downloads/DownloadInfo.java
@@ -397,8 +397,9 @@ public String getLogMessageForNetworkError(int networkError) {
*/
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;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.