aconfig: add read/write permission
Introduce the concept of flag read/write permissions: a read-only flag
can only have its value set during the build; a writable flag can by
updated in runtime.
Bug: 279485059
Test: atest aconfig.test
Change-Id: I3ec5c9571faa54de5666120ccd60090d3db9e331
diff --git a/tools/aconfig/src/commands.rs b/tools/aconfig/src/commands.rs
index 4976fb2..bc22363 100644
--- a/tools/aconfig/src/commands.rs
+++ b/tools/aconfig/src/commands.rs
@@ -103,6 +103,7 @@
description: "Description of a"
value {
value: true
+ permission: READ_ONLY
}
}
"#;
@@ -111,6 +112,7 @@
override {
id: "a"
value: false
+ permission: READ_ONLY
}
"#;
let overrides = vec![Input { source: Source::Memory, reader: Box::new(o.as_bytes()) }];