These calls to bouncycastle were just used because the library was
there. Now with the upcoming 'basic' build flavor, there will be no
need for bouncycastle. It is required for ZipSigner signing of swap
indexes, and TLS support in the swap NanoHTTPD webserver.
With more whitelabeling support, we need this workaround to avoid
trying to call a null instance when the whitelabeled version does not
include all of the possible preferences.
Stripping the `+` form the license link will direct to the wrong spdx
page. (This would also need changing anyway because of spdx v4.0.0)
closesfdroid/fdroidclient#1472
This changes the logic of Utils.getBinaryHash() to return null on failure
rather than only throwing exceptions. That makes it easier to handle these
failures where Utils.getBinaryHash() is called.
#1305#855
This will instead lead users with Privileged Extension to the F-Droid
uninstall screen which will probably fail. But that's better than crashing
in my opinion.
Introduced in c095a85c3dd3c505951bebb52e4ae010c69cc9f9
This gives a lot more flexibility to the user to cover bandwidth, power,
and privacy issues related to network traffic. The current implementation
does not represent these prefs as well as it should. For example, it does
not force the traffic over the preferred network type if the other type is
set to "never". Instead it just tracks the "unmetered" status of the
active network, and acts based on that.
closes#1381
This follows the Material preferred style using Switches instead of
CheckBoxes for boolean preferences. This leaves the "expert" preferences
as CheckBoxes to differentiate them, and make them stand out as something
different.
The new JobScheduler API can opportunitistically run a job based on whether
there is good internet, connected to power, etc. This is very useful for
running updates. Ideally, updates would always happen in the background
while on unmetered internet and connected to power.
#588
Each time the device connects to a wifi network, this waits for 2 minutes,
then if the wifi is still connected, it re-schedules the index update to
happen now. The goal is to favor unmetered networks as much as possible
when downloading the index and any automatic app updates.
This is only needed on older platforms, JobScheduler handles this for us on
android-21+
This changes the flow of the update triggering so that any Intent sent to
UpdateService can potentially trigger an update, depending only on the
state of the internet and the "Only on WiFi" preference. Instead of having
a timer that checks every hour to see if it is time to run the update, just
let AlarmManager send a trigger Intent based on the timing in the
"Update Interval" setting.
The update schedule is reset each time F-Droid restarts, and also each time
the user returns from the settings, so if AlarmManager fails us in the time
being, the updates will be rescheduled next time F-Droid is restarted, the
device is rebooted, etc.
refs #662
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.