Allow to set the network used for an update attempt.
When triggering an update attempt in Android, we can force all the
traffic to go through a given network by passing a NETWORK_ID=<id>
in the extra key-value pair field.
Bug: 29921093
TEST=Called update_engine_client passing NETWORK_ID.
(cherry picked from commit 87792ea818a63f2d246bbba2b7429b85ee8d669f)
Change-Id: I0e8a245961788c75106832e9fea8b07cd894f22d
diff --git a/update_attempter_android.h b/update_attempter_android.h
index f6f45f6..9e91dca 100644
--- a/update_attempter_android.h
+++ b/update_attempter_android.h
@@ -31,6 +31,7 @@
#include "update_engine/common/cpu_limiter.h"
#include "update_engine/common/hardware_interface.h"
#include "update_engine/common/prefs_interface.h"
+#include "update_engine/network_selector_interface.h"
#include "update_engine/payload_consumer/download_action.h"
#include "update_engine/payload_consumer/postinstall_runner_action.h"
#include "update_engine/service_delegate_android_interface.h"
@@ -163,6 +164,9 @@
// CPU limiter during the update.
CPULimiter cpu_limiter_;
+ // Helper class to select the network to use during the update.
+ std::unique_ptr<NetworkSelectorInterface> network_selector_;
+
// Whether we have marked the current slot as good. This step is required
// before applying an update to the other slot.
bool updated_boot_flags_ = false;