
Polls the download server before download to see how big the file is so that we can figur eout our progress during download. Its a bit of a hit (about 1.5 seconds on my connection), but I think most people would be willing to take a small hit to get accurate percentage measurements. I also spend a small amount of time (~1.5 seconds) asking how big the file is before we download it, so that we can give an accurate progress measurement. The same can be said for peeking into the XML file before we pass it to the SAX parser, by just iterating over every line looking for "<application" and counting that. It is not perfect, and it takes about 3 seconds for 600 apps on my crappy emulator, but the progress makes much more sense. Refactored helper loops as per Andrew's suggestions. Close file reader correctly.
Description
Languages
Java
98.5%
Shell
0.6%
Python
0.6%
AIDL
0.2%
HTML
0.1%