Fix captive portal downloads on private DNS

When private DNS is in strict mode, captive portal downloads would fail
because DownloadService did not use a copy of Network that bypasses
private DNS.
The network obtained by DownloadService is a copy of the private DNS
bypassing network sent by CaptivePortalLoginActivity, but because the
privateDnsBypass attribute is not kept during parceling, default DNS
settings would be used.

Have DownloadService call getPrivateDnsBypassingCopy to avoid the failed
downloads.

Bug: 161875845
Test: atest DownloadServiceTest; manual: download a file with private
          DNS set to strict from the portal app.
Change-Id: I9f2e520227446ff0fc54a9caec7c3a54f6ba5a9d
2 files changed