Merge changes I4cbf7352,I8f8ee67b,I784a8fd1 into main
* changes:
Update doc for GEAR_SELECTION.
Update doc for IMPACT_DETECTED.
Update doc for TIRE_PRESSURE.
diff --git a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
index 8ef440d..2539a7d 100644
--- a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
+++ b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
@@ -194,7 +194,7 @@
{
"name": "Tire pressure",
"value": 392168201,
- "description": "Tire pressure\nEach tires is identified by its areaConfig.areaId config and their minFloatValue\/maxFloatValue are used to store OEM recommended pressure range. The minFloatValue and maxFloatValue in VehicleAreaConfig must be defined. The minFloatValue in the areaConfig data represents the lower bound of the recommended tire pressure. The maxFloatValue in the areaConfig data represents the upper bound of the recommended tire pressure. For example: The following areaConfig indicates the recommended tire pressure of left_front tire is from 200.0 KILOPASCAL to 240.0 KILOPASCAL. .areaConfigs = { VehicleAreaConfig { .areaId = VehicleAreaWheel::LEFT_FRONT, .minFloatValue = 200.0, .maxFloatValue = 240.0, } },"
+ "description": "Tire pressure\n{@code HasSupportedValueInfo.hasMinSupportedValue} and {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true} for all areas.\n{@code MinMaxSupportedValueResult.minSupportedValue} represents the lower bound of the recommended tire pressure for the tire at the specified area ID.\n{@code MinMaxSupportedValueResult.maxSupportedValue} represents the upper bound of the recommended tire pressure for the tire at the specified area ID.\nFor example, if the recommended tire pressure of left_front tire is from 200.0 KILOPASCAL to 240.0 KILOPASCAL, {@code getMinMaxSupportedValue} for [propId=TIRE_PRESSURE, areaId=VehicleAreaWheel::LEFT_FRONT] must return a {@code MinMaxSupportedValueResult} with OK status, 200.0 as minSupportedValue, 240.0 as maxSupportedValue.\nFor backward compatibility, minFloatValue and maxFloatValue in {@code VehicleAreaConfig} must be set to the same as minSupportedValue and maxSupportedValue at boot time.\nEach tire is identified by its areaConfig.areaId config.\nFor example: .areaConfigs = { VehicleAreaConfig { .areaId = VehicleAreaWheel::LEFT_FRONT, .minFloatValue = 200.0, .maxFloatValue = 240.0, } },"
},
{
"name": "Critically low tire pressure",
@@ -213,7 +213,7 @@
"ImpactSensorLocation"
],
"data_enum": "ImpactSensorLocation",
- "description": "Impact detected.\nBit flag property to relay information on whether an impact has occurred on a particular side of the vehicle as described through the ImpactSensorLocation enum. As a bit flag property, this property can be set to multiple ORed together values of the enum when necessary.\nFor the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined unless all bit flags of ImpactSensorLocation are supported."
+ "description": "Impact detected.\nBit flag property to relay information on whether an impact has occurred on a particular side of the vehicle as described through the ImpactSensorLocation enum. As a bit flag property, this property can be set to multiple ORed together values of the enum when necessary.\nFor the global area ID (0), {@code getSupportedValuesList} must return a {@code SupportedValuesListResult} that contains supported values unless all bit flags of ImpactSensorLocation are supported.\nFor backward compatibility, if {@code SupportedValuesListResult} is defined, {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values."
},
{
"name": "Currently selected gear",
@@ -222,7 +222,7 @@
"VehicleGear"
],
"data_enum": "VehicleGear",
- "description": "Currently selected gear\nThis is the gear selected by the user.\nValues in the config data must represent the list of supported gears for this vehicle. For example, config data for an automatic transmission must contain {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_PARK, GEAR_DRIVE, GEAR_1, GEAR_2,...} and for manual transmission the list must be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}\nIn the case of an automatic transmission vehicle that allows the driver to select specific gears on demand (i.e. \"manual mode\"), GEAR_SELECTION's value must be set to the specific gear selected by the driver instead of simply GEAR_DRIVE."
+ "description": "Currently selected gear\nThis is the gear selected by the user.\n{@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID (0) must be {@code true}.\n{@code getSupportedValuesList} for [GEAR_SELECTION, areaId=0] must return a {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList}.\nThe supportedValues must represent the list of supported gears for this vehicle. For example, for an automatic transmission, the list can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_PARK, GEAR_DRIVE, GEAR_1, GEAR_2,...} and for manual transmission it can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}.\nIn the case of an automatic transmission vehicle that allows the driver to select specific gears on demand (i.e. \"manual mode\"), GEAR_SELECTION's value must be set to the specific gear selected by the driver instead of simply GEAR_DRIVE.\nFor backward compatibility, config array for this property must be a list of values same as the supported values at boot-time."
},
{
"name": "CURRENT_GEAR",
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index e5c09b0..aefd08f 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -525,16 +525,27 @@
/**
* Tire pressure
*
- * Each tires is identified by its areaConfig.areaId config and their
- * minFloatValue/maxFloatValue are used to store OEM recommended pressure
- * range. The minFloatValue and maxFloatValue in VehicleAreaConfig must be defined.
- * The minFloatValue in the areaConfig data represents the lower bound of
- * the recommended tire pressure.
- * The maxFloatValue in the areaConfig data represents the upper bound of
- * the recommended tire pressure.
+ * {@code HasSupportedValueInfo.hasMinSupportedValue} and
+ * {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true} for all areas.
+ *
+ * {@code MinMaxSupportedValueResult.minSupportedValue} represents the lower bound of the
+ * recommended tire pressure for the tire at the specified area ID.
+ *
+ * {@code MinMaxSupportedValueResult.maxSupportedValue} represents the upper bound of the
+ * recommended tire pressure for the tire at the specified area ID.
+ *
+ * For example, if the recommended tire pressure of left_front tire is from 200.0 KILOPASCAL to
+ * 240.0 KILOPASCAL, {@code getMinMaxSupportedValue} for
+ * [propId=TIRE_PRESSURE, areaId=VehicleAreaWheel::LEFT_FRONT] must return a
+ * {@code MinMaxSupportedValueResult} with OK status, 200.0 as minSupportedValue, 240.0 as
+ * maxSupportedValue.
+ *
+ * For backward compatibility, minFloatValue and maxFloatValue in {@code VehicleAreaConfig}
+ * must be set to the same as minSupportedValue and maxSupportedValue at boot time.
+ *
+ * Each tire is identified by its areaConfig.areaId config.
+ *
* For example:
- * The following areaConfig indicates the recommended tire pressure
- * of left_front tire is from 200.0 KILOPASCAL to 240.0 KILOPASCAL.
* .areaConfigs = {
* VehicleAreaConfig {
* .areaId = VehicleAreaWheel::LEFT_FRONT,
@@ -545,6 +556,7 @@
*
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ
+ * @require_min_max_supported_value
* @unit VehicleUnit.KILOPASCAL
* @version 2
*/
@@ -589,8 +601,12 @@
* of the vehicle as described through the ImpactSensorLocation enum. As a bit flag property,
* this property can be set to multiple ORed together values of the enum when necessary.
*
- * For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined
- * unless all bit flags of ImpactSensorLocation are supported.
+ * For the global area ID (0), {@code getSupportedValuesList}
+ * must return a {@code SupportedValuesListResult} that contains supported values unless all bit
+ * flags of ImpactSensorLocation are supported.
+ *
+ * For backward compatibility, if {@code SupportedValuesListResult} is defined,
+ * {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ
@@ -604,18 +620,29 @@
*
* This is the gear selected by the user.
*
- * Values in the config data must represent the list of supported gears for this vehicle. For
- * example, config data for an automatic transmission must contain {GEAR_NEUTRAL, GEAR_REVERSE,
- * GEAR_PARK, GEAR_DRIVE, GEAR_1, GEAR_2,...} and for manual transmission the list must be
- * {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}
+ * {@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID
+ * (0) must be {@code true}.
+ *
+ * {@code getSupportedValuesList} for [GEAR_SELECTION, areaId=0] must return a
+ * {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList}.
+ *
+ * The supportedValues must represent the list of supported gears for this vehicle. For example,
+ * for an automatic transmission, the list can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_PARK,
+ * GEAR_DRIVE, GEAR_1, GEAR_2,...} and for manual transmission it can be {GEAR_NEUTRAL,
+ * GEAR_REVERSE, GEAR_1, GEAR_2,...}.
*
* In the case of an automatic transmission vehicle that allows the driver to select specific
* gears on demand (i.e. "manual mode"), GEAR_SELECTION's value must be set to the specific gear
* selected by the driver instead of simply GEAR_DRIVE.
*
+ * For backward compatibility, config array for this property must be a list of values
+ * same as the supported values at boot-time.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ
* @data_enum VehicleGear
+ * @require_supported_values_list
+ * @legacy_supported_values_in_config
* @version 2
*/
GEAR_SELECTION = 0x0400 + 0x10000000 + 0x01000000