diff options
author | Yifan Hong | 2018-03-13 20:22:34 -0500 |
---|---|---|
committer | Yifan Hong | 2018-03-13 20:46:18 -0500 |
commit | 470144fa4d01f1d422ee332fd7ce1c9d09014878 (patch) | |
tree | d32f678beba6b88ca0914be1277dcbdd38f2f011 /HalManifest.cpp | |
parent | ce4289b9dc2706687d1515dc6e120fd030e8787f (diff) | |
download | platform-system-libvintf-470144fa4d01f1d422ee332fd7ce1c9d09014878.tar.gz platform-system-libvintf-470144fa4d01f1d422ee332fd7ce1c9d09014878.tar.xz platform-system-libvintf-470144fa4d01f1d422ee332fd7ce1c9d09014878.zip |
Add ManifestHal::isDisabledHal().
When a <hal> does not have any instances (e.g. no <version>,
or no <fqname> tags), with override=true, the HAL is disabled
for this product.
Bug: 73556059
Bug: 69051162
Test: libvintf_test
Change-Id: I135748c5624feb2fa4cd8e57b515744566a5d709
Diffstat (limited to 'HalManifest.cpp')
-rw-r--r-- | HalManifest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/HalManifest.cpp b/HalManifest.cpp index c1b747a..a27e935 100644 --- a/HalManifest.cpp +++ b/HalManifest.cpp | |||
@@ -89,8 +89,8 @@ void HalManifest::removeHals(const std::string& name, size_t majorVer) { | |||
89 | 89 | ||
90 | bool HalManifest::add(ManifestHal&& halToAdd) { | 90 | bool HalManifest::add(ManifestHal&& halToAdd) { |
91 | if (halToAdd.isOverride()) { | 91 | if (halToAdd.isOverride()) { |
92 | if (halToAdd.versions.empty()) { | 92 | if (halToAdd.isDisabledHal()) { |
93 | // Special syntax when there are no <version> tags at all. Remove all existing HALs | 93 | // Special syntax when there are no instances at all. Remove all existing HALs |
94 | // with the given name. | 94 | // with the given name. |
95 | mHals.erase(halToAdd.name); | 95 | mHals.erase(halToAdd.name); |
96 | } | 96 | } |