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/binder_service_android.cc b/binder_service_android.cc
index 6b8a552..0c8bc2f 100644
--- a/binder_service_android.cc
+++ b/binder_service_android.cc
@@ -24,6 +24,8 @@
 #include <brillo/errors/error.h>
 #include <utils/String8.h>
 
+#include "update_engine/binder_service_android_common.h"
+
 using android::binder::Status;
 using android::os::IUpdateEngineCallback;
 using android::os::ParcelFileDescriptor;
@@ -31,23 +33,6 @@
 using std::vector;
 using update_engine::UpdateEngineStatus;
 
-namespace {
-Status ErrorPtrToStatus(const brillo::ErrorPtr& error) {
-  return Status::fromServiceSpecificError(
-      1, android::String8{error->GetMessage().c_str()});
-}
-
-vector<string> ToVecString(const vector<android::String16>& inp) {
-  vector<string> out;
-  out.reserve(inp.size());
-  for (const auto& e : inp) {
-    out.emplace_back(android::String8{e}.string());
-  }
-  return out;
-}
-
-}  // namespace
-
 namespace chromeos_update_engine {
 
 BinderUpdateEngineAndroidService::BinderUpdateEngineAndroidService(