Update API: initial support
Initial pieces of the Update API callback framework.
- move the status callback params to a new object, UpdateEngineStatus to
allow for the easier addition of new params in the future.
- switch the IUpdateEngineStatusCallback to provide a
ParcelableUpdateEngineStatus instead of a series of individual params
- move the various GetStatus() methods to use the UpdateEngineStatus
object instead of a series of params (which will need future expansion)
- Add current and new product/os versions to both the UpdateEngineStatus
and the ParcelableUpdateEngineStatus.
Bug: 64808702
Test: unit tests, and performing OTAs via a test app calling
IUpdateEngine::AttemptUpdate() via UpdateManager::performUpdateNow()
Change-Id: I53f66f3511049f0809855814e1e758023cd8cc08
(cherry picked from commit 4f96ebf85022837603f2e10100a044d234b7d86f)
diff --git a/binder_service_android.h b/binder_service_android.h
index 7d66fcc..eb36e4c 100644
--- a/binder_service_android.h
+++ b/binder_service_android.h
@@ -45,11 +45,8 @@
}
// ServiceObserverInterface overrides.
- void SendStatusUpdate(int64_t last_checked_time,
- double progress,
- update_engine::UpdateStatus status,
- const std::string& new_version,
- int64_t new_size) override;
+ void SendStatusUpdate(
+ const update_engine::UpdateEngineStatus& update_engine_status) override;
void SendPayloadApplicationComplete(ErrorCode error_code) override;
// android::os::BnUpdateEngine overrides.