Trigger boot animation on userspace reboot
Also reset some more properties to make bootanimation work properly.
Test: adb reboot userspace
Bug: 148172262
Change-Id: I0154d4fe9377c019150f5b1a709c406925db584d
diff --git a/init/reboot.cpp b/init/reboot.cpp
index 4ee7188..8c90714 100644
--- a/init/reboot.cpp
+++ b/init/reboot.cpp
@@ -741,12 +741,15 @@
});
// Triggering userspace-reboot-requested will result in a bunch of setprop
// actions. We should make sure, that all of them are propagated before
- // proceeding with userspace reboot. Synchronously setting kUserspaceRebootInProgress property
- // is not perfect, but it should do the trick.
+ // proceeding with userspace reboot. Synchronously setting sys.init.userspace_reboot.in_progress
+ // property is not perfect, but it should do the trick.
if (!android::sysprop::InitProperties::userspace_reboot_in_progress(true)) {
return Error() << "Failed to set sys.init.userspace_reboot.in_progress property";
}
EnterShutdown();
+ if (!SetProperty("sys.powerctl", "")) {
+ return Error() << "Failed to reset sys.powerctl property";
+ }
std::vector<Service*> stop_first;
// Remember the services that were enabled. We will need to manually enable them again otherwise
// triggers like class_start won't restart them.