diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-12-23 19:28:09 -0800 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-01-09 18:32:03 -0800 |
commit | 0de55602ec6d350548248feddc68c91b29326eff (patch) | |
tree | f64aa79577aa145c331a81bdbf23f12c6e8bd9be /tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java | |
parent | 8ac10e0e0667a4fe35191deebb5fa9786bf4226c (diff) | |
download | android_packages_providers_DownloadProvider-0de55602ec6d350548248feddc68c91b29326eff.tar.gz android_packages_providers_DownloadProvider-0de55602ec6d350548248feddc68c91b29326eff.tar.bz2 android_packages_providers_DownloadProvider-0de55602ec6d350548248feddc68c91b29326eff.zip |
Simplify download flow control, handle redirects.
Move redirection handling into a single loop, and handle each HTTP
response code inline to make flow control easier to reason about.
Fix race condition in tests by waiting for first status update.
Bug: 7887226
Change-Id: Id4bfd182941baad4cd0bb702376c4beeb7275bb2
Diffstat (limited to 'tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java')
-rw-r--r-- | tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java index 4159beb6..157cce89 100644 --- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java +++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java @@ -421,7 +421,7 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest { mManager.remove(download.mId); // make sure the row is gone from the database - download.waitForStatus(-1); + download.waitForStatus(-1, -1); } public void testDownloadCompleteBroadcast() throws Exception { |