Move all blocking client calls to libupdate_engine_client
Change-Id: I27bc86ad2eef3a573c60fde1bb10b6b37af81c1c
Test: Affected commands continue to work
Bug: 26233663
Signed-off-by: Casey Dahlin <sadmac@google.com>
diff --git a/client_library/client_impl.cc b/client_library/client_impl.cc
index af9cb05..7b80025 100644
--- a/client_library/client_impl.cc
+++ b/client_library/client_impl.cc
@@ -66,6 +66,44 @@
return StringToUpdateStatus(status_as_string, out_update_status);
}
+bool UpdateEngineClientImpl::SetUpdateOverCellularPermission(bool allowed) {
+ return proxy_->SetUpdateOverCellularPermission(allowed, nullptr);
+}
+
+bool UpdateEngineClientImpl::GetUpdateOverCellularPermission(bool *allowed) {
+ return proxy_->GetUpdateOverCellularPermission(allowed, nullptr);
+}
+
+bool UpdateEngineClientImpl::SetP2PUpdatePermission(bool enabled) {
+ return proxy_->SetP2PUpdatePermission(enabled, nullptr);
+}
+
+bool UpdateEngineClientImpl::GetP2PUpdatePermission(bool* enabled) {
+ return proxy_->GetP2PUpdatePermission(enabled, nullptr);
+}
+
+bool UpdateEngineClientImpl::Rollback(bool powerwash) {
+ return proxy_->AttemptRollback(powerwash, nullptr);
+}
+
+bool UpdateEngineClientImpl::GetRollbackPartition(string* rollback_partition) {
+ return proxy_->GetRollbackPartition(rollback_partition, nullptr);
+}
+
+bool UpdateEngineClientImpl::GetPrevVersion(string* prev_version) {
+ return proxy_->GetPrevVersion(prev_version, nullptr);
+}
+
+void UpdateEngineClientImpl::RebootIfNeeded() {
+ bool ret = proxy_->RebootIfNeeded(nullptr);
+ if (!ret) {
+ // Reboot error code doesn't necessarily mean that a reboot
+ // failed. For example, D-Bus may be shutdown before we receive the
+ // result.
+ LOG(INFO) << "RebootIfNeeded() failure ignored.";
+ }
+}
+
bool UpdateEngineClientImpl::ResetStatus() {
return proxy_->ResetStatus(nullptr);
}