Don't override BOARD_SEPOLICY_VERS if already set.
Allow the input manifest to already contain BOARD_SEPOLICY_VERS.
Bug: 78943004 # for full combine
Test: m assembled_framework_manifest.xml produces correct manifest w/o
warning + w/o overriding sepolicy vers.
Change-Id: Ieb98d8a650fb8f5791f08e378514d3f8f04f131f
diff --git a/AssembleVintf.cpp b/AssembleVintf.cpp
index 575e598..1153f47 100644
--- a/AssembleVintf.cpp
+++ b/AssembleVintf.cpp
@@ -331,6 +331,7 @@
}
}
+ // TODO(b/78943004): add everything
if (!halManifest->addAllHals(&halToAdd, &error)) {
std::cerr << "File \"" << path << "\" cannot be added: conflict on HAL \"" << error
<< "\" with an existing HAL. See <hal> with the same name "
@@ -341,9 +342,8 @@
}
if (halManifest->mType == SchemaType::DEVICE) {
- if (!getFlag("BOARD_SEPOLICY_VERS", &halManifest->device.mSepolicyVersion)) {
- return false;
- }
+ (void)getFlagIfUnset("BOARD_SEPOLICY_VERS", &halManifest->device.mSepolicyVersion);
+
if (!setDeviceFcmVersion(halManifest)) {
return false;
}