checkvintf gets the correct files.
Test: checkvintf with the script provided in the help message
Bug: 72722951
Change-Id: Ibb71a1593e42ee4043030827bb20ffac3a6e70d3
diff --git a/VintfObject.cpp b/VintfObject.cpp
index c68de41..c10949c 100644
--- a/VintfObject.cpp
+++ b/VintfObject.cpp
@@ -286,7 +286,7 @@
status_t status = details::gFetcher->fetch(path, content, &fetchError);
if (status != OK) {
if (error) {
- *error += "Ignore file " + path + ": " + fetchError + "\n";
+ *error += "Framework Matrix: Ignore file " + path + ": " + fetchError + "\n";
}
continue;
}
@@ -294,7 +294,7 @@
auto it = results.emplace(results.end());
if (!gCompatibilityMatrixConverter(&it->object, content, error)) {
if (error) {
- *error += "Ignore file " + path + ": " + *error + "\n";
+ *error += "Framework Matrix: Ignore file " + path + ": " + *error + "\n";
}
results.erase(it);
continue;
@@ -484,7 +484,9 @@
(void)mounter.umountVendor(); // ignore errors
}
- updated.runtimeInfo = VintfObject::GetRuntimeInfo(true /* skipCache */);
+ if ((disabledChecks & DISABLE_RUNTIME_INFO) == 0) {
+ updated.runtimeInfo = VintfObject::GetRuntimeInfo(true /* skipCache */);
+ }
// null checks for files and runtime info after the update
if (updated.fwk.manifest == nullptr) {
@@ -503,9 +505,12 @@
ADD_MESSAGE("No device matrix file from device or from update package");
return NO_INIT;
}
- if (updated.runtimeInfo == nullptr) {
- ADD_MESSAGE("No runtime info from device");
- return NO_INIT;
+
+ if ((disabledChecks & DISABLE_RUNTIME_INFO) == 0) {
+ if (updated.runtimeInfo == nullptr) {
+ ADD_MESSAGE("No runtime info from device");
+ return NO_INIT;
+ }
}
// compatiblity check.
@@ -523,11 +528,15 @@
}
return INCOMPATIBLE;
}
- if (!updated.runtimeInfo->checkCompatibility(*updated.fwk.matrix, error, disabledChecks)) {
- if (error) {
- error->insert(0, "Runtime info and framework compatibility matrix are incompatible: ");
+
+ if ((disabledChecks & DISABLE_RUNTIME_INFO) == 0) {
+ if (!updated.runtimeInfo->checkCompatibility(*updated.fwk.matrix, error, disabledChecks)) {
+ if (error) {
+ error->insert(0,
+ "Runtime info and framework compatibility matrix are incompatible: ");
+ }
+ return INCOMPATIBLE;
}
- return INCOMPATIBLE;
}
return COMPATIBLE;
@@ -549,6 +558,14 @@
const std::string kOdmLegacyVintfDir = "/odm/etc/";
const std::string kOdmLegacyManifest = kOdmLegacyVintfDir + "manifest.xml";
+std::vector<std::string> dumpFileList() {
+ return {
+ kSystemVintfDir, kVendorVintfDir, kOdmVintfDir, kOdmLegacyVintfDir,
+
+ kVendorLegacyManifest, kVendorLegacyMatrix, kSystemLegacyManifest, kSystemLegacyMatrix,
+ };
+}
+
} // namespace details
// static