Support PER_DISPLAY_BRIGHTNESS.
For MD target PER_DISPLAY_BRIGHTNESS must be supported. For non-md
target, PER_DISPLAY_BRIGHTNESS is also supported but optional. Because
we only have one reference config, we support PER_DISPLAY_BRIGHTNESS.
In reality, this property is doing nothing other than storing the value
into memory map.
Flag: EXEMPT HAL change
Test: Manual test on gcar_md
Bug: 356419293
Change-Id: I7c5c412bd58b25478336c82a47ea2ee0b774335e
diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
index 2d1e9ab..489d638 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
@@ -3195,19 +3195,22 @@
}
},
{
- "property": "VehicleProperty::DISPLAY_BRIGHTNESS",
+ "property": "VehicleProperty::PER_DISPLAY_BRIGHTNESS"
+ },
+ {
+ "property": "VehicleProperty::PER_DISPLAY_MAX_BRIGHTNESS",
"defaultValue": {
"int32Values": [
+ 0,
+ 100,
+ 1,
+ 100,
+ 2,
+ 100,
+ 3,
100
]
- },
- "areas": [
- {
- "areaId": 0,
- "minInt32Value": 0,
- "maxInt32Value": 100
- }
- ]
+ }
},
{
"property": "VehicleProperty::VALET_MODE_ENABLED",
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
index 54dcca2..e182f1c 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -1047,6 +1047,10 @@
VhalResult<void> isAdasPropertyAvailableResult;
VhalResult<bool> isCruiseControlTypeStandardResult;
switch (propId) {
+ case toInt(VehicleProperty::DISPLAY_BRIGHTNESS):
+ case toInt(VehicleProperty::PER_DISPLAY_BRIGHTNESS):
+ ALOGD("DISPLAY_BRIGHTNESS: %s", value.toString().c_str());
+ return {};
case toInt(VehicleProperty::AP_POWER_STATE_REPORT):
*isSpecialValue = true;
return setApPowerStateReport(value);