Add manifest/compatibility-matrix.type attribute

to distinguish device and framework HAL manifest, and
device and framework compatibility matrix.

Add .device / .framework entries to HalManifest and
CompatibilityMatrix class for device-only / fwk-only
entries. Access to these fields should be guarded with
a check to mType.

Test: libvintf_test
Test: boots
Change-Id: Id9c93c1e6bb585234a9ae6d9296f5a10582ef58f
diff --git a/RuntimeInfo.cpp b/RuntimeInfo.cpp
index 6b09a7c..c14ea95 100644
--- a/RuntimeInfo.cpp
+++ b/RuntimeInfo.cpp
@@ -242,10 +242,17 @@
 
 bool RuntimeInfo::checkCompatibility(const CompatibilityMatrix &mat,
             std::string *error) const {
-    if (kernelSepolicyVersion() != mat.mSepolicy.kernelSepolicyVersion()) {
+    if (mat.mType != SchemaType::FRAMEWORK) {
+        if (error != nullptr) {
+            *error = "Should not check runtime info against " + to_string(mat.mType)
+                    + " compatibility matrix.";
+        }
+        return false;
+    }
+    if (kernelSepolicyVersion() != mat.framework.mSepolicy.kernelSepolicyVersion()) {
         if (error != nullptr) {
             *error = "kernelSepolicyVersion = " + to_string(kernelSepolicyVersion())
-                     + " but required " + to_string(mat.mSepolicy.kernelSepolicyVersion());
+                     + " but required " + to_string(mat.framework.mSepolicy.kernelSepolicyVersion());
         }
         return false;
     }