* Let the user decide where to store the file
* That way it's not located in /storage/emulated/0/Android/data/...
...org.lineageos.updater/files/LineageOS updates/*.zip
-> The user knows where the file is stored
-> We don't have to care about WRITE_EXTERNAL_STORAGE etc
* Remove the cancel button - after closing the file stream we loose
permission to access it, therefore can't delete it anymore
-> Let the user handle deletion manually
* Since we don't use WRITE_EXTERNAL_STORAGE anymore, remove it from
Manifest and also remove PermissionUtils (+calls) - we can now export
immediately.
-> This also solves the
"TODO: start exporting once the permission has been granted"
Change-Id: I50afa403f2803569aa9def807ea20ee72c582284
Targeting S+ (version 31 and above) requires that an explicit value
for android:exported be defined when intent filters are present
Change-Id: I2ce2b2cd1dcd69e343ae8577587483b19d825fdc
UpdateEngine doesn't send an initial notification to bound client
if the last status is not known, so clear the preference when we
detect that the device has been rebooted.
Change-Id: Ib15dff5fa8ac9ec07a68018a83683cc561fd3e85
In this way apks built with gradle/Android Studio will have the
same versionCode, allowing to update the one in /system.
Change-Id: I020cc623dd7c1c5085fec4e6f5978b6ee46468a2
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
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.