summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong2018-03-13 20:22:34 -0500
committerYifan Hong2018-03-13 20:46:18 -0500
commit470144fa4d01f1d422ee332fd7ce1c9d09014878 (patch)
treed32f678beba6b88ca0914be1277dcbdd38f2f011 /HalManifest.cpp
parentce4289b9dc2706687d1515dc6e120fd030e8787f (diff)
downloadplatform-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.cpp4
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
90bool HalManifest::add(ManifestHal&& halToAdd) { 90bool 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 }