manually merging Change-Id: If7dc0f86ea7a3c4394603416ca0fc33847f10fa7
Vasu Nori [Fri, 3 Dec 2010 21:19:04 +0000 (13:19 -0800)]
need this CL from GB. without it, downloads are badly broken in master.

Change-Id: I82ebc467f877bed50e373c437481ad19e14635bf

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

index 0728c31..a1d9101 100644 (file)
@@ -801,7 +801,7 @@ public class DownloadThread extends Thread {
      */
     private void setupDestinationFile(State state, InnerState innerState)
             throws StopRequest {
-        if (TextUtils.isEmpty(state.mFilename)) { // only true if we've already run a thread for this download
+        if (!TextUtils.isEmpty(state.mFilename)) { // only true if we've already run a thread for this download
             if (!Helpers.isFilenameValid(state.mFilename)) {
                 // this should never happen
                 throw new StopRequest(Downloads.Impl.STATUS_FILE_ERROR,