assemble_vintf: auto infer matrix kernel FCM
When a <kernel> tag is added to a <compatibility-matrix>, always
set the proper 'level' attribute.
Test: libvintf_test
Bug: 139309488
Change-Id: I3e091238ec21d45f7004269f2edfcb398e462f2d
diff --git a/CompatibilityMatrix.cpp b/CompatibilityMatrix.cpp
index faba552..a383e36 100644
--- a/CompatibilityMatrix.cpp
+++ b/CompatibilityMatrix.cpp
@@ -39,6 +39,10 @@
return false;
}
+ if (kernel.getSourceMatrixLevel() == Level::UNSPECIFIED) {
+ kernel.setSourceMatrixLevel(level());
+ }
+
auto it = framework.mKernels.begin();
for (; it != framework.mKernels.end(); ++it) {
if (it->minLts() == kernel.minLts()) {