Avoid endless restarts when waiting for connectivity.
Steve Howard [Wed, 18 Aug 2010 23:11:34 +0000 (16:11 -0700)]
Adding an extra check for usable network connectivity to avoid an endless
restart-pause loop while waiting for usable connectivity.

Change-Id: If4da9ad222993b5479ada658508f445d10a42013

src/com/android/providers/downloads/DownloadInfo.java

index 92d8d50..02d6ae3 100644 (file)
@@ -252,7 +252,7 @@ public class DownloadInfo {
         if (mStatus == Downloads.Impl.STATUS_RUNNING_PAUSED) {
             if (mNumFailed == 0) {
                 // download is waiting for network connectivity to return before it can resume
-                return true;
+                return canUseNetwork();
             }
             if (restartTime() < now) {
                 // download was waiting for a delayed restart, and the delay has expired