Add getSepolicyVersions to Framework's matrix
This will be used to figure out the sepolicy version of framework.
Bug: 186596569
Test: atest CtsSecurityHostTestCases:android.security.cts.SELinuxNeverallowRulesTest
Change-Id: I06e4841afeb6049d3e401344a265a2c22b7786e0
diff --git a/CompatibilityMatrix.cpp b/CompatibilityMatrix.cpp
index 6fc6675..f8d7d05 100644
--- a/CompatibilityMatrix.cpp
+++ b/CompatibilityMatrix.cpp
@@ -460,6 +460,11 @@
return found;
}
+std::vector<VersionRange> CompatibilityMatrix::getSepolicyVersions() const {
+ if (type() == SchemaType::FRAMEWORK) return framework.mSepolicy.sepolicyVersions();
+ return {};
+}
+
std::string CompatibilityMatrix::getVendorNdkVersion() const {
return type() == SchemaType::DEVICE ? device.mVendorNdk.version() : "";
}