Add {Get,Set}CohortHint interface.
Export the "cohort hint" getter and setter in the client interfaces
(D-Bus and Binder). The cohort hint is sent to Omaha on every update
check request but can be ignored and/or reset by Omaha on every
response.
Other minor linter fixes to the affected files.
Bug: 31740109
Test: Build with D-Bus and with Binder.
Change-Id: I93214f6ffb8662c238b3351e52bf2bdf23e46a9c
diff --git a/binder_service_brillo.cc b/binder_service_brillo.cc
index 3947ae1..5e74159 100644
--- a/binder_service_brillo.cc
+++ b/binder_service_brillo.cc
@@ -118,6 +118,22 @@
return ret;
}
+Status BinderUpdateEngineBrilloService::SetCohortHint(
+ const String16& in_cohort_hint) {
+ return CallCommonHandler(&UpdateEngineService::SetCohortHint,
+ NormalString(in_cohort_hint));
+}
+
+Status BinderUpdateEngineBrilloService::GetCohortHint(
+ String16* out_cohort_hint) {
+ string cohort_hint;
+ auto ret =
+ CallCommonHandler(&UpdateEngineService::GetCohortHint, &cohort_hint);
+
+ *out_cohort_hint = String16(cohort_hint.c_str());
+ return ret;
+}
+
Status BinderUpdateEngineBrilloService::SetP2PUpdatePermission(bool enabled) {
return CallCommonHandler(&UpdateEngineService::SetP2PUpdatePermission,
enabled);