Commit Graph

5 Commits

Author SHA1 Message Date
Gabriele M
f9463c3770 Requre a minimum remaining battery capacity to install updates
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
2018-06-13 23:30:08 +02:00
Gabriele M
f4b3729426 Turn UpdateInstaller into a singleton
For symmetry with ABUpdateInstaller.

Change-Id: I9b61ed286c91f10140705e7b3e24b0eab0c75f49
2018-06-13 23:30:08 +02:00
Gabriele M
d5f4c1bcec Detect update failures
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
2018-04-08 22:48:19 +02:00
Gabriele M
63f6fd1a70 Report installation failures
Change-Id: I5e11db1e6e338a510b3c1c7d16f8c085d874a9db
2018-01-23 22:41:40 +01:00
Gabriele M
e02b8a0b00 Copy the updates for uncrypt using a Service
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
2018-01-23 22:41:40 +01:00