Add binder_service_stable_android
Add a new binder service that uses the exact same service delegate as
its implementation, but exposes itself with the IUpdateEngineStable* APIs.
Note: Even though the new interface requires only one binding at a time,
race conditions for different clients are NOT handled in this CL.
Multiple binding is still possible via the unstable IUpdateEngine API
and via the Java android.os.UpdateEngine interface. Moreover, bindings
with bind(IUpdateEngineStableCallback) and bind(IUpdateEngineCallback)
are handled separately.
Test: unit test
Bug: 160996544
Change-Id: I26e8b4a58c0243d46ffcd7354d04f0c69f8fa66f
diff --git a/daemon_android.h b/daemon_android.h
index baead37..f0c028e 100644
--- a/daemon_android.h
+++ b/daemon_android.h
@@ -22,6 +22,7 @@
#include <brillo/binder_watcher.h>
#include "update_engine/binder_service_android.h"
+#include "update_engine/binder_service_stable_android.h"
#include "update_engine/common/subprocess.h"
#include "update_engine/daemon_base.h"
#include "update_engine/daemon_state_interface.h"
@@ -43,6 +44,7 @@
brillo::BinderWatcher binder_watcher_;
android::sp<BinderUpdateEngineAndroidService> binder_service_;
+ android::sp<BinderUpdateEngineAndroidStableService> stable_binder_service_;
// The daemon state with all the required daemon classes for the configured
// platform.