
Instead, keep downloading until the `InputStream` returns -1. Also, required updates to the UI so that when the download size is not known, there is still a reasonable response to the user. Note that this still fails when using the Android download manager if the download attempts to get resumed, and the server did not send a Connection: close, Content-Length, or Transfer-Encoding: Chunked header.