From 7d3202650d8c8ef9d982159f5451f5ba2eb18a20 Mon Sep 17 00:00:00 2001 From: Keun-young Park Date: Fri, 17 Feb 2017 17:48:56 -0800 Subject: [PATCH] set ro.boottime.persistent_properties when persisted props are restored - allows components relying on persisted props to wait for this property. bug: 35178781 Test: reboots Change-Id: I06cbf2a6b375654fcc277a2699fceeb23846a241 --- init/property_service.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init/property_service.cpp b/init/property_service.cpp index 04bcb1862..decd6445c 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include #include @@ -49,6 +50,7 @@ #include #include +#include #include #include "bootimg.h" @@ -57,6 +59,8 @@ #include "util.h" #include "log.h" +using android::base::StringPrintf; + #define PERSISTENT_PROPERTY_DIR "/data/property" #define FSTAB_PREFIX "/fstab." #define RECOVERY_MOUNT_POINT "/recovery" @@ -605,6 +609,8 @@ void load_persist_props(void) { load_override_properties(); /* Read persistent properties after all default values have been loaded. */ load_persistent_properties(); + uint64_t start_ns = boot_clock::now().time_since_epoch().count(); + property_set("ro.boottime.persistent_properties", StringPrintf("%" PRIu64, start_ns).c_str()); } void load_recovery_id_prop() {