Instead of assuming so, based on whether user is connected over
a WiFi or Ethernet connection, simply use the proper API.
Use default value of PREF_MOBILE_DATA_WARNING, if it had been
already set.
Change-Id: Ie4fa0301df7f2cebf94c967fc188acc54b2ce71e
Signed-off-by: althafvly <althafvly@gmail.com>
Author: Michael W <baddaemon87@gmail.com>
Date: Fri Feb 11 18:16:02 2022 +0100
Updater: Move progress next to progressbar
* The progress text can get very long, resulting in jumping marquee text
* In order to reduce the length, move the percentage out of the text
and next to the progressbar
* The behavior can be observed e.g. on pro1 in german, where the button
is also wider due to the german text
Change-Id: I0276182efed757c0929b31434edad9be548b841c
Author: Timi Rautamäki <timi.rautamaki@gmail.com>
Date: Thu Mar 3 16:12:16 2022 +0000
fixup! Updater: Move progress next to progressbar
Fix crash on ATV devices by applying same layout changes to
layout-large-notouch.
Change-Id: Id6eabcf8b1960106eb63bd15bcf97f9b4cf0bbc8
Change-Id: I8aed4c35c6ac4261c0536a6b263d63f5b1fd11ba
* It's not immediately clear that an export is started since the
notification isn't intrusive
* Show a toast - that will be clear enough
Change-Id: I78d78b23884df3ddb37bc486c1d6012f899c888d
* Apparently users are not aware that they don't have to install every
update we ever released (weeklies) after they have skipped some due
to various reasons
* Since we are providing full installation packages, remind the user that
it's ok to only ever choose the newest one
Change-Id: I70f9acd70344f36aaae7e45b848f6bcb7a8b3c0f
* We are actually updating, but especially between translations and
non native speakers, drawing a semantical difference is more harmful
than helpful
* Use "install" instead
Change-Id: Icdf1ce45d6cd35334b5c8ac13af3ec6741d837b6
When enabled, the recovery of the device will be updated with the
version of the installed system. This is only applicable to devices
with a dedicated recovery partition and not A/B.
Change-Id: I4c1701b09c000b4cdb044069fa9ba857500f9cb1
* 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
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.