Add sysprops for start & end of userspace reboot
There will be useful in debugging/logging events to statsd.
Also as part of this CL, sys.init.userspace_reboot.in_progress property
is now used as a mean of synchronization. It is set directly in
DoUserspaceReboot, to make sure that all the setprop actions triggered
by userspace-reboot-requested were processed.
Test: adb reboot userspace
Test: adb shell getprop sys.init.userspace_reboot.last_started
Test: adb shell getprop sys.init.userspace_reboot.last_finished
Bug: 135984674
Change-Id: I9debcd4f058e790855200d5295344dafb30e496a
diff --git a/init/reboot.h b/init/reboot.h
index 81c3edc..cdfa024 100644
--- a/init/reboot.h
+++ b/init/reboot.h
@@ -22,6 +22,8 @@
namespace android {
namespace init {
+static const constexpr char* kUserspaceRebootInProgress = "sys.init.userspace_reboot.in_progress";
+
// Parses and handles a setprop sys.powerctl message.
void HandlePowerctlMessage(const std::string& command);