/build/make/tools/aconfig/aconfig_storage_write_api/src/ |
D | flag_info_update.rs | 26 buf: &mut [u8], in get_flag_info_offset() argument 54 buf: &mut [u8], in get_flag_attribute_and_offset() argument 57 ) -> Result<(u8, usize), AconfigStorageError> { in get_flag_attribute_and_offset() argument 66 buf: &mut [u8], in update_flag_has_server_override() argument 72 let has_override = (attribute & (FlagInfoBit::HasServerOverride as u8)) != 0; in update_flag_has_server_override() 74 buf[head] = (attribute ^ FlagInfoBit::HasServerOverride as u8).to_le_bytes()[0]; in update_flag_has_server_override() 81 buf: &mut [u8], in update_flag_has_local_override() argument 87 let has_override = (attribute & (FlagInfoBit::HasLocalOverride as u8)) != 0; in update_flag_has_local_override() 89 buf[head] = (attribute ^ FlagInfoBit::HasLocalOverride as u8).to_le_bytes()[0]; in update_flag_has_local_override() 108 assert!((attribute & (FlagInfoBit::HasServerOverride as u8)) != 0); in test_update_flag_has_server_override() [all …]
|
D | flag_value_update.rs | 24 buf: &mut [u8], in update_boolean_flag_value() argument 45 buf[head] = u8::from(flag_value).to_le_bytes()[0]; in update_boolean_flag_value() 60 let true_byte = u8::from(true).to_le_bytes()[0]; in test_boolean_flag_value_update() 61 let false_byte = u8::from(false).to_le_bytes()[0]; in test_boolean_flag_value_update()
|
D | lib.rs | 108 fn read_file_to_bytes(file_path: &str) -> Result<Vec<u8>, AconfigStorageError> { in read_file_to_bytes() argument 158 file_type: StorageFileType::FlagInfo as u8, in create_flag_info() 221 file: &mut [u8], in update_boolean_flag_value_cxx() argument 227 file: &mut [u8], in update_flag_has_server_override_cxx() argument 234 file: &mut [u8], in update_flag_has_local_override_cxx() argument 249 file: &mut [u8], in update_boolean_flag_value_cxx() argument 265 file: &mut [u8], in update_flag_has_server_override_cxx() argument 293 file: &mut [u8], in update_flag_has_local_override_cxx() argument 378 fn get_flag_attribute_at_offset(file: &str, value_type: FlagValueType, offset: u32) -> u8 { in get_flag_attribute_at_offset() argument 399 assert!((attribute & (FlagInfoBit::HasServerOverride as u8)) != 0); in test_set_flag_has_server_override() [all …]
|
/build/make/tools/aconfig/aconfig_storage_file/src/ |
D | flag_info.rs | 30 pub file_type: u8, 58 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 72 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes() 82 if list.file_type != StorageFileType::FlagInfo as u8 { in from_bytes() 102 pub attributes: u8, 111 self.attributes & (FlagInfoBit::IsReadWrite as u8) != 0, in fmt() 112 self.attributes & (FlagInfoBit::HasServerOverride as u8) != 0, in fmt() 113 self.attributes & (FlagInfoBit::HasLocalOverride as u8) != 0, in fmt() 121 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 128 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes() [all …]
|
D | flag_value.rs | 30 pub file_type: u8, 58 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 72 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes() 82 if list.file_type != StorageFileType::FlagVal as u8 { in from_bytes() 111 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 114 self.booleans.iter().map(|&v| u8::from(v).to_le_bytes()).collect::<Vec<_>>().concat(), in into_bytes() 120 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes()
|
D | test_utils.rs | 31 file_type: StorageFileType::PackageMap as u8, in create_test_package_table() 83 file_type: StorageFileType::FlagMap as u8, in create_test_flag_table() 125 file_type: StorageFileType::FlagVal as u8, in create_test_flag_value_list() 138 file_type: StorageFileType::FlagInfo as u8, in create_test_flag_info_list() 148 pub fn write_bytes_to_temp_file(bytes: &[u8]) -> Result<NamedTempFile, AconfigStorageError> { in write_bytes_to_temp_file()
|
D | package_table.rs | 30 pub file_type: u8, 59 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 74 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes() 85 if table.file_type != StorageFileType::PackageMap as u8 { in from_bytes() 119 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 131 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes() 178 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 188 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes()
|
D | flag_table.rs | 33 pub file_type: u8, 62 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 77 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes() 88 if table.file_type != StorageFileType::FlagMap as u8 { in from_bytes() 122 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 135 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes() 182 pub fn into_bytes(&self) -> Vec<u8> { in into_bytes() argument 192 pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> { in from_bytes()
|
D | lib.rs | 93 impl TryFrom<u8> for StorageFileType { 96 fn try_from(value: u8) -> Result<Self, Self::Error> { in try_from() 98 x if x == Self::PackageMap as u8 => Ok(Self::PackageMap), in try_from() 99 x if x == Self::FlagMap as u8 => Ok(Self::FlagMap), in try_from() 100 x if x == Self::FlagVal as u8 => Ok(Self::FlagVal), in try_from() 101 x if x == Self::FlagInfo as u8 => Ok(Self::FlagInfo), in try_from() 221 pub fn read_u8_from_bytes(buf: &[u8], head: &mut usize) -> Result<u8, AconfigStorageError> { in read_u8_from_bytes() argument 223 u8::from_le_bytes(buf[*head..*head + 1].try_into().map_err(|errmsg| { in read_u8_from_bytes() 232 buf: &[u8], in read_u16_from_bytes() argument 244 pub fn read_u32_from_bytes(buf: &[u8], head: &mut usize) -> Result<u32, AconfigStorageError> { in read_u32_from_bytes() argument [all …]
|
D | protos.rs | 60 pub fn try_from_binary_proto(bytes: &[u8]) -> Result<ProtoStorageFiles> { in try_from_binary_proto() 87 pub fn get_binary_proto_from_text_proto(text_proto: &str) -> Result<Vec<u8>> { in get_binary_proto_from_text_proto() argument
|
/build/make/tools/aconfig/aconfig_storage_read_api/src/ |
D | flag_info_query.rs | 25 buf: &[u8], in find_flag_attribute() argument 28 ) -> Result<u8, AconfigStorageError> { in find_flag_attribute() argument 65 assert_eq!((attribute & FlagInfoBit::HasServerOverride as u8) != 0u8, false); in test_is_flag_sticky() 78 (attribute & FlagInfoBit::IsReadWrite as u8) != 0u8, in test_is_flag_readwrite() 91 assert_eq!((attribute & FlagInfoBit::HasLocalOverride as u8) != 0u8, false); in test_flag_has_override()
|
D | lib.rs | 162 ) -> Result<u8, AconfigStorageError> { in get_flag_attribute() argument 209 pub flag_attribute: u8, 217 file: &[u8], in get_package_read_context_cxx() argument 222 file: &[u8], in get_flag_read_context_cxx() argument 227 pub fn get_boolean_flag_value_cxx(file: &[u8], offset: u32) -> BooleanFlagValueQueryCXX; in get_boolean_flag_value_cxx() argument 230 file: &[u8], in get_flag_attribute_cxx() argument 319 pub(crate) fn new(info_result: Result<u8, AconfigStorageError>) -> Self { in new() argument 353 pub fn get_package_read_context_cxx(file: &[u8], package: &str) -> ffi::PackageReadContextQueryCXX { in get_package_read_context_cxx() argument 359 file: &[u8], in get_flag_read_context_cxx() argument 367 pub fn get_boolean_flag_value_cxx(file: &[u8], offset: u32) -> ffi::BooleanFlagValueQueryCXX { in get_boolean_flag_value_cxx() argument [all …]
|
D | flag_value_query.rs | 24 pub fn find_boolean_flag_value(buf: &[u8], flag_index: u32) -> Result<bool, AconfigStorageError> { in find_boolean_flag_value() argument
|
D | package_table_query.rs | 34 buf: &[u8], in find_package_read_context() argument
|
D | flag_table_query.rs | 34 buf: &[u8], in find_flag_read_context() argument
|
/build/make/tools/aconfig/aconfig_storage_write_api/tests/ |
D | storage_write_api_test.rs | 31 fn get_flag_attribute_at_offset(file: &str, value_type: FlagValueType, offset: u32) -> u8 { in get_flag_attribute_at_offset() argument 73 assert!((attribute & (FlagInfoBit::HasServerOverride as u8)) != 0); in test_set_flag_has_server_override() 77 assert!((attribute & (FlagInfoBit::HasServerOverride as u8)) == 0); in test_set_flag_has_server_override() 95 assert!((attribute & (FlagInfoBit::HasLocalOverride as u8)) != 0); in test_set_flag_has_local_override() 99 assert!((attribute & (FlagInfoBit::HasLocalOverride as u8)) == 0); in test_set_flag_has_local_override()
|
/build/make/tools/aconfig/aconfig_storage_read_api/tests/ |
D | storage_read_api_test.rs | 181 assert!((attribute & FlagInfoBit::HasServerOverride as u8) == 0u8); in test_flag_info_query() 182 assert_eq!((attribute & FlagInfoBit::IsReadWrite as u8) != 0u8, expected_value); in test_flag_info_query() 183 assert!((attribute & FlagInfoBit::HasLocalOverride as u8) == 0u8); in test_flag_info_query()
|
/build/make/tools/aconfig/aconfig/src/storage/ |
D | flag_value.rs | 27 file_type: StorageFileType::FlagVal as u8, in new_header()
|
D | package_table.rs | 30 file_type: StorageFileType::PackageMap as u8, in new_header()
|
D | flag_table.rs | 30 file_type: StorageFileType::FlagMap as u8, in new_header()
|
D | mod.rs | 90 ) -> Result<Vec<u8>> in generate_storage_file()
|
/build/make/tools/aconfig/aconfig/src/ |
D | commands.rs | 58 pub contents: Vec<u8>, 70 ) -> Result<Vec<u8>> { in parse_flags() argument 261 ) -> Result<Vec<u8>> { in create_storage() argument 267 pub fn create_device_config_defaults(mut input: Input) -> Result<Vec<u8>> { in create_device_config_defaults() argument 289 pub fn create_device_config_sysprops(mut input: Input) -> Result<Vec<u8>> { in create_device_config_sysprops() argument 315 ) -> Result<Vec<u8>> { in dump_parsed_flags() argument
|
D | dump.rs | 45 pub fn dump_parsed_flags<I>(parsed_flags_iter: I, format: DumpFormat) -> Result<Vec<u8>> in dump_parsed_flags() 71 fn dump_custom_format(flag: &ProtoParsedFlag, format: &str, output: &mut Vec<u8>) { in dump_custom_format() argument
|
/build/make/tools/aconfig/printflags/src/ |
D | main.rs | 43 fn xxd(bytes: &[u8]) -> String { in xxd()
|
/build/make/tools/aconfig/aconfig_storage_read_api/srcs/ |
D | lib.rs | 154 Ok(value) => value as u8, in Java_android_aconfig_storage_AconfigStorageReadAPI_getBooleanFlagValue()
|