HttpDownloaderTest doesn't get run in gitlab-ci since it was too flaky with
internet connections in the emulator. So these were missed until I manually
ran the tests.
688057b3e7e214db49566b84d5b3dcd0db30dc2b
195aaae7e52dc1c47741965904ed17bdc816a71c
df08e84e7829652d7999eee5451080a012b00a1e
Some devices send multiple copies of given events, like a Moto G often
sends three {@code CONNECTED} events. So they have to be debounced to
keep the {@link #BROADCAST} useful.
For now, swap repos are only trusted as long as swapping is active. They
should have a long lived trust based on the signing key, but that requires
that the repos are stored in the database by fingerprint, not by URL
address.
#295#703
For mirroring to work on multiple repos, this must be stored and used per-
repo. The timeout and number of tries seem fine to keep global to reduce
the total amount of mirror churn when this logic is searching.
Apps that are built as part of the ROM and signed by the platform keys
should very rarely be swapped. This removes them from the default
list by comparing the signing keys.
This filter is deliberately only included on the list function and not on
the search function. If people want to share system apps, they'll be able
to find them with the search function, but the system apps won't show up
by default.
https://source.android.com/devices/tech/ota/sign_builds#certificates-keyscloses#440
This should make swap remember if Bluetooth/WiFi was disabled when swapping
started, then automatically disable it when swapping is done. This also
makes swapping remember the swap "visibility" that the user set, and restore
that when the user starts swapping again. There are logic bugs elsewhere
in the whole thing that prevent this from always working, but the state
should be set and stored properly.
If F-Droid gets killed during the install/update process, then the install
procedure would keep getting readded and redownloaded since it is a sticky
Intent. The test is very specific so that this does not block things like
installing updates with the same versionCode, which happens sometimes, and
is allowed by Android.
#1271
The "Only on WiFi" pref originally only controlled index updates, but now
it makes sense to include all of the various files that are downloaded.
#1381
The standard pattern is to pass a Context in rather than call things like
getPackageManager in. It should only pass a PackageManager if that is
actually being reused.
This shouldn't change the logic at all.