* After moving from the generic /upgrade.html url to a device specific
one, updater needs to display that instead
Change-Id: If9fc6bddfab206a97283f2080ea4df0cbb742a7d
* This replaces auto update check switch with a dropdown with 4 options:
* Never
* Once a day
* Once a week (default)
* Once a month
Change-Id: I4bcae4c013a5d44958f9c54d641e64aac3062a8b
* Lower default value by 10%
* Decrease the level by another 10% if charging
* Always allow installation in case device doesn't have a battery
* Show the requirements in the alert dialog
Change-Id: Iebb10220612006fbd096eb474cf3034ef52144b3
The recovery doesn't install the update if the remaining battery
capacity isn't at least 20% (or 15% if charging). Require at least
40%, just to be safe.
Change-Id: I5cd7c40f029141cde2b0922b25fece2b55989710
This allows to delete the update only if the installation succeeded
and to notify the user in case the installation failed.
Since we now need the file in case of failure, create a copy for
uncrypt even if the user chose to delete installed updates.
Change-Id: I80b0f499663bbf50bcbca5f643c01ffdb4cd3957
Menu is not a good place to store preferences that have long strings
Change-Id: I84e782af33b2452c15998f7266c57d681dc8a377
Signed-off-by: Joey <joey@lineageos.org>
Currently the URL is only partially customizable, part of
it is hard-coded and there's no clear indication of it.
Define the entire URL as resource string and use placeholders
for runtime variables.
Also, invalidate old overrides by changing the name of the
resource.
Warning: lineage.updater.uri must be updated accordingly
Change-Id: Iecfdaf9d422d08a707c7319bafea5befc6b757d2
Same as change I488018d01c0baf74660362a384e53bfe5d85de2b
("Use a service to export the updates"). While at it, move the code
out of UpdaterService to better separate the code that deal with AB
updates and regular updates.
Change-Id: I2bc3e78e80f5e63c57303cbbcdc0353dbab0f67f
AsyncTasks are not suitable for long lasting operations and can easily
cause memory leaks. The use of ProgressDialogs is also discouraged, so
move to a foreground service to export the updates.
Change-Id: I488018d01c0baf74660362a384e53bfe5d85de2b
Major upgrades are not possible with Updater and they are already
blocked. This commit adds a dialog with a link to a webpage that
explains how to upgrade manually.
Based on: d5d343d627
Change-Id: Ifb23e0a4db1060fc696d13e6694f3e849af70e2d
On encrypted devices, uncrypt modifies the zip so that it can be
read without mounting the filesystem. Instead of installing the zip
downloaded, create a copy of it which will be deleted. This will
allow to re-install the zip multiple times or export it after
installing it.
Instead of disabling the action button, keep it enabled and make it
show a snackbar to inform the user about the impossibility of
installing the selected update.
The files are supposed to be downloaded in a privileged location
that the user can't access. If the user wipes the data of the
application, the updates downloaded are not removed. Perform a
one-time cleanup so that our downloads dir doesn't grow without
control.
INCOMPLETE is used for any update that isn't verified, even if the
file has been completed. This change is mostly needed to support
imported downloads, which we take as complete, but unverified.
Compare the previously downloaded updates list with the current one
and check if the old list includes all the updates of the new list.
If the network is not available at the time of the check, a new
check is scheduled.