media: expand media_codecs.xml to support variants and domains

Added support to variant, domain and enabled attributes for <MediaCodec>.
Added support for <Variant> tag.

Bug: 129710438
Change-Id: Icf04665fdf36d8a3e9a74918978b0eb03f0e4f6c
diff --git a/media/codec2/sfplugin/Codec2InfoBuilder.cpp b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
index ead0a9b..5231b63 100644
--- a/media/codec2/sfplugin/Codec2InfoBuilder.cpp
+++ b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
@@ -248,10 +248,9 @@
     // Obtain Codec2Client
     std::vector<Traits> traits = Codec2Client::ListComponents();
 
-    MediaCodecsXmlParser parser(
-            MediaCodecsXmlParser::defaultSearchDirs,
-            "media_codecs_c2.xml",
-            "media_codecs_performance_c2.xml");
+    MediaCodecsXmlParser parser;
+    parser.parseXmlFilesInSearchDirs(
+            { "media_codecs_c2.xml", "media_codecs_performance_c2.xml" });
     if (parser.getParsingStatus() != OK) {
         ALOGD("XML parser no good");
         return OK;