More information in adb shell vintf

Test: adb shell vintf

Change-Id: Ia6ffebec08303dfbe0863fa91c7bf7c3fb7f7337
diff --git a/main.cpp b/main.cpp
index 0437a64..01e3ea0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -47,6 +47,12 @@
     if (fcm != nullptr)
         std::cout << gCompatibilityMatrixConverter(*fcm);
 
+    std::cout << "======== Runtime Info =========" << std::endl;
+
+    const RuntimeInfo* ki = VintfObject::GetRuntimeInfo();
+    if (ki != nullptr) std::cout << dump(*ki);
+    std::cout << std::endl;
+
     std::cout << "======== Compatibility check =========" << std::endl;
     std::cout << "Device HAL Manifest? " << (vm != nullptr) << std::endl
               << "Device Compatibility Matrix? " << (vcm != nullptr) << std::endl
@@ -69,11 +75,17 @@
             std::cout << ", " << error;
         std::cout << std::endl;
     }
+    if (ki && fcm) {
+        bool compatible = ki->checkCompatibility(*fcm, &error);
+        std::cout << "Runtime info <==> Framework Compatibility Matrix? " << compatible;
+        if (!compatible) std::cout << ", " << error;
+        std::cout << std::endl;
+    }
 
-    std::cout << "======== Runtime Info =========" << std::endl;
-
-    const RuntimeInfo *ki = VintfObject::GetRuntimeInfo();
-    if (ki != nullptr)
-        std::cout << dump(*ki);
-    std::cout << std::endl;
+    {
+        auto compatible = VintfObject::CheckCompatibility({}, &error);
+        std::cout << "VintfObject::CheckCompatibility (0 == compatible)? " << compatible;
+        if (compatible != COMPATIBLE) std::cout << ", " << error;
+        std::cout << std::endl;
+    }
 }