Change the default value of the "cacheDownloaded" preference used in
the actual code to match the default value that is specified in XML
and shown to the user.
Targeting an application at Cupcake triggers compatibility behaviours:
1) The permissions WRITE_EXTERNAL_STORAGE and READ_PHONE_STATE are
automatically requested.
2) Support for different screen sizes and densities is disabled.
We don't want the extra permissions, but we do need the old resolution
compatibility mode to avoid UI breakage (for now), so I'm increasing
the target version and explicitly disabling the new screen support.
Only show the market button for apps we know are available there.
Use a new URL that automagically opens in the market application if
it's installed but also works in the browser.
All changes to the database in SQLite must be done within a
transaction, so if there isn't one in progress one will be started
implicitly, i.e. each change will be done in a separate transaction.
Since committing a transaction is a fairly expensive operation - on
some filesystems ridiculously expensive - it should be done as
sparingly as possible.
In tests on my Galaxy S, this change makes the update between 2500%
and 4500% faster (for slightly over 100 applications).
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.
The checkboxes on the repository management screen did
nothing. Calling Cursor.getCount() on the returned cursor magically
fixed it - perhaps there's some sort of lazy evaluation? - but the
less magical execSQL method seems like a better way.
Most Android applications have the cancel button on the right, but
this dialog had it on the left (Cancel/Install). It was especially
confusing as pressing "Install" immediately leads to a system dialog
with Install/Cancel buttons (i.e. in the opposite order).