summaryrefslogtreecommitdiff
path: root/src/org/lineageos/updater/controller/ABUpdateInstaller.java
AgeCommit message (Collapse)Author
2022-05-01Updater: Enable A/B perf mode by defaultjhenrique09
Change-Id: I586b5505d902bb315075f35bfbb84a799363ddbd Signed-off-by: alk3pInjection <webmaster@raspii.tech>
2022-02-10Updater: The great cleanupMichael W
* Make final where possible * Remove unused casts, imports, methods, enums and constructors * Add null checks Change-Id: Idd1a16426dd1928e2ed9922f5a35ba32ce4f808b
2020-04-02Updater: Delete updates only after refreshing the notificationMichael W
* Looks like we first need to process the notification before we can delete an update Change-Id: I49f6c03a109f908e8a7b01f02b821a68ab273af3
2019-09-07Updater: Move to AndroidXLuca Stefani
Change-Id: I7bd67915638db5330b854f66f9fc1adb864b64be
2019-04-10Updater: Allow to suspend A/B updatesLuca Stefani
Change-Id: I0387fd491a07a2214e4331a2cfe25988e0016a61
2018-07-11Updater: Allow toggling A/B perf modeTheScarastic
Change-Id: I380a39bf6008b341c8005ac548d42d2413d0d643
2018-06-13Show in app reboot buttonGabriele M
Change-Id: I8d65746b58c16a7cf4a430ea29bb7b0fba1802d5
2018-04-05Handle install errors from onPayloadApplicationComplete()Gabriele M
When the installation terminates because of an error, update_engine sets the status to IDLE and sends a notification. Thus, we might miss the error report and never update the status of the update. Change-Id: Ic1536b1c157c4dab0128f039f9512f2fb734287d
2018-04-05Clear NEEDS_REBOOT preference on rebootGabriele M
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
2018-04-05Set status to INSTALLING when reconnecting to the serviceGabriele M
Otherwise the service won't run in foreground after restarting the app while an update is being installed. Change-Id: I8a75d206ead2945e7326c144b0b4354fbb2accb4
2018-04-05Don't register multiple UpdateEngine callbacksGabriele M
We are loosely tied to UpdateEngine and have no way to know whether we are bound or not without keeping track of the connection manually. Since UpdaterService is for both A/B and legacy updates, turn ABUpdateInstaller into a singleton to keep the code simple while ensuring that a single callback is registered. Change-Id: Ib4e9ad1413ba96bf5ed59cc3383741b5c9bac427
2018-04-05Remove duplicate INSTALLING notificationGabriele M
Change-Id: Ia1515aef1a24a5d54143e1423ae96f09163625bc
2018-03-07Updater: fix wrong preference key in A/B installerRoman Birg
We are referencing the wrong key for deciding whether to delete the update on reboot. Change-Id: If83d278259291b61c26302bdd59c2774901b18ca Signed-off-by: Roman Birg <romanbirg@gmail.com>
2018-01-23Report installation failuresGabriele M
Change-Id: I5e11db1e6e338a510b3c1c7d16f8c085d874a9db
2018-01-23Keep track of the installation status of AB updatesGabriele M
This allows to show the correct labels. Change-Id: I52f42e042af0df2d091d786c03102cec352b3a5b
2018-01-23Don't allow any operation if a reboot is neededGabriele M
Change-Id: I175525071faa44f30b8f2bbf36da56a2e6f2dd1b
2018-01-23Allow to cancel ongoing installationsGabriele M
Change-Id: I46884b42b6e3f87fbee99a23f538cec990b3b873
2018-01-23Allow service restarts while installing AB updatesGabriele M
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-23Wait for the UPDATED_NEED_REBOOT statusGabriele M
Consider an update as installed only when update engine reports that the device needs to be rebooted. This change also move the entire logic in onStatusUpdate(), which reports all we need to properly track the progress of the installation. Change-Id: Ic8db00cccdd19fd62ba4dee31fd1dccc9037193d
2017-07-22Add option to delete updates when installedGabriele M
This is mostly useful on encrypted devices since it allows to not copy the update before installing it.
2017-07-21Rename UpdateDownload and Update classesGabriele M
2017-07-21Reorder includes directivesGabriele M
These went out of order moving some stuff around. Reorder them so that there won't be unnecessary line changes in future.
2017-07-18Remove a couple of extra semicolonsGabriele M
2017-07-18Create model packageGabriele M
2017-07-16Allow to check if an update is of type AB from anywhereGabriele M
2017-07-16Allow to check if an AB update is being installedGabriele M
2017-07-08Protect the data of UpdaterControllerGabriele M
Create copies of the objects not to allow other classes change them, excluding those of controller package.
2017-07-04Add support for A/B (Seamless) System UpdatesGabriele M
Loosely based on: https://github.com/LineageOS/android_packages_apps_CMUpdater/commit/0465cb691de5acd2f459ce0687b988ddf050b354