Update doc for DISTANCE_DISPLAY_UNITS.
Part of a large doc update. Add doc for new supported value range
APIs. For be backward compatible with older VHAL clients still
using deprecated fields, we still require the old fields to be
populated.
Test: None
Bug: 383184445
Flag: EXEMPT no code change
Change-Id: I5806c09ab5062e9605c5881c4ff2e59e308949e1
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 7740ef8..23fd6e5 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
@@ -511,7 +511,7 @@
"VehicleUnit"
],
"data_enum": "VehicleUnit",
- "description": "Distance units for display\nIndicates which units the car is using to display distances to the user. Eg. Mile, Meter Kilometer.\nDistance units are defined in VehicleUnit. VehiclePropConfig.configArray is used to indicate the supported distance display units. For example: configArray[0] = METER configArray[1] = KILOMETER configArray[2] = MILE\nIf updating DISTANCE_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."
+ "description": "Distance units for display\nIndicates which units the car is using to display distances to the user. Eg. Mile, Meter Kilometer.\nDistance units are defined in VehicleUnit. VehiclePropConfig.configArray is used to indicate the supported distance display units. For example: configArray[0] = METER configArray[1] = KILOMETER configArray[2] = MILE\nIf {@code HasSupportedValueInfo} is not {@code null} for the global area ID (0): {@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID (0) must be {@code true}. {@code getSupportedValuesLists} for [DISTANCE_DISPLAY_UNITS, areaId=0] must returns a {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList}, e.g. [METER, KILOMETER, MILE]. At boot, the values in the config array are equal to the supported values list.\nIf updating DISTANCE_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": "Fuel volume units for display",
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 3558f0f..62c694c 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -1847,6 +1847,14 @@
* configArray[1] = KILOMETER
* configArray[2] = MILE
*
+ * If {@code HasSupportedValueInfo} is not {@code null} for the global area ID (0):
+ * {@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID
+ * (0) must be {@code true}.
+ * {@code getSupportedValuesLists} for [DISTANCE_DISPLAY_UNITS, areaId=0] must returns a
+ * {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList},
+ * e.g. [METER, KILOMETER, MILE].
+ * At boot, the values in the config array are equal to the supported values list.
+ *
* If updating DISTANCE_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties,
* then their values must be updated and communicated to the AAOS framework as well.
*
@@ -1857,6 +1865,8 @@
* @access VehiclePropertyAccess.READ_WRITE
* @access VehiclePropertyAccess.READ
* @data_enum VehicleUnit
+ * @require_supported_values_list
+ * @legacy_supported_values_in_config
* @version 2
*/
DISTANCE_DISPLAY_UNITS = 0x0600 + 0x10000000 + 0x01000000