Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a82cc924 authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "init: only set ro.boottime.<service> properties once." am: fe060757

am: a1a6826c

Change-Id: I7ed7631167f0d65c2a72efe26a727c18007c1c78
parents 4fd1f04a a1a6826c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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));
        }
    }
}