Make userspace_reboot.in_progress sysprop-as-api

sys.init.userspace_reboot.in_progress will be used to notify all
the processes (including vendor ones) that userspace reboot is
happening, hence it should be treated as stable public api.

All other sys.init.userspace_reboot.* props will be internal to /system
partition and don't require any stability guarantees.

Test: builds
Test: adb reboot userspace
Bug: 135984674
Change-Id: Ifb64a6bfae2de76bac67edea68df44e33c9cfe2d
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 8f58145..485806b 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -45,6 +45,7 @@
 #include <memory>
 
 #include <ApexProperties.sysprop.h>
+#include <InitProperties.sysprop.h>
 #include <android-base/chrono_utils.h>
 #include <android-base/file.h>
 #include <android-base/logging.h>
@@ -1222,7 +1223,9 @@
     boot_clock::time_point now = boot_clock::now();
     property_set("sys.init.userspace_reboot.last_finished",
                  std::to_string(now.time_since_epoch().count()));
-    property_set(kUserspaceRebootInProgress, "0");
+    if (!android::sysprop::InitProperties::userspace_reboot_in_progress(false)) {
+        return Error() << "Failed to set sys.init.userspace_reboot.in_progress property";
+    }
     return {};
 }