Add value for FUEL_VOLUME_DISPLAY_UNITS in old default config for backward compatibility.

Fix: 221916124
Test: Tested manually in KitchenSink app
Change-Id: I656215c51e8b5ac897f247d462fbe57f31e954f4
This commit is contained in:
Nishtha Ahuja 2022-03-25 18:14:29 +00:00
parent b065a54afa
commit 63534553f5
2 changed files with 10 additions and 1 deletions

View file

@ -372,6 +372,15 @@ const ConfigDeclaration kVehicleProperties[]{
},
.initialValue = {.int32Values = {0}}},
{.config =
{
.prop = toInt(VehicleProperty::FUEL_VOLUME_DISPLAY_UNITS),
.access = VehiclePropertyAccess::READ_WRITE,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
.configArray = {(int)VehicleUnit::LITER, (int)VehicleUnit::US_GALLON},
},
.initialValue = {.int32Values = {(int)VehicleUnit::LITER}}},
{.config =
{
.prop = toInt(VehicleProperty::HW_KEY_INPUT),

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)121, configs.size());
EXPECT_EQ((size_t)122, configs.size());
}
TEST_F(DefaultVhalImplTest, testGetDefaultPropertyFloat) {