"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.
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.
Rationale:
1) The string is competing for space with the license field.
2) It would need separate singular/plural versions to be correct.
3) It's unnecessary when the list of APKs is shown directly below.
By default SQLite runs with synchronous=FULL, which is the safest mode
and uses fsync() a lot, but this interacts very badly with Samsung's
infamous RFS filesystem. With this preference the user can decide
whether to sacrifice some safety for reasonable performance.