Implement Android UE daemon using brillo::Daemon.
The setup logic for Brillo and Android devices is very similar despite
the differences in the daemon logic and exposed service interface.
This patch reuses the brillo::Daemon derived class and the main()
function from Brillo to implement the daemon and service setup in
Android as well.
In addition, the Chromium OS build now defines the __CHROMEOS__ macro
to make the code behave the same way as in the Brillo case.
Bug: 25631949
TEST=`mmma system/update_engine` on edison-eng and aosp_arm-eng
Change-Id: I0f9690264e0822ef7e71318c73c2f16eda99e07c
diff --git a/binder_service_android.cc b/binder_service_android.cc
index df0f0c6..c512697 100644
--- a/binder_service_android.cc
+++ b/binder_service_android.cc
@@ -24,26 +24,28 @@
namespace chromeos_update_engine {
-Status BinderService::bind(const sp<IUpdateEngineCallback>& callback,
- bool* return_value) {
+Status BinderUpdateEngineAndroidService::bind(
+ const sp<IUpdateEngineCallback>& callback,
+ bool* return_value) {
*return_value = true;
return Status::ok();
}
-Status BinderService::applyPayload(const String16& url,
- const vector<String16>& header_kv_pairs) {
+Status BinderUpdateEngineAndroidService::applyPayload(
+ const String16& url,
+ const vector<String16>& header_kv_pairs) {
return Status::ok();
}
-Status BinderService::suspend() {
+Status BinderUpdateEngineAndroidService::suspend() {
return Status::ok();
}
-Status BinderService::resume() {
+Status BinderUpdateEngineAndroidService::resume() {
return Status::ok();
}
-Status BinderService::cancel() {
+Status BinderUpdateEngineAndroidService::cancel() {
return Status::ok();
}