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/update_manager/real_updater_provider.h b/update_manager/real_updater_provider.h
index b99bcc5..eb8b8e6 100644
--- a/update_manager/real_updater_provider.h
+++ b/update_manager/real_updater_provider.h
@@ -64,7 +64,7 @@
return var_new_version_.get();
}
- Variable<int64_t>* var_payload_size() override {
+ Variable<uint64_t>* var_payload_size() override {
return var_payload_size_.get();
}
@@ -107,7 +107,7 @@
std::unique_ptr<Variable<double>> var_progress_;
std::unique_ptr<Variable<Stage>> var_stage_;
std::unique_ptr<Variable<std::string>> var_new_version_;
- std::unique_ptr<Variable<int64_t>> var_payload_size_;
+ std::unique_ptr<Variable<uint64_t>> var_payload_size_;
std::unique_ptr<Variable<std::string>> var_curr_channel_;
std::unique_ptr<Variable<std::string>> var_new_channel_;
std::unique_ptr<Variable<bool>> var_p2p_enabled_;