IUpdateEngine.cleanupSuccessfulUpdate is async
UpdateAttempterAndroid::CleanupSuccessfulUpdate uses
CleanupPreviousUpdateAction, which is asynchronous. Hence,
the binder function needs to be asynchronous too.
Test: update_attempter_android --merge after update
Bug: 147696014
Change-Id: I0ce43db6d75a5a13a105c25645824612bd4d6be3
diff --git a/binder_bindings/android/os/IUpdateEngine.aidl b/binder_bindings/android/os/IUpdateEngine.aidl
index bbb86a3..c9580da 100644
--- a/binder_bindings/android/os/IUpdateEngine.aidl
+++ b/binder_bindings/android/os/IUpdateEngine.aidl
@@ -62,8 +62,13 @@
*
* Wait for merge to finish, and clean up necessary files.
*
- * @return SUCCESS if successful. ERROR if transient errors (e.g. merged but
- * needs reboot). DEVICE_CORRUPTED for permanent errors.
+ * @param callback Report status updates in callback (not the one previously
+ * bound with {@link #bind()}).
+ * {@link IUpdateEngineCallback#onStatusUpdate} is called with
+ * CLEANUP_PREVIOUS_UPDATE and a progress value during the cleanup.
+ * {@link IUpdateEngineCallback#onPayloadApplicationComplete} is called at
+ * the end with SUCCESS if successful. ERROR if transient errors (e.g. merged
+ * but needs reboot). DEVICE_CORRUPTED for permanent errors.
*/
- int cleanupSuccessfulUpdate();
+ void cleanupSuccessfulUpdate(IUpdateEngineCallback callback);
}