Apply the accent color to EditTextPreference and ListPreference. They
use android.app.AlertDialog.Builder, not
android.support.v7.app.AlertDialog.Builder, so the theme has to be
specified using "android:alertDialogTheme" attribute in addition to
AppCompat's "alertDialogTheme". For the same reason those dialogs won't
be tinted on pre-Lollipop Android versions.
Apply the accent color to alert dialog buttons. Note that without
"android:windowMinWidthMajor" and "android:windowMinWidthMinor" attributes
dialog width is calculated incorrectly resulting in visual artifacts.
From the Material Design spec:
> DP unit grid
> System icons are displayed at 24dp.
See http://www.google.com/design/spec/style/icons.html#icons-system-icons
Script used to update the icons:
function download {
F-Droid/tools/download-material-icon.sh F-Droid/res $1 $2
}
download content add
download device bluetooth
download action delete
download notification do_not_disturb
download image edit
download action help
download device nfc
download av play_arrow
download navigation refresh
download action search
download action settings
download social share
download action view_headline
simplify RepoUpdater and use more streams
This is an overhaul of `RepoUpdater` to make its code match the architecture that is in use now: only download and use a signed index.jar. It also streams index.xml directly out of the index.jar and directly into the XML parser. That makes the update process quicker and more reliable because it no longer has to write out an index.xml to the filesystem, then read it in. Ultimately I hope to stream the index.jar download directly to the XML parser, so not even the index.jar needs to be written to disk. You can see that work in my git repo under the branches SKETCH-JarURLConnection and SKETCH-verify-with-JarInputStream for two different approaches.
This also changes the index parsing process to be based on bytes for now. The progress is based on the stream now, and this will still work once the full streaming mode is implemented. It also simplifies `RepoXMPHandler`.
This includes tests for index.jar signature verification. The tests all pass on my machine and our Jenkins.
See merge request !101
This drastically simplifies the very important index.jar signature
verification process by splitting out the Trust On First Use (TOFU) part of
the process into its own method, and makes the TOFU write happen separately
from the `RepoUpdateRememberer`. It requires all connections go through
the normal verification process.
Thanks to @mvdan for catching that. Turns out Java's String formatting is
not as tolerant as C's printf(). Java crashes when the format is wrong,
while C just ignores extras.
Might as well tap into the stream to get the byte counts, that's best
progress info I can think of when parsing a file.
This is a step towards a single progress bar for the whole process, instead
of showing one progress for downloading, another for parsing XML, then a
third for processing the new app info.
Now that there is only ever the index.jar, the whole flow of RepoUpdater
has changed quite a bit. This updates the logic for deciding when to store
the current repo's pubkey in the database for future reference.
This changes the flow to stop writing the unpacked index.xml and instead
stream it directly to the XML parser from the index.jar. This should speed
things up some.
refs #259https://gitlab.com/fdroid/fdroidclient/issues/259
This is also work towards running the whole thing in the background:
refs #103https://gitlab.com/fdroid/fdroidclient/issues/103
This also removes the progress stuff since it will need to change a lot to
work with the streaming mode
Before, there was an abstract RepoUpdater class with two subclasses, one
for signed and unsigned. Now there is just a single class, and it only
ever starts with the index.jar. So this removes lots of code that was
there to handle that more complicated structure. For example, there is no
longer the need to separately work on the index.xml vs index.jar.
Updated the README with details of how to run the tests. Also added a
minor fix to allow tests to run on pre-honeycomb devices. However their
behaviour may not be 100% defined - because the contentproviders are
not shuttind down correctly due to lack of an API to do so.
It broke with a recent support lib update that made the binary library be an
.aar instead of a .jar. Besides, the ant plugin has been buggy and unsupported
for a very long time.
Also dropping support for eclipse in the process, which lets us get rid of the
nasty symlinks.