Android: Implement the binder service.
This patch introduces the service delegate interface for non-Brillo
targets, which is the class in charge of implementing the API exposed
by the service. The binder service for non-Brillo targets is now
completed using this interface.
The other side of this interface will be implemented in a follow up CL,
while this CL includes only the interface and its usage.
To accomodate non-Brillo targets, the generic ServiceObserverInterface
is extended with the PayloadApplicationComplete message, which will be
implemented for all targets in the future.
Bug: 25631949
TEST=`mmma system/update_engine` on aosp_arm-eng and edison-eng
Change-Id: I9fa8e9565ae92515e81e07d2cef562fc4e11a7ba
diff --git a/binder_service_brillo.h b/binder_service_brillo.h
index 99aa76b..178305b 100644
--- a/binder_service_brillo.h
+++ b/binder_service_brillo.h
@@ -19,6 +19,7 @@
#include <utils/Errors.h>
+#include <string>
#include <vector>
#include <utils/RefBase.h>
@@ -35,7 +36,7 @@
class BinderUpdateEngineBrilloService : public android::brillo::BnUpdateEngine,
public ServiceObserverInterface {
public:
- BinderUpdateEngineBrilloService(SystemState* system_state)
+ explicit BinderUpdateEngineBrilloService(SystemState* system_state)
: common_(new UpdateEngineService(system_state)) {}
virtual ~BinderUpdateEngineBrilloService() = default;
@@ -49,6 +50,7 @@
update_engine::UpdateStatus status,
const std::string& new_version,
int64_t new_size) override;
+ void SendPayloadApplicationComplete(ErrorCode error_code) override {}
// Channel tracking changes are ignored.
void SendChannelChangeUpdate(const std::string& tracking_channel) override {}