summaryrefslogtreecommitdiff
path: root/core/java/android/os/UpdateEngine.java
Commit message (Collapse)AuthorAgeFilesLines
* UpdateEngine: Add perf mode binder interfaceLuca Stefani2022-09-121-0/+11
| | | | Change-Id: I3146ea0eb9477129fa2e490fe9b149ad48ec0fba
* Check for initialization of mUpdateEngineKelvin Zhang2021-12-011-1/+4
| | | | | | | Bug: 207768409 Test: th Change-Id: Idc702658ab542566d775b296f1e82b63b0c1c2a4
* Add a system API UpdateEngine to switch the slot back and forthTianjie2021-07-201-4/+38
| | | | | | | | | | | | | In some cases, the OTA update want to flip the slot to source without cancelling the entire update. The functionality was achieved by ResetStatus(). However ResetStatus() will clean up the update progress and free up space to support virtual A/B. Details in http://go/no-virtual-ab-switch-off Test: build Bug: 187321613 Change-Id: I2abcf8289f5fd573d2b55fa7004ab4dcd175252f
* Update language to comply with Android's inclusive language guidanceJeff Sharkey2020-09-141-1/+1
| | | | | | | | | See https://source.android.com/setup/contribute/respectful-code for reference Test: none Bug: 168334533 Exempt-From-Owner-Approval: docs updates Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
* Update cleanupAppliedPayload comment.Yifan Hong2020-04-271-3/+0
| | | | | | | | | ServiceSpecificException might be thrown, but it is not actionable by the caller. Hence hide the comment. Fixes: 151156841 Test: none Change-Id: I07836fe2c5cc361fa81f6fc24851ad2b0721591b
* UpdateEngine: fix cleanupAppliedPayload implYifan Hong2020-03-031-1/+34
| | | | | | | | | IUpdateEngine.cleanupSuccessfulUpdate is now asynchronous with a callback. Update UpdateEngine.cleanupAppliedPayload accordingly to use the new impl. Bug: 147696014 Test: apply OTA Change-Id: I9b308316dcb8e6a507063d3060fed7693da82a19
* UpdateEngine: add WorkerThread annotation.Yifan Hong2020-01-291-0/+3
| | | | | | | | | Add @WorkerThread to allocateSpace and cleanupAppliedPayload because they take a non-trivial amount of time. Bug: 148486809 Test: builds Change-Id: Ib7daba9c662b9e141430df71401d069577221b8a
* UpdateEngine.AllocateSpaceResult: rename functionsYifan Hong2020-01-291-7/+9
| | | | | | | | | | | Rename functions from X() to getX(). Also update docs. Bug: 148486809 Test: builds Change-Id: Ib692bff06bcf0018826e78b28f0a9b2ed0431060
* Merge "Update system api for applyPayload"Treehugger Robot2020-01-101-4/+6
|\
| * Update system api for applyPayloadTianjie Xu2019-12-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | As requested, the system API needs to use AssetFileDescriptor instead of ParcelFileDescriptor. No need to change the AIDL. This API was added by sony, and we are not using it right now. Bug: 142426712 Test: build Change-Id: I95c347f01fe50cc0973c2a90497a6f05ce38204b
* | Add @ErrorCode annotation to UpdateEngine APIsYifan Hong2020-01-031-1/+24
| | | | | | | | | | | | Test: TH Change-Id: I3016132454ea38d2eaf69b907c726f46b2608509
* | Add UpdateEngine.cleanupSuccessfulUpdateYifan Hong2020-01-031-0/+43
| | | | | | | | | | | | | | | | | | | | This API cleans up the merge and free up space after the device has boot successfully into the new build for a Virtual A/B update. Bug: 138808328 Test: pass Change-Id: Id4543906b06e6a8487f91955af85024d8a50a464
* | Add UpdateEngine.allocateSpaceYifan Hong2020-01-031-0/+104
|/ | | | | | | | This API preallocates space for a Virtual A/B update. Test: pass Bug: 138808058 Change-Id: I34e34fbf6ac63bd189abda4a45cdac84b0e109d0
* Use ParcelFileDescriptor over FileDescriptorKyeongkab.Nam2019-10-041-5/+3
| | | | | | | | | | The java.io.FileDescriptor object has a poor definition of ownership, which can result in obscure use-after-close bugs. Instead, APIs should return or accept ParcelFileDescriptor instances. Bug: 130209137 Test: manual Change-Id: Ifb3dd53dc138ec47f416f2d4b46c4668bc8ee1d8
* Add nullability anotationsKyeongkab.Nam2019-09-121-2/+3
| | | | | | | Add missing nullability for applyPayload. Test: manual Change-Id: Iafce9091767bd7a31937b0be329ede6639239d73
* Merge "Add a new API applyPayloadFd() of UpdateEngine"Tao Bao2019-07-131-0/+18
|\ | | | | | | | | | | am: f4b0318d6f Change-Id: I771090d681ca565392a9aaeb8ecd60026b572ae3
| * Add a new API applyPayloadFd() of UpdateEngineKyeongkab.Nam2019-07-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Due to the restriction of Treble, update_engine cannot access to OTA packages located on non-core domain area. (e.g. /data/vendor/upgrade/xxx.zip) To solve such problem, update_engine needs to accept a file descriptor (FD) of OTA package file instead of its URI. Accordingly, UpdateEngine also needs to add a new interface of applyPayload which accepts FD. Test: Manual update Bug: 130209137 Change-Id: Ic924445c4abf27fd7dc111c74b972ac7ff9ffa6b
| * API: Clean up redundant and ineffective usages of SystemApi and TestApiAdrian Roos2018-12-121-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Everything that is marked SystemApi or TestApi, but not @hide is still part of the public SDK, it is therefore not sound to have that combination. In the future, specifing such a combination will be considered an error to prevent inadvertently exposing SystemApi and TestApi as public API. Bug: 115333477 Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea Merged-In: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi Exempt-From-Owner-Approval: API cleanup
* | Add Javadoc for UpdateEngine constants.Tao Bao2019-03-081-6/+130
| | | | | | | | | | | | Fixes: 123597185 Test: N/A Change-Id: Iab3a43b2e65687b14424e86bc532180138c97ef0
* | Map error code 51 to an incorrect OS error.Alex Kershaw2019-01-041-0/+1
| | | | | | | | | | | | | | | | | | | | Error code 51 is given when trying to downgrade a device, so this is required to fix our broken CTS test and give an accurate error code to the admin. Change-Id: I436fb7a605dc47dc5388c78c67d7db08ffcf867a Fixes: 120896091 Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.DeviceOwnerTest#testInstallUpdate
* | API: Clean up redundant and ineffective usages of SystemApi and TestApiAdrian Roos2018-12-111-12/+0
|/ | | | | | | | | | | | | Everything that is marked SystemApi or TestApi, but not @hide is still part of the public SDK, it is therefore not sound to have that combination. In the future, specifing such a combination will be considered an error to prevent inadvertently exposing SystemApi and TestApi as public API. Bug: 115333477 Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi Exempt-From-Owner-Approval: API cleanup
* Expose an update_engine API that verifies the given payload metadata.Tao Bao2018-02-091-0/+18
| | | | | | | | | | | | | android.os.UpdateEngine.verifyPayloadMetadata() allows a system updater to verify a payload can be safely applied, by using its payload metadata (usually a few hundred KiB only or even less). This would be useful in improving update UX, since the updater can be smarter to avoid installing an update that would fail to apply, or to fall back from an incremental to full payload. Bug: 65283633 Test: Build and flash walleye on device. Trigger a call to this API. Change-Id: I82546f6b2a8f27cfd956cc1677556e7221cce5fd
* Added new update engine error codes fromscypher2017-11-071-0/+1
| | | | | | | | | | /android/system/update_engine/common/error_code.h Test: Exposed new constant and manually added the change to api/system-current.txt due to b/68874686 Bug: 68380039 Change-Id: I01a8befe07d37dfa74d3544b80bde2c2cc48acdb
* UpdateEngine: Expose unbind as system API.Tao Bao2017-07-181-32/+53
| | | | | | | | | | Add android.os.UpdateEngine.unbind() that unbinds the last bound callback function. update_engine will no longer send status update after unbinding. Bug: 62293007 Test: Check api/system-current.txt. Change-Id: Ide9704986caa7aeb233ba064bb8145972e3b5749
* Basic javadoc for android.os.UpdateEngine.Elliott Hughes2017-02-281-1/+76
| | | | | | Bug: N/A Test: N/A Change-Id: Icb870e7720e8b50082d353e7ea08007e1f4e2fdc
* UpdateEngine: Add resetStatus() as system API.Tao Bao2016-03-221-11/+40
| | | | | | | | | | It calls update engine to reset an already applied payload. Also change all the RemoteExceptions in UpdateEngine class to be rethrown as RuntimeExceptions according to API guidelines [FW9]. Bug: 27123767 Change-Id: I936331019cdb00f4f225f5605e51cc94bb491e24
* Add system APIs for A/B update.Tao Bao2016-02-081-0/+148
Add android.os.UpdateEngine and UpdateEngineCallback classes that communicate with the update engine via binder APIs for A/B update. Bug: 26695366 Change-Id: I2471858d28df5443bc0b56d9a20281ccebde4484