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

Commit 9cb6bcfa authored by Yu Shan's avatar Yu Shan
Browse files

Update documentation for display brightness.

PowerHalService relies on VHAL to use property change event to
communicate the display brightness. This CL updates the doc
to be explicit about this requirement.

Furthermore, getting PER_DISPLAY_BRIGHTNESS without specifying
which port to get is confusing, so this CL also updates the doc.

Test: None, no code change
Bug: 336831738
Change-Id: Id4d0e7ff5fc065a53a38e831810470469563c3e6
parent 31cf5e1b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -516,12 +516,12 @@
            {
                "name": "DISPLAY_BRIGHTNESS",
                "value": 289409539,
                "description": "Property to represent brightness of the display.\nSome cars have single control for the brightness of all displays and this property is to share change in that control. In cars which have displays whose brightness is controlled separately, they must use PER_DISPLAY_BRIGHTNESS.\nOnly one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by AAOS.\nIf this is writable, android side can set this value when user changes display brightness from Settings. If this is read only, user may still change display brightness from Settings, but that must not be reflected to other displays."
                "description": "Property to represent brightness of the display.\nSome cars have single control for the brightness of all displays and this property is to share change in that control. In cars which have displays whose brightness is controlled separately, they must use PER_DISPLAY_BRIGHTNESS.\nOnly one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by AAOS.\nIf this is writable, android side can set this value when user changes display brightness from Settings. If this is read only, user may still change display brightness from Settings, but that must not be reflected to other displays.\nIf this is writable, writing this property must cause an on property change event even if the new display brightness is the same as the current value."
            },
            {
                "name": "PER_DISPLAY_BRIGHTNESS",
                "value": 289475076,
                "description": "Property to represent brightness of the displays which are controlled separately.\nSome cars have one or more displays whose brightness is controlled separately and this property is to inform the brightness of each passenger display. In cars where all displays' brightness is controlled together, they must use DISPLAY_BRIGHTNESS.\nOnly one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by AAOS.\nThe display port uniquely identifies a physical connector on the device for display output, ranging from 0 to 255.\nint32Values[0] : display port int32Values[1] : brightness"
                "description": "Property to represent brightness of the displays which are controlled separately.\nSome cars have one or more displays whose brightness is controlled separately and this property is to inform the brightness of each passenger display. In cars where all displays' brightness is controlled together, they must use DISPLAY_BRIGHTNESS.\nOnly one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by AAOS.\nThe display port uniquely identifies a physical connector on the device for display output, ranging from 0 to 255.\nWriting this property must cause an on property change event that contains the same [display port, brightness] tuple even if the new display brightness is the same as the current value.\nTo get the display brightness for a specific display port, the GetValueRequest must contain a VehiclePropValue, which contains one int32Value: displayPort. Getting this property without specifying the the display port is undefined behavior.\nint32Values[0] : display port int32Values[1] : brightness"
            },
            {
                "name": "Valet mode enabled",
+14 −0
Original line number Diff line number Diff line
@@ -1734,8 +1734,13 @@ enum VehicleProperty {
     * change display brightness from Settings, but that must not be reflected
     * to other displays.
     *
     * If this is writable, writing this property must cause an on property
     * change event even if the new display brightness is the same as the
     * current value.
     *
     * @change_mode VehiclePropertyChangeMode.ON_CHANGE
     * @access VehiclePropertyAccess.READ_WRITE
     * @access VehiclePropertyAccess.READ
     * @version 2
     */
    DISPLAY_BRIGHTNESS = 0x0A03 + 0x10000000 + 0x01000000
@@ -1755,6 +1760,15 @@ enum VehicleProperty {
     * The display port uniquely identifies a physical connector on the device
     * for display output, ranging from 0 to 255.
     *
     * Writing this property must cause an on property change event that
     * contains the same [display port, brightness] tuple even if the new
     * display brightness is the same as the current value.
     *
     * To get the display brightness for a specific display port, the
     * GetValueRequest must contain a VehiclePropValue, which contains one
     * int32Value: displayPort. Getting this property without specifying the
     * the display port is undefined behavior.
     *
     * int32Values[0] : display port
     * int32Values[1] : brightness
     *