Merge "init: only set ro.boottime.<service> properties once."
am: fe0607575d
Change-Id: I1ef16e0a09803a4b3681227135ce2f1ec17b6401
This commit is contained in:
commit
a1a6826c59
1 changed files with 4 additions and 1 deletions
|
@ -201,7 +201,10 @@ void Service::NotifyStateChange(const std::string& new_state) const {
|
|||
|
||||
if (new_state == "running") {
|
||||
uint64_t start_ns = time_started_.time_since_epoch().count();
|
||||
property_set("ro.boottime." + name_, std::to_string(start_ns));
|
||||
std::string boottime_property = "ro.boottime." + name_;
|
||||
if (GetProperty(boottime_property, "").empty()) {
|
||||
property_set(boottime_property, std::to_string(start_ns));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue