init: use protobuf for serialization of persistent properties
I probably should have done this from the start... There's a shim to
convert my manually serialized format to protobuf, and since that has
not yet shipped, it'll be reverted in a short period of time.
Test: init unit tests
Test: upgrade from legacy and intermediate property formats successfully
Change-Id: Iad25f6c30d0b44d294230a53dd6876222d1c785b
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 5f5ed40..db2d472 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -641,8 +641,8 @@
load_override_properties();
/* Read persistent properties after all default values have been loaded. */
auto persistent_properties = LoadPersistentProperties();
- for (const auto& [name, value] : persistent_properties) {
- property_set(name, value);
+ for (const auto& persistent_property_record : persistent_properties.properties()) {
+ property_set(persistent_property_record.name(), persistent_property_record.value());
}
persistent_properties_loaded = true;
property_set("ro.persistent_properties.ready", "true");