diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal index 9e4f252342..83b0d94a6b 100644 --- a/automotive/vehicle/2.0/types.hal +++ b/automotive/vehicle/2.0/types.hal @@ -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. diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehicleProperty.aidl index c3b3e003a8..f1c962991b 100644 --- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehicleProperty.aidl +++ b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehicleProperty.aidl @@ -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, diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleProperty.aidl index 4d0b77bb38..72e11b1065 100644 --- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleProperty.aidl +++ b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleProperty.aidl @@ -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 * diff --git a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h index 75b371f9d3..c352d8cd4b 100644 --- a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h +++ b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h @@ -155,6 +155,7 @@ std::unordered_map 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}, diff --git a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h index 6e797b91df..d9efa6a226 100644 --- a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h +++ b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h @@ -155,6 +155,7 @@ std::unordered_map 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}, diff --git a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java index 455d3d453f..0f33b1ee48 100644 --- a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java +++ b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java @@ -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), diff --git a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java index aaa344f6bd..00b73cac6e 100644 --- a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java +++ b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java @@ -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), diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json index 0b1634ce4d..2997e32666 100644 --- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json +++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json @@ -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": { diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp index 5595afe4ab..dffcae5d87 100644 --- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp +++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp @@ -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, diff --git a/current.txt b/current.txt index 0fb8b49992..fbdd3fe648 100644 --- a/current.txt +++ b/current.txt @@ -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.