fs_mgr: use ro.persistent_properties.ready
Replace more complicated logic that determines that persistent
properties are now valid with a simple check of
ro.persistent_properties.ready.
Test: manual
Bug: 109821005
Change-Id: I3e43df8283cb97abbf5c0333e64db4ad11703798
diff --git a/fs_mgr/fs_mgr_overlayfs.cpp b/fs_mgr/fs_mgr_overlayfs.cpp
index 74dfc00..0793e3f 100644
--- a/fs_mgr/fs_mgr_overlayfs.cpp
+++ b/fs_mgr/fs_mgr_overlayfs.cpp
@@ -65,11 +65,10 @@
// acceptable overlayfs backing storage
const auto kOverlayMountPoint = "/cache"s;
-// return true if everything is mounted, but before adb is started. At
-// 'trigger firmware_mounts_complete' after 'trigger load_persist_props_action'.
+// Return true if everything is mounted, but before adb is started. Right
+// after 'trigger load_persist_props_action' is done.
bool fs_mgr_boot_completed() {
- return !android::base::GetProperty("ro.boottime.init", "").empty() &&
- !!access("/dev/.booting", F_OK);
+ return android::base::GetBoolProperty("ro.persistent_properties.ready", false);
}
bool fs_mgr_is_dir(const std::string& path) {