Send an initial status update notification on bind().
When the client calls bind(), this patch now sends an initial status
update so the client can react to the status update that could have
been sent before it called bind().
Bug: 27108108
TEST=`update_engine_client --follow` shows the initial status.
Change-Id: Ifbf056ebb66da17c9e60244561340b3e1ccd4232
diff --git a/daemon_state_android.cc b/daemon_state_android.cc
index 6a5aa9f..cf1e892 100644
--- a/daemon_state_android.cc
+++ b/daemon_state_android.cc
@@ -61,7 +61,6 @@
// Initialize the UpdateAttempter before the UpdateManager.
update_attempter_.reset(new UpdateAttempterAndroid(
this, prefs_.get(), boot_control_.get(), hardware_.get()));
- update_attempter_->Init();
return true;
}
@@ -69,6 +68,7 @@
bool DaemonStateAndroid::StartUpdater() {
// The DaemonState in Android is a passive daemon. It will only start applying
// an update when instructed to do so from the exposed binder API.
+ update_attempter_->Init();
return true;
}