diff options
author | Yifan Hong | 2018-05-01 21:08:51 -0500 |
---|---|---|
committer | Yifan Hong | 2018-05-02 16:31:45 -0500 |
commit | 5541069e3c155797649e3eb568349d8cb7f119d6 (patch) | |
tree | 713c6292fd703048736706ce86c8b6fa2b094e1c /parse_xml.cpp | |
parent | 7030c38ce61f520b32ab3f7761289a5d7534a74d (diff) | |
download | platform-system-libvintf-5541069e3c155797649e3eb568349d8cb7f119d6.tar.gz platform-system-libvintf-5541069e3c155797649e3eb568349d8cb7f119d6.tar.xz platform-system-libvintf-5541069e3c155797649e3eb568349d8cb7f119d6.zip |
Add ManifestHal::insertInstance
... that allows to add <fqname> to ManifestHal object from code.
This helps, for example, lshal.
Bug: 74247301
Test: pass
Change-Id: I28b5bb1240e24f1762d2df4cb1ded242fabea99e
Diffstat (limited to 'parse_xml.cpp')
-rw-r--r-- | parse_xml.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/parse_xml.cpp b/parse_xml.cpp index 27f31c9..8ccf9b1 100644 --- a/parse_xml.cpp +++ b/parse_xml.cpp | |||
@@ -705,6 +705,12 @@ struct ManifestHalConverter : public XmlNodeConverter<ManifestHal> { | |||
705 | if (!parseChildren(root, fqInstanceConverter, &fqInstances, error)) { | 705 | if (!parseChildren(root, fqInstanceConverter, &fqInstances, error)) { |
706 | return false; | 706 | return false; |
707 | } | 707 | } |
708 | for (const auto& e : fqInstances) { | ||
709 | if (e.hasPackage()) { | ||
710 | *error = "Should not specify package: \"" + e.string() + "\""; | ||
711 | return false; | ||
712 | } | ||
713 | } | ||
708 | if (!object->insertInstances(fqInstances, error)) { | 714 | if (!object->insertInstances(fqInstances, error)) { |
709 | return false; | 715 | return false; |
710 | } | 716 | } |