Clean up ManifestHal's public convenience constructor.

Bug: 34620633
Test: libvintf_test
Change-Id: I43571d7d5a56d60e43a1b75a683f0f41d470bfbf
diff --git a/ManifestHal.cpp b/ManifestHal.cpp
index f69eb34..aa40c82 100644
--- a/ManifestHal.cpp
+++ b/ManifestHal.cpp
@@ -31,33 +31,6 @@
     return true;
 }
 
-// static
-ManifestHal ManifestHal::hal(std::string &&name,
-                       ImplLevel implLevel,
-                       std::string &&impl,
-                       Version version,
-                       Transport tr) {
-    return ManifestHal{HalFormat::HIDL, std::move(name), {version},
-            {implLevel, std::move(impl)}, tr};
-}
-
-// static
-ManifestHal ManifestHal::hal(std::string &&name,
-                       ImplLevel implLevel,
-                       std::string &&impl,
-                       std::vector<Version> &&versions,
-                       Transport tr) {
-    return ManifestHal{HalFormat::HIDL, std::move(name), std::move(versions),
-            {implLevel, std::move(impl)}, tr};
-}
-
-// static
-ManifestHal ManifestHal::nonhal(std::string &&name,
-                          std::vector<Version> &&versions) {
-    return ManifestHal{HalFormat::NATIVE, std::move(name), std::move(versions),
-            {ImplLevel::EMPTY, std::string{}}, Transport::EMPTY};
-}
-
 bool ManifestHal::operator==(const ManifestHal &other) const {
     if (format != other.format)
         return false;
diff --git a/include/vintf/ManifestHal.h b/include/vintf/ManifestHal.h
index 4f007cf..401cf8a 100644
--- a/include/vintf/ManifestHal.h
+++ b/include/vintf/ManifestHal.h
@@ -36,20 +36,6 @@
 
 struct ManifestHal {
 
-    // convenience constructors
-    static ManifestHal hal(std::string &&name,
-                           ImplLevel implLevel,
-                           std::string &&impl,
-                           Version version,
-                           Transport transport);
-    static ManifestHal hal(std::string &&name,
-                           ImplLevel implLevel,
-                           std::string &&impl,
-                           std::vector<Version> &&versions,
-                           Transport transport);
-    static ManifestHal nonhal(std::string &&name,
-                              std::vector<Version> &&versions);
-
     bool operator==(const ManifestHal &other) const;
 
     HalFormat format = HalFormat::HIDL;
diff --git a/test/main.cpp b/test/main.cpp
index 6a55da9..97c7e95 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -68,10 +68,20 @@
     }
     HalManifest testHalManifest() {
         HalManifest vm;
-        vm.add(ManifestHal::hal("android.hardware.camera", ImplLevel::SOC, "msm8892",
-                Version(2,0), Transport::HWBINDER));
-        vm.add(ManifestHal::hal("android.hardware.nfc", ImplLevel::GENERIC, "generic",
-                Version(1,0), Transport::PASSTHROUGH));
+        vm.add(ManifestHal{
+            .format = HalFormat::HIDL,
+            .name = "android.hardware.camera",
+            .versions = {Version(2, 0)},
+            .impl = HalImplementation{ImplLevel::SOC, "msm8892"},
+            .transport = Transport::HWBINDER
+        });
+        vm.add(ManifestHal{
+            .format = HalFormat::HIDL,
+            .name = "android.hardware.nfc",
+            .versions = {Version(1, 0)},
+            .impl = HalImplementation{ImplLevel::GENERIC, "generic"},
+            .transport = Transport::PASSTHROUGH
+        });
 
         return vm;
     }
@@ -309,8 +319,14 @@
 TEST_F(LibVintfTest, IsValid) {
     EXPECT_TRUE(isValid(ManifestHal()));
 
-    ManifestHal invalidHal = ManifestHal::hal("android.hardware.camera", ImplLevel::SOC, "msm8892",
-            {{Version(2,0), Version(2,1)}}, Transport::PASSTHROUGH);
+    ManifestHal invalidHal{
+        .format = HalFormat::HIDL,
+        .name = "android.hardware.camera",
+        .versions = {{Version(2, 0), Version(2, 1)}},
+        .impl = HalImplementation{ImplLevel::SOC, "msm8892"},
+        .transport = Transport::PASSTHROUGH
+    };
+
     EXPECT_FALSE(isValid(invalidHal));
     HalManifest vm2;
     EXPECT_FALSE(add(vm2, std::move(invalidHal)));