Add support for GSR property in HIDL ref VHAL.

Test: Presubmit
Bug: 236135569
Change-Id: I3788b66aa409304927e8f5af371c049cb1bcd58e
This commit is contained in:
Yu Shan
2022-06-15 20:54:17 +00:00
parent 90de54c5cb
commit d3cf8d6294
2 changed files with 14 additions and 1 deletions

View File

@@ -1118,6 +1118,19 @@ const ConfigDeclaration kVehicleProperties[]{
},
.initialValue = {.stringValue = {"Test"}},
},
// This property is later defined in the AIDL VHAL interface. However, HIDL VHAL might
// require support for this property to meet EU regulation.
{
.config =
{
// GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT
.prop = 0x11400F47,
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::STATIC,
},
// GsrComplianceRequirementType::GSR_COMPLIANCE_REQUIRED_V1
.initialValue = {.int32Values = {1}},
},
#ifdef ENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING
// Vendor propetry for E2E ClusterHomeService testing.
{

View File

@@ -141,7 +141,7 @@ class DefaultVhalImplTest : public ::testing::Test {
TEST_F(DefaultVhalImplTest, testListProperties) {
std::vector<VehiclePropConfig> configs = mHal->listProperties();
EXPECT_EQ((size_t)122, configs.size());
EXPECT_EQ((size_t)123, configs.size());
}
TEST_F(DefaultVhalImplTest, testGetDefaultPropertyFloat) {