Commit f720bc68 authored by Jeff Sharkey's avatar Jeff Sharkey
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
parent a318a7fc
......@@ -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;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment