summaryrefslogtreecommitdiff
path: root/init/service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'init/service.cpp')
-rw-r--r--init/service.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/init/service.cpp b/init/service.cpp
index ad42df7d9..cc97d949d 100644
--- a/init/service.cpp
+++ b/init/service.cpp
@@ -45,7 +45,6 @@
#include <android/api-level.h>
#include "mount_namespace.h"
-#include "property_service.h"
#include "selinux.h"
#else
#include "host_init_stubs.h"
@@ -55,6 +54,7 @@ using android::base::boot_clock;
using android::base::GetProperty;
using android::base::Join;
using android::base::make_scope_guard;
+using android::base::SetProperty;
using android::base::StartsWith;
using android::base::StringPrintf;
using android::base::WriteStringToFile;
@@ -164,13 +164,13 @@ void Service::NotifyStateChange(const std::string& new_state) const {
}
std::string prop_name = "init.svc." + name_;
- property_set(prop_name, new_state);
+ SetProperty(prop_name, new_state);
if (new_state == "running") {
uint64_t start_ns = time_started_.time_since_epoch().count();
std::string boottime_property = "ro.boottime." + name_;
if (GetProperty(boottime_property, "").empty()) {
- property_set(boottime_property, std::to_string(start_ns));
+ SetProperty(boottime_property, std::to_string(start_ns));
}
}
@@ -178,9 +178,9 @@ void Service::NotifyStateChange(const std::string& new_state) const {
// on device for security checks.
std::string pid_property = "init.svc_debug_pid." + name_;
if (new_state == "running") {
- property_set(pid_property, std::to_string(pid_));
+ SetProperty(pid_property, std::to_string(pid_));
} else if (new_state == "stopped") {
- property_set(pid_property, "");
+ SetProperty(pid_property, "");
}
}
@@ -324,7 +324,7 @@ void Service::Reap(const siginfo_t& siginfo) {
LOG(ERROR) << "updatable process '" << name_ << "' exited 4 times "
<< (boot_completed ? "in 4 minutes" : "before boot completed");
// Notifies update_verifier and apexd
- property_set("sys.init.updatable_crashing", "1");
+ SetProperty("sys.init.updatable_crashing", "1");
}
}
} else {