Revert "init: run property service in a thread"
This reverts commit 26f5e7da3a8d99813d1db00bfb04e4ccd49e3221.
Reason for revert: bluecross boot stability issue
Bug: 140009641
Change-Id: I7ddb9509dfb2c6f644037129aa9d3fb9ff1740aa
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 7076926..e17e899 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -80,7 +80,6 @@
using namespace std::literals::string_literals;
using android::base::Basename;
-using android::base::StartsWith;
using android::base::unique_fd;
using android::fs_mgr::Fstab;
using android::fs_mgr::ReadFstabFromFile;
@@ -688,15 +687,6 @@
}
static Result<void> do_setprop(const BuiltinArguments& args) {
- if (StartsWith(args[1], "ctl.")) {
- return Error()
- << "Cannot set ctl. properties from init; call the Service functions directly";
- }
- if (args[1] == kRestoreconProperty) {
- return Error() << "Cannot set '" << kRestoreconProperty
- << "' from init; use the restorecon builtin directly";
- }
-
property_set(args[1], args[2]);
return {};
}
@@ -1012,20 +1002,7 @@
}
static Result<void> do_load_persist_props(const BuiltinArguments& args) {
- // Devices with FDE have load_persist_props called twice; the first time when the temporary
- // /data partition is mounted and then again once /data is truly mounted. We do not want to
- // read persistent properties from the temporary /data partition or mark persistent properties
- // as having been loaded during the first call, so we return in that case.
- std::string crypto_state = android::base::GetProperty("ro.crypto.state", "");
- std::string crypto_type = android::base::GetProperty("ro.crypto.type", "");
- if (crypto_state == "encrypted" && crypto_type == "block") {
- static size_t num_calls = 0;
- if (++num_calls == 1) return {};
- }
-
- SendLoadPersistentPropertiesMessage();
-
- start_waiting_for_property("ro.persistent_properties.ready", "true");
+ load_persist_props();
return {};
}