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.h b/binder_service_android.h
index 3c4939a..224ab07 100644
--- a/binder_service_android.h
+++ b/binder_service_android.h
@@ -28,10 +28,10 @@
namespace chromeos_update_engine {
-class BinderService : public android::os::BnUpdateEngine {
+class BinderUpdateEngineAndroidService : public android::os::BnUpdateEngine {
public:
- BinderService() = default;
- virtual ~BinderService() = default;
+ BinderUpdateEngineAndroidService() = default;
+ ~BinderUpdateEngineAndroidService() override = default;
android::binder::Status applyPayload(
const android::String16& url,
@@ -46,7 +46,7 @@
android::binder::Status resume() override;
android::binder::Status cancel() override;
-}; // class BinderService
+};
} // namespace chromeos_update_engine