Reset post_data_ and services_update_finished_ on userspace reboot

Test: adb reboot userspace
Bug: 143970043
Change-Id: I77d47a8460b1526337a318547a59141334e11cdd
Merged-In: I77d47a8460b1526337a318547a59141334e11cdd
(cherry picked from commit 3ad292025c)
This commit is contained in:
Nikita Ioffe 2020-02-27 20:46:27 +00:00
parent caca3a9f5a
commit 284d0cf746
2 changed files with 6 additions and 0 deletions

View File

@ -817,6 +817,7 @@ static Result<void> DoUserspaceReboot() {
LOG(INFO) << "Re-enabling service '" << s->name() << "'";
s->Enable();
}
ServiceList::GetInstance().ResetState();
LeaveShutdown();
ActionManager::GetInstance().QueueEventTrigger("userspace-reboot-resume");
guard.Disable(); // Go on with userspace reboot.

View File

@ -75,6 +75,11 @@ class ServiceList {
bool IsServicesUpdated() const { return services_update_finished_; }
void DelayService(const Service& service);
void ResetState() {
post_data_ = false;
services_update_finished_ = false;
}
private:
std::vector<std::unique_ptr<Service>> services_;