Android: Implement the update attempter for Android.
This patch implements the update workflow for non-Brillo targets. Only
the applyPayload() method is implemented here with a minimal subset of
functionally implemented in it. This new class acts as the service
delegate, handling all the binder service method calls for non-Brillo
targets.
Bug: 25631949
TEST=FEATURES=test emerge-link update_engine
TEST=`mmma system/update_engine` on aosp_arm-eng and edison-eng
TEST=Deployed on a non-Brillo device and tested with update_engine_client
Change-Id: I678cd141633bc2c0920a09ef27a02d53682d5330
diff --git a/daemon_state_android.h b/daemon_state_android.h
index e0fac00..5db3ef0 100644
--- a/daemon_state_android.h
+++ b/daemon_state_android.h
@@ -17,11 +17,17 @@
#ifndef UPDATE_ENGINE_DAEMON_STATE_ANDROID_H_
#define UPDATE_ENGINE_DAEMON_STATE_ANDROID_H_
+#include <memory>
#include <set>
+#include "update_engine/common/boot_control_interface.h"
+#include "update_engine/common/certificate_checker.h"
+#include "update_engine/common/hardware_interface.h"
+#include "update_engine/common/prefs_interface.h"
#include "update_engine/daemon_state_interface.h"
#include "update_engine/service_delegate_android_interface.h"
#include "update_engine/service_observer_interface.h"
+#include "update_engine/update_attempter_android.h"
namespace chromeos_update_engine {
@@ -46,6 +52,18 @@
protected:
std::set<ServiceObserverInterface*> service_observers_;
+
+ // Interface for the boot control functions.
+ std::unique_ptr<BootControlInterface> boot_control_;
+
+ // Interface for the hardware functions.
+ std::unique_ptr<HardwareInterface> hardware_;
+
+ // Interface for persisted store.
+ std::unique_ptr<PrefsInterface> prefs_;
+
+ // The main class handling the updates.
+ std::unique_ptr<UpdateAttempterAndroid> update_attempter_;
};
} // namespace chromeos_update_engine