Fix flakiness for networksecurityconfig tests

The assumeTrue will make sure the test reports "ASSUMPTION_FAILED"
instead of "FAILURE" when the device cannot reach the internet.

Also, removing the timeout from serverFuture.get should prevent the
appearance of TimeoutException.

Flag: TEST_ONLY
Bug: 379490469
Test: atest android.security.net.config.cts.DownloadManagerTest
Change-Id: I3de0e59c0c88da4bcb4eda70f997982f362f3728
2 files changed