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
This commit is contained in:
Aaqib Ismail
2022-12-15 15:32:18 -08:00
parent c19ec42e42
commit 4e6144c946
10 changed files with 77 additions and 1 deletions

View File

@@ -2117,6 +2117,12 @@ enum VehicleProperty : int32_t {
| 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
*
* Sets the headrest height.

View File

@@ -155,6 +155,7 @@ enum VehicleProperty {
SEAT_LUMBAR_SIDE_SUPPORT_POS = 356518803,
SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 356518804,
SEAT_HEADREST_HEIGHT_POS = 289409941,
SEAT_HEADREST_HEIGHT_POS_V2 = 356518820,
SEAT_HEADREST_HEIGHT_MOVE = 356518806,
SEAT_HEADREST_ANGLE_POS = 356518807,
SEAT_HEADREST_ANGLE_MOVE = 356518808,

View File

@@ -1760,7 +1760,11 @@ enum VehicleProperty {
SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 0x0B94 + 0x10000000 + 0x05000000
+ 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.
* Max value indicates tallest setting.
@@ -1771,6 +1775,25 @@ enum VehicleProperty {
*/
SEAT_HEADREST_HEIGHT_POS = 0x0B95 + 0x10000000 + 0x01000000
+ 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
*

View File

@@ -155,6 +155,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
{VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_POS, 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_V2, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_HEADREST_ANGLE_POS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyAccess::READ_WRITE},

View File

@@ -155,6 +155,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
{VehicleProperty::SEAT_LUMBAR_SIDE_SUPPORT_POS, 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_V2, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_HEADREST_ANGLE_POS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyChangeMode::ON_CHANGE},

View File

@@ -147,6 +147,7 @@ public final class AccessForVehicleProperty {
Map.entry(VehicleProperty.SEAT_LUMBAR_SIDE_SUPPORT_POS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_LUMBAR_SIDE_SUPPORT_MOVE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_HEADREST_HEIGHT_POS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_HEADREST_HEIGHT_POS_V2, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_HEADREST_ANGLE_POS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyAccess.READ_WRITE),

View File

@@ -147,6 +147,7 @@ public final class ChangeModeForVehicleProperty {
Map.entry(VehicleProperty.SEAT_LUMBAR_SIDE_SUPPORT_POS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_LUMBAR_SIDE_SUPPORT_MOVE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_HEADREST_HEIGHT_POS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_HEADREST_HEIGHT_POS_V2, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_HEADREST_HEIGHT_MOVE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_HEADREST_ANGLE_POS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.SEAT_HEADREST_ANGLE_MOVE, VehiclePropertyChangeMode.ON_CHANGE),

View File

@@ -860,6 +860,41 @@
}
]
},
{
"property": "VehicleProperty::SEAT_HEADREST_HEIGHT_POS_V2",
"defaultValue": {
"int32Values": [
0
]
},
"areas": [
{
"areaId": "Constants::SEAT_1_LEFT",
"minInt32Value": 0,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_2_LEFT",
"minInt32Value": 0,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_2_RIGHT",
"minInt32Value": 0,
"maxInt32Value": 10
},
{
"areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": 0,
"maxInt32Value": 10
}
]
},
{
"property": "VehicleProperty::SEAT_HEADREST_HEIGHT_MOVE",
"defaultValue": {

View File

@@ -559,6 +559,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyMirrorAutoTiltEnabledConfig) {
VehicleArea::MIRROR, VehiclePropertyType::BOOLEAN);
}
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatHeadrestHeightPosV2Config) {
verifyProperty(VehicleProperty::SEAT_HEADREST_HEIGHT_POS_V2, VehiclePropertyAccess::READ_WRITE,
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
VehicleArea::SEAT, VehiclePropertyType::INT32);
}
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatWalkInPosConfig) {
verifyProperty(VehicleProperty::SEAT_WALK_IN_POS, VehiclePropertyAccess::READ_WRITE,
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,

View File

@@ -932,5 +932,6 @@ b7ce2d87841585551b082fca6d099622e63b7099e0d8013f687ea1a1dc35c4dc android.hardwar
# ABI preserving changes to HALs during Android U
2aa559cda86c358c6429114ef6bc72c1b43281e98f9eb6b4df5e7073c8d05767 android.hardware.automotive.vehicle@2.0::types
42abd285a4293dadb8c89bc63b90cae2872fbffe90c4517aa3ea4965e8aecff7 android.hardware.graphics.common@1.2::types
4f1a02d21a22104c734f71cdbba19b6f7e93d4ee107ff79f0dbdd171a8430e0e android.hardware.automotive.vehicle@2.0::types
# There will be no more HIDL HALs. Use AIDL instead.