aconfig: fix incorrect check in create_device_config_ident
Use is_valid_name_ident to check the flag name, not is_valid_package_ident. Bug: 283910447 Test: atest aconfig.test Change-Id: I3718e7de565b975a1696190e8effbcb077e5fde2
This commit is contained in:
@@ -37,7 +37,7 @@ pub fn is_valid_package_ident(s: &str) -> bool {
|
|||||||
|
|
||||||
pub fn create_device_config_ident(package: &str, flag_name: &str) -> Result<String> {
|
pub fn create_device_config_ident(package: &str, flag_name: &str) -> Result<String> {
|
||||||
ensure!(is_valid_package_ident(package), "bad package");
|
ensure!(is_valid_package_ident(package), "bad package");
|
||||||
ensure!(is_valid_package_ident(flag_name), "bad flag name");
|
ensure!(is_valid_name_ident(flag_name), "bad flag name");
|
||||||
Ok(format!("{}.{}", package, flag_name))
|
Ok(format!("{}.{}", package, flag_name))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user