"All" kinda made sense in the context of internal workings
(fetch package list from several repos, then process compatibility of
all apps), but superfluous from user's perspective.
Changed strings.xml to reflect the multi-repo nature of updating.
Also refactored progress events to make them more generic and
easier to nest deeply down the call stack. The ProgressListener
now just expects a ProgressListener.Event, which in addition to
statically typed type and progress info, also has an associated
Bundle which can store arbitrary data.
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.
The "update" icon was a "+" (add icon) which looked a bit weird, so a
quick search of other UI's shows that the "refresh" icon is used for
"update". The official Android reference docs say to copy icons that
aren't part of the android.R.drawable.* constants into your own
drawable-* folders, so I've done that here. The icons are from android
SDK version 17.
A ridiclous number of apps claim to be incompatible with devices that
don't have a touchscreen. This even includes devices that have the 'fake
touchscreen' feature instead. Nearly all of those have no such
requirement, so this preference allows you to ignore it and treat those
apps as being compatible.
Without an ID, the default save/restore state mechanism doesn't work,
so (for example) if you rotate the screen on ICS, the current category
switches back to the default.