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.