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

Commit 4e6144c9 authored by Aaqib Ismail's avatar Aaqib Ismail
Browse files

Add HAL changes for SEAT_HEADREST_HEIGHT_POS_V2 and deprecate SEAT_HEADREST_HEIGHT_POS

This deprecation process is for the currently unusable property SEAT_HEADREST_HEIGHT_POS which targets the GLOBAL area type instead of the SEAT area type. This means that changes apply to all seats instead of individual seats. This new property addresses this issue and solves it.

Bug: 242587816
Test: atest VtsHalAutomotiveVehicle_TargetTest
      atest CtsCarTestCases:CarPropertyManagerTest
      atest CtsCarTestCases:VehiclePropertyIdsTest
Change-Id: I1102ffcac6e0c97d73dfc574a5c863a2082d8f3f
parent c19ec42e
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -2117,6 +2117,12 @@ enum VehicleProperty : int32_t {
        | VehicleArea:SEAT),
        | VehicleArea:SEAT),


    /**
    /**
     * DO NOT USE
     *
     * This property is defined as type VehicleArea:GLOBAL, which means all seats use the same
     * value. Use SEAT_HEADREST_HEIGHT_POS_V2 instead which fixes this issue by being defined as
     * type VehicleArea:SEAT.
     *
     * Headrest height position
     * Headrest height position
     *
     *
     * Sets the headrest height.
     * Sets the headrest height.
+1 −0
Original line number Original line Diff line number Diff line
@@ -155,6 +155,7 @@ enum VehicleProperty {
  SEAT_LUMBAR_SIDE_SUPPORT_POS = 356518803,
  SEAT_LUMBAR_SIDE_SUPPORT_POS = 356518803,
  SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 356518804,
  SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 356518804,
  SEAT_HEADREST_HEIGHT_POS = 289409941,
  SEAT_HEADREST_HEIGHT_POS = 289409941,
  SEAT_HEADREST_HEIGHT_POS_V2 = 356518820,
  SEAT_HEADREST_HEIGHT_MOVE = 356518806,
  SEAT_HEADREST_HEIGHT_MOVE = 356518806,
  SEAT_HEADREST_ANGLE_POS = 356518807,
  SEAT_HEADREST_ANGLE_POS = 356518807,
  SEAT_HEADREST_ANGLE_MOVE = 356518808,
  SEAT_HEADREST_ANGLE_MOVE = 356518808,
+24 −1
Original line number Original line Diff line number Diff line
@@ -1760,7 +1760,11 @@ enum VehicleProperty {
    SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 0x0B94 + 0x10000000 + 0x05000000
    SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 0x0B94 + 0x10000000 + 0x05000000
            + 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
            + 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
    /**
    /**
     * Headrest height position
     * (Deprecated) Headrest height position
     *
     * This property is deprecated because it is defined as type VehicleArea:GLOBAL, which means all
     * seats use the same value. Use SEAT_HEADREST_HEIGHT_POS_V2 instead which fixes this issue by
     * being defined as type VehicleArea:SEAT.
     *
     *
     * Sets the headrest height.
     * Sets the headrest height.
     * Max value indicates tallest setting.
     * Max value indicates tallest setting.
@@ -1771,6 +1775,25 @@ enum VehicleProperty {
     */
     */
    SEAT_HEADREST_HEIGHT_POS = 0x0B95 + 0x10000000 + 0x01000000
    SEAT_HEADREST_HEIGHT_POS = 0x0B95 + 0x10000000 + 0x01000000
            + 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32
            + 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32

    /**
     * Headrest height position
     *
     * Sets the headrest height for supported seats. VehiclePropConfig.areaConfigs specifies which
     * seats are supported.
     *
     * The maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. All values between
     * minInt32Value and maxInt32Value must be supported. The maxInt32Value indicates the tallest
     * setting and the minInt32Value indicates the shortest setting.
     *
     * This value is not in any particular unit but in a specified range of steps.
     *
     * @change_mode VehiclePropertyChangeMode.ON_CHANGE
     * @access VehiclePropertyAccess.READ_WRITE
     */
    SEAT_HEADREST_HEIGHT_POS_V2 =
            0x0BA4 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,

    /**
    /**
     * Headrest height move
     * Headrest height move
     *
     *
+1 −0
Original line number Original line Diff line number Diff line
@@ -155,6 +155,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_POS, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_POS, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_MOVE, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_MOVE, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_POS, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_POS, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_POS_V2, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_POS, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_POS, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyAccess::READ_WRITE},
+1 −0
Original line number Original line Diff line number Diff line
@@ -155,6 +155,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_POS, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_POS, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_POS, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_POS, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_POS_V2, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_POS, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_POS, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
Loading