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
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