Implement FCM Version in matrices / manifests.

"level" is an attribute on compatibility matrices / manifests
to specify the FCM Version they declare / implement. Value can
be "legacy" or a positive number, or empty (for old files).

Test: libvintf_test
Test: Built manifests / matrices has not changed (because
      value is "unspecified").

Bug: 69854976 device manfiest must specify FCM Version
Bug: 69636193 all matrices should be installed to system image
Bug: 64720381 deprecation schedule

Change-Id: I15d34343fae4ad79d86bd50e9de8c4f6ac09fdfd
Merged-In: I15d34343fae4ad79d86bd50e9de8c4f6ac09fdfd
diff --git a/CompatibilityMatrix.cpp b/CompatibilityMatrix.cpp
index 73d0384..f788569 100644
--- a/CompatibilityMatrix.cpp
+++ b/CompatibilityMatrix.cpp
@@ -38,6 +38,10 @@
     return mType;
 }
 
+Level CompatibilityMatrix::level() const {
+    return mLevel;
+}
+
 Version CompatibilityMatrix::getMinimumMetaVersion() const {
     // TODO(b/62801658): this needs to depend on whether there are 1.1 requirements
     // (e.g. required <xmlfile> entry)
@@ -68,7 +72,8 @@
 }
 
 bool operator==(const CompatibilityMatrix &lft, const CompatibilityMatrix &rgt) {
-    return lft.mType == rgt.mType && lft.mHals == rgt.mHals && lft.mXmlFiles == rgt.mXmlFiles &&
+    return lft.mType == rgt.mType && lft.mLevel == rgt.mLevel && lft.mHals == rgt.mHals &&
+           lft.mXmlFiles == rgt.mXmlFiles &&
            (lft.mType != SchemaType::DEVICE || (lft.device.mVndk == rgt.device.mVndk)) &&
            (lft.mType != SchemaType::FRAMEWORK ||
             (lft.framework.mKernels == rgt.framework.mKernels &&