Merge changes Ib965ef40,Ibc1e8048,I97c6be43,I1503ab39,I89ad254e, ... into main
* changes:
Update doc for VEHICLE_SPEED_DISPLAY_UNITS.
Update doc for HVAC_FAN_DIRECTION.
Update doc for ELECTRONIC_STABILITY_CONTROL_STATE.
Update doc for EV_STOPPING_MODE.
Update doc for EV_BRAKE_REGENERATION_LEVEL.
Update doc for CURRENT_GEAR.
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 2539a7d..9bbeb9a 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
@@ -231,7 +231,7 @@
"VehicleGear"
],
"data_enum": "VehicleGear",
- "description": "Current gear. In non-manual case, selected gear may not match the current gear. For example, if the selected gear is GEAR_DRIVE, the current gear will be one of GEAR_1, GEAR_2 etc, which reflects the actual gear the transmission is currently running in.\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_1, GEAR_2,...} and for manual transmission the list must be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}. This list need not be the same as that of the supported gears reported in GEAR_SELECTION."
+ "description": "Current gear. In non-manual case, selected gear may not match the current gear. For example, if the selected gear is GEAR_DRIVE, the current gear will be one of GEAR_1, GEAR_2 etc, which reflects the actual gear the transmission is currently running in.\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 supported values list must represent the list of supported gears for this vehicle. For example, for an automatic transmission, this list can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_PARK, GEAR_1, GEAR_2,...} and for manual transmission the list can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}. This list need not be the same as that of the supported gears reported in GEAR_SELECTION.\nFor backward compatibility, config array for this property must be a list of values same as the supported values at boot-time."
},
{
"name": "Parking brake state.",
@@ -246,7 +246,7 @@
{
"name": "EV_BRAKE_REGENERATION_LEVEL",
"value": 289408012,
- "description": "Regenerative braking level of a electronic vehicle\nThe maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. All values between minInt32Value and maxInt32Value must be supported. The minInt32Value must be 0.\nThe maxInt32Value indicates the setting for the maximum amount of energy regenerated from braking. The minInt32Value indicates the setting for no regenerative braking.\nThis property is a more granular form of EV_REGENERATIVE_BRAKING_STATE. It allows the user to set a more specific level of regenerative braking if the states in EvRegenerativeBrakingState are not granular enough for the OEM.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "description": "Regenerative braking level of a electronic vehicle\n{@code HasSupportedValueInfo.hasMinSupportedValue} and {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true} for global area ID(0)\n{@code MinMaxSupportedValueResult.minSupportedValue} must be 0.\n{@code MinMaxSupportedValueResult.maxSupportedValue} indicates the setting for the maximum amount of energy regenerated from braking. The minSupportedValue indicates the setting for no regenerative braking.\nAll values between min and max supported value must be supported.\nFor backward compatibility, minInt32Value and maxInt32Value in {@code VehicleAreaConfig} must be set to the same as minSupportedValue and maxSupportedValue at boot time.\nThis property is a more granular form of EV_REGENERATIVE_BRAKING_STATE. It allows the user to set a more specific level of regenerative braking if the states in EvRegenerativeBrakingState are not granular enough for the OEM.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
},
{
"name": "Warning for fuel low level.",
@@ -293,7 +293,7 @@
"EvStoppingMode"
],
"data_enum": "EvStoppingMode",
- "description": "Represents property for the current stopping mode of the vehicle.\nFor the global area ID (0), the VehicleAreaConfig#supportedEnumValues must be defined unless all enum values of EvStoppingMode are supported.\nThe EvStoppingMode enum may be extended to include more states in the future.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "description": "Represents property for the current stopping mode of the vehicle.\nFor the global area ID (0), {@code getSupportedValuesList} must return a {@code SupportedValuesListResult} that contains supported values unless all enum values of EvStoppingMode are supported.\nFor backward compatibility, if {@code SupportedValuesListResult} is defined, {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values.\nThe EvStoppingMode enum may be extended to include more states in the future.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
},
{
"name": "ELECTRONIC_STABILITY_CONTROL_ENABLED",
@@ -308,7 +308,7 @@
"ErrorState"
],
"data_enum": "ElectronicStabilityControlState",
- "description": "Electronic Stability Control (ESC) state.\nReturns the current state of ESC. This property must always return a valid state defined in ElectronicStabilityControlState or ErrorState. It must not surface errors through StatusCode and must use the supported error states instead.\nFor the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined unless all states of both ElectronicStabilityControlState (including OTHER, which is not recommended) and ErrorState are supported."
+ "description": "Electronic Stability Control (ESC) state.\nReturns the current state of ESC. This property must always return a valid state defined in ElectronicStabilityControlState or ErrorState. It must not surface errors through StatusCode and must use the supported error states instead.\nFor the global area ID (0), {@code getSupportedValuesList} must return a {@code SupportedValuesListResult} that contains supported values unless all states of both ElectronicStabilityControlState (including OTHER, which is not recommended) and ErrorState are supported.\nFor backward compatibility, if {@code SupportedValuesListResult} is defined, {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values."
},
{
"name": "Fan speed setting",
@@ -322,7 +322,7 @@
"VehicleHvacFanDirection"
],
"data_enum": "VehicleHvacFanDirection",
- "description": "Fan direction setting\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "description": "Fan direction setting\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only.\nThe supported hvac fan direction is exposed through {@code HVAC_FAN_DIRECTION_AVAILABLE} property. Caller should not call {@code getSupportedValuesList}, or use {@code VehicleAreaConfig#supportedEnumValues}."
},
{
"name": "HVAC current temperature.",
@@ -476,7 +476,11 @@
{
"name": "Speed units for display",
"value": 289408517,
- "description": "Speed units for display\nIndicates type of units the car is using to display speed to user. Eg. m\/s, km\/h, or mph.\nVehiclePropConfig.configArray is used to indicate the supported speed display units. Pressure units are defined in VehicleUnit. For example: configArray[0] = METER_PER_SEC configArray[1] = MILES_PER_HOUR configArray[2] = KILOMETERS_PER_HOUR\nIf updating VEHICLE_SPEED_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties, then their values must be updated and communicated to the AAOS framework as well.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "data_enums": [
+ "VehicleUnit"
+ ],
+ "data_enum": "VehicleUnit",
+ "description": "Speed units for display\nIndicates type of units the car is using to display speed to user. Eg. m\/s, km\/h, or mph.\n{@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID (0) must be {@code true}.\n{@code getSupportedValuesLists} for [VEHICLE_SPEED_DISPLAY_UNITS, areaId=0] must return a {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList}, e.g. [METER_PER_SEC, MILES_PER_HOUR, KILOMETERS_PER_HOUR].\nFor backward compatibility, config array for this property must contain the same values as supported values at boot time. For example: configArray[0] = METER_PER_SEC configArray[1] = MILES_PER_HOUR configArray[2] = KILOMETERS_PER_HOUR\nIf updating VEHICLE_SPEED_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties, then their values must be updated and communicated to the AAOS framework as well.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
},
{
"name": "EXTERNAL_CAR_TIME",
diff --git a/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java
index 0f86bfa..24cc75b 100644
--- a/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java
@@ -51,6 +51,7 @@
Map.entry(VehicleProperty.FUEL_VOLUME_DISPLAY_UNITS, List.of(VehicleUnit.class)),
Map.entry(VehicleProperty.TIRE_PRESSURE_DISPLAY_UNITS, List.of(VehicleUnit.class)),
Map.entry(VehicleProperty.EV_BATTERY_DISPLAY_UNITS, List.of(VehicleUnit.class)),
+ Map.entry(VehicleProperty.VEHICLE_SPEED_DISPLAY_UNITS, List.of(VehicleUnit.class)),
Map.entry(VehicleProperty.HW_ROTARY_INPUT, List.of(RotaryInputType.class)),
Map.entry(VehicleProperty.HW_CUSTOM_INPUT, List.of(CustomInputType.class)),
Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_STATE, List.of(VehicleLightState.class)),
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 aefd08f..e854ecc 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -653,16 +653,27 @@
* the current gear will be one of GEAR_1, GEAR_2 etc, which reflects
* the actual gear the transmission is currently running in.
*
- * 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_1, GEAR_2,...}
- * and for manual transmission the list must be
+ * {@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 supported values list must represent the list of supported gears
+ * for this vehicle. For example, for an automatic transmission, this list can be
+ * {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_PARK, GEAR_1, GEAR_2,...}
+ * and for manual transmission the list can be
* {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}. This list need not be the
* same as that of the supported gears reported in GEAR_SELECTION.
*
+ * 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
*/
CURRENT_GEAR = 0x0401 + 0x10000000 + 0x01000000
@@ -700,11 +711,19 @@
/**
* Regenerative braking level of a electronic vehicle
*
- * The maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. All values between
- * minInt32Value and maxInt32Value must be supported. The minInt32Value must be 0.
+ * {@code HasSupportedValueInfo.hasMinSupportedValue} and
+ * {@code HasSupportedValueInfo.hasMaxSupportedValue} must be {@code true} for global area ID(0)
*
- * The maxInt32Value indicates the setting for the maximum amount of energy regenerated from
- * braking. The minInt32Value indicates the setting for no regenerative braking.
+ * {@code MinMaxSupportedValueResult.minSupportedValue} must be 0.
+ *
+ * {@code MinMaxSupportedValueResult.maxSupportedValue} indicates the setting for the maximum
+ * amount of energy regenerated from braking. The minSupportedValue indicates the setting for no
+ * regenerative braking.
+ *
+ * All values between min and max supported value must be supported.
+ *
+ * For backward compatibility, minInt32Value and maxInt32Value in {@code VehicleAreaConfig}
+ * must be set to the same as minSupportedValue and maxSupportedValue at boot time.
*
* This property is a more granular form of EV_REGENERATIVE_BRAKING_STATE. It allows the user to
* set a more specific level of regenerative braking if the states in EvRegenerativeBrakingState
@@ -716,6 +735,7 @@
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @access VehiclePropertyAccess.READ
+ * @require_min_max_supported_value
* @version 2
*/
EV_BRAKE_REGENERATION_LEVEL =
@@ -801,8 +821,12 @@
/**
* Represents property for the current stopping mode of the vehicle.
*
- * For the global area ID (0), the VehicleAreaConfig#supportedEnumValues must be defined unless
- * all enum values of EvStoppingMode are supported.
+ * For the global area ID (0), {@code getSupportedValuesList}
+ * must return a {@code SupportedValuesListResult} that contains supported values unless all
+ * enum values of EvStoppingMode are supported.
+ *
+ * For backward compatibility, if {@code SupportedValuesListResult} is defined,
+ * {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values.
*
* The EvStoppingMode enum may be extended to include more states in the future.
*
@@ -846,10 +870,14 @@
* ElectronicStabilityControlState or ErrorState. It must not surface errors through StatusCode
* and must use the supported error states instead.
*
- * For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined
- * unless all states of both ElectronicStabilityControlState (including OTHER, which is not
+ * For the global area ID (0), {@code getSupportedValuesList}
+ * must return a {@code SupportedValuesListResult} that contains supported values unless all
+ * states of both ElectronicStabilityControlState (including OTHER, which is not
* recommended) and ErrorState 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
* @data_enum ElectronicStabilityControlState
@@ -931,6 +959,10 @@
* This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
* implement it as VehiclePropertyAccess.READ only.
*
+ * The supported hvac fan direction is exposed through {@code HVAC_FAN_DIRECTION_AVAILABLE}
+ * property. Caller should not call {@code getSupportedValuesList}, or use
+ * {@code VehicleAreaConfig#supportedEnumValues}.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @access VehiclePropertyAccess.READ
@@ -1571,8 +1603,15 @@
*
* Indicates type of units the car is using to display speed to user. Eg. m/s, km/h, or mph.
*
- * VehiclePropConfig.configArray is used to indicate the supported speed display units.
- * Pressure units are defined in VehicleUnit.
+ * {@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID
+ * (0) must be {@code true}.
+ *
+ * {@code getSupportedValuesLists} for [VEHICLE_SPEED_DISPLAY_UNITS, areaId=0] must return a
+ * {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList},
+ * e.g. [METER_PER_SEC, MILES_PER_HOUR, KILOMETERS_PER_HOUR].
+ *
+ * For backward compatibility, config array for this property must contain the same values as
+ * supported values at boot time.
* For example: configArray[0] = METER_PER_SEC
* configArray[1] = MILES_PER_HOUR
* configArray[2] = KILOMETERS_PER_HOUR
@@ -1586,6 +1625,9 @@
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @access VehiclePropertyAccess.READ
+ * @data_enum VehicleUnit
+ * @require_supported_values_list
+ * @legacy_supported_values_in_config
* @version 2
*/
VEHICLE_SPEED_DISPLAY_UNITS = 0x0605 + 0x10000000 + 0x01000000