Merge "Add new dump format map in aconfig" into main am: 14a82dab15
am: 3d25718707
Original change: https://android-review.googlesource.com/c/platform/build/+/2860210 Change-Id: Ibf2a65821601f867d61b87a453b56d65faddb10d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -268,6 +268,7 @@ pub enum DumpFormat {
|
||||
Verbose,
|
||||
Protobuf,
|
||||
Textproto,
|
||||
Bool,
|
||||
}
|
||||
|
||||
pub fn dump_parsed_flags(
|
||||
@@ -318,6 +319,17 @@ pub fn dump_parsed_flags(
|
||||
let s = protobuf::text_format::print_to_string_pretty(&parsed_flags);
|
||||
output.extend_from_slice(s.as_bytes());
|
||||
}
|
||||
DumpFormat::Bool => {
|
||||
for parsed_flag in parsed_flags.parsed_flag.into_iter() {
|
||||
let line = format!(
|
||||
"{}.{}={:?}\n",
|
||||
parsed_flag.package(),
|
||||
parsed_flag.name(),
|
||||
parsed_flag.state() == ProtoFlagState::ENABLED
|
||||
);
|
||||
output.extend_from_slice(line.as_bytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(output)
|
||||
}
|
||||
|
Reference in New Issue
Block a user