Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50db0356 authored by Yu Shan's avatar Yu Shan
Browse files

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
parent a701b82c
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -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",
+4 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,10 @@ VhalResult<void> FakeVehicleHardware::maybeSetSpecialValue(const VehiclePropValu
    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);