Gabriele M
05150dacbf
Keep track of the installation status of AB updates
...
This allows to show the correct labels.
Change-Id: I52f42e042af0df2d091d786c03102cec352b3a5b
2018-01-18 20:31:18 +01:00
Gabriele M
f1508fd002
Allow to cancel ongoing installations
...
Change-Id: I46884b42b6e3f87fbee99a23f538cec990b3b873
2018-01-18 20:31:18 +01:00
Gabriele M
77e92907e9
Allow service restarts while installing AB updates
...
The update engine service is independent and once started doesn't need
our service to install updates. Therefore we can't assume that our
service will stay up as long as the installation is being performed.
If the service gets terminated while an update is being installed, we
simply lose our connection to the update engine service and stop
receiving notifications, the installation itself won't stop. Keep
track of ongoing installations using a shared preference and use a
sticky service when installing updates. The service will try to
re-connect to the update engine service and determine if the
installation is still ongoing.
Change-Id: Id2fc11cab51610d04bf41a0927824bb8c0c94d71
2018-01-18 20:31:18 +01:00
Gabriele M
410160bf9a
Show progress when installing AB updates
...
Change-Id: If8cd2e2da1f15a4af415aa35ccf61052c318333f
2018-01-18 20:31:18 +01:00
Gabriele M
b793cfe101
Stop service when pausing downloads
...
Change-Id: Ibb77c7f0d4309874fcfa591d12b5e6ce4a6d6abc
2018-01-18 20:31:18 +01:00
Gabriele M
8ff6f57e7b
Use the right preference for the auto-delete option
...
Change-Id: Iac7e838e8ecf1e5ed27bb0c9587442aa2ec8ffec
2018-01-18 19:27:09 +00:00
Gabriele M
7be5b7c057
Don't stop service while installing AB updates
...
Change-Id: I2e5eaffa2b64ce8d387958b070a23f393f827c5e
2017-11-12 20:14:18 +01:00
Gabriele M
ea3ac38e25
Dismiss some notifications when clicked
2017-08-08 10:32:48 +02:00
Gabriele M
cdc4849767
Remove duplicate icon
...
ic_tab_install is basically the same as ic_system_update. The only
difference is the color, but that doesn't really matter.
2017-08-07 16:43:34 +02:00
Gabriele M
13f3849b96
Actually check if an OTA is encrypted
2017-07-26 11:57:32 +02:00
Gabriele M
8768daddf0
Add option to delete updates when installed
...
This is mostly useful on encrypted devices since it allows to not
copy the update before installing it.
2017-07-22 20:38:20 +02:00
Gabriele M
20ea513684
Create a copy of the zips on encrypted devices
...
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.
2017-07-21 17:05:53 +02:00
Gabriele M
28b8774db6
Define interfaces with only getters for the updates
...
This also changes the code to use the new interfaces wherever the
update is not supposed to change.
2017-07-21 16:52:24 +02:00
Gabriele M
11f82cfb87
Reorder includes directives
...
These went out of order moving some stuff around. Reorder them so
that there won't be unnecessary line changes in future.
2017-07-21 01:17:19 +02:00
Gabriele M
821efd8219
Rename UpdaterControllerInt to Controller
2017-07-18 22:26:51 +02:00
Gabriele M
82dbc8fde3
Remove a couple of extra semicolons
2017-07-18 22:17:29 +02:00
Gabriele M
a06fa3f9f0
Add own formatDuration() method
...
DateUtils.formatDuration() is not public, so create our own version.
2017-07-18 22:17:26 +02:00
Gabriele M
af1e9c4478
Create model package
2017-07-18 22:15:13 +02:00
Gabriele M
8ce10da9ce
Use UTC timezone for the build dates
2017-07-18 12:52:08 +02:00
Gabriele M
d0f9c4be22
Don't use the filename as notification title
...
Be consistent with the rest of the app and use "version - date".
2017-07-17 12:27:15 +02:00
Gabriele M
c3515644b6
Ask for confirmation before installing updates
...
Since there's no quick and clean way to show a dialog from a
serivice, don't allow to install updates from the notification.
2017-07-16 22:52:45 +02:00
Gabriele M
12688ba761
Allow to check if an update is of type AB from anywhere
2017-07-16 22:52:45 +02:00
Gabriele M
a455c95e0c
Install updates from UpdaterService
...
This allows to easily handle AB updates.
2017-07-16 22:52:45 +02:00
Gabriele M
d327d61cc6
Send an event when update are canceled
...
This allows to properly update the status of the application.
In particular, when an update is deleted:
- Cancel the associated notification, if any.
- Remove the entry from the controller if the update is no longer
available online.
- Disable the resume button if download is partially downloaded
and is no longer available online.
2017-07-07 22:05:22 +02:00
Gabriele M
e245631b46
Add support for A/B (Seamless) System Updates
...
Loosely based on:
0465cb691d
2017-07-04 19:36:32 +02:00
Gabriele M
bb2f2c1005
Disable indeterminate progressbar in case of download error
...
Similar to the 'paused' case, but take into account that the error
can happen when the progress is 0, in which case we just hide the
progress bar.
2017-07-04 19:05:04 +02:00
Gabriele M
4dcf4199f1
Minor code refactoring
2017-07-04 19:05:04 +02:00
Gabriele M
520105284c
Rename some constants
2017-07-04 19:05:04 +02:00
Gabriele M
437d4b1913
Don't make UpdaterService sticky
...
We are using it as non-sticky service, so just declare it as such.
2017-07-04 19:05:04 +02:00
Gabriele M
db3f14832a
Replace 'Download' prefix with 'Updater'
...
These classes do more than controlling the download of the updates.
2017-07-04 19:05:04 +02:00