From 9d24f979a95f783ab37e783c827bb27367563eb4 Mon Sep 17 00:00:00 2001 From: shrikar Date: Fri, 10 May 2024 17:59:58 -0700 Subject: [PATCH 1/2] Added supportedEnums logic description to enum files Bug: 332324441 Test: presubmit Change-Id: Ifd7ddacf53cf0b0b1dbbc9a6fad8e8ade578c280 --- .../automotive/vehicle/AutomaticEmergencyBrakingState.aidl | 3 +++ .../hardware/automotive/vehicle/BlindSpotWarningState.aidl | 3 +++ .../vehicle/CrossTrafficMonitoringWarningState.aidl | 3 +++ .../hardware/automotive/vehicle/CruiseControlCommand.aidl | 3 +++ .../hardware/automotive/vehicle/CruiseControlState.aidl | 3 +++ .../hardware/automotive/vehicle/CruiseControlType.aidl | 3 +++ .../hardware/automotive/vehicle/DriverDistractionState.aidl | 3 +++ .../automotive/vehicle/DriverDistractionWarning.aidl | 3 +++ .../automotive/vehicle/DriverDrowsinessAttentionState.aidl | 3 +++ .../vehicle/DriverDrowsinessAttentionWarning.aidl | 3 +++ .../automotive/vehicle/ElectronicStabilityControlState.aidl | 3 +++ .../vehicle/ElectronicTollCollectionCardStatus.aidl | 3 +++ .../vehicle/ElectronicTollCollectionCardType.aidl | 3 +++ .../automotive/vehicle/EmergencyLaneKeepAssistState.aidl | 3 +++ .../android/hardware/automotive/vehicle/ErrorState.aidl | 3 +++ .../android/hardware/automotive/vehicle/EvChargeState.aidl | 3 +++ .../automotive/vehicle/EvRegenerativeBrakingState.aidl | 3 +++ .../android/hardware/automotive/vehicle/EvStoppingMode.aidl | 3 +++ .../automotive/vehicle/ForwardCollisionWarningState.aidl | 3 +++ .../automotive/vehicle/HandsOnDetectionDriverState.aidl | 3 +++ .../automotive/vehicle/HandsOnDetectionWarning.aidl | 3 +++ .../hardware/automotive/vehicle/ImpactSensorLocation.aidl | 3 +++ .../automotive/vehicle/LaneCenteringAssistCommand.aidl | 3 +++ .../automotive/vehicle/LaneCenteringAssistState.aidl | 3 +++ .../automotive/vehicle/LaneDepartureWarningState.aidl | 3 +++ .../hardware/automotive/vehicle/LaneKeepAssistState.aidl | 3 +++ .../vehicle/LowSpeedAutomaticEmergencyBrakingState.aidl | 3 +++ .../automotive/vehicle/LowSpeedCollisionWarningState.aidl | 3 +++ .../android/hardware/automotive/vehicle/TrailerState.aidl | 3 +++ .../hardware/automotive/vehicle/VehicleAirbagLocation.aidl | 3 +++ .../hardware/automotive/vehicle/VehicleAutonomousState.aidl | 3 +++ .../android/hardware/automotive/vehicle/VehicleGear.aidl | 3 +++ .../automotive/vehicle/VehicleHvacFanDirection.aidl | 3 +++ .../hardware/automotive/vehicle/VehicleIgnitionState.aidl | 6 ++++++ .../hardware/automotive/vehicle/VehicleLightState.aidl | 3 +++ .../hardware/automotive/vehicle/VehicleLightSwitch.aidl | 3 +++ .../hardware/automotive/vehicle/VehicleOilLevel.aidl | 3 +++ .../automotive/vehicle/VehicleSeatOccupancyState.aidl | 3 +++ .../hardware/automotive/vehicle/WindshieldWipersState.aidl | 3 +++ .../hardware/automotive/vehicle/WindshieldWipersSwitch.aidl | 3 +++ 40 files changed, 123 insertions(+) diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/AutomaticEmergencyBrakingState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/AutomaticEmergencyBrakingState.aidl index 540c6633a3..1421f89105 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/AutomaticEmergencyBrakingState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/AutomaticEmergencyBrakingState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Automatic Emergency Braking (AEB). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/BlindSpotWarningState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/BlindSpotWarningState.aidl index 3f567c0dce..3c85f295e8 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/BlindSpotWarningState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/BlindSpotWarningState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Blind Spot Warning State (BSW). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CrossTrafficMonitoringWarningState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CrossTrafficMonitoringWarningState.aidl index 05be65d5cb..85428b1e53 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CrossTrafficMonitoringWarningState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CrossTrafficMonitoringWarningState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Cross Traffic Monitoring Warning system. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlCommand.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlCommand.aidl index 18e140506d..ab745cea82 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlCommand.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlCommand.aidl @@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle; * Used to enumerate the Cruise Control (CC) commands. * * This enum could be extended in future releases to include additional feature states. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlState.aidl index 0e55e00948..b410e41461 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlState.aidl @@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle; * Used to enumerate the current state of Cruise Control (CC). * * This enum could be extended in future releases to include additional feature states. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlType.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlType.aidl index 2367b828db..ebae16dc31 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlType.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CruiseControlType.aidl @@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle; * Used to enumerate the current type of Cruise Control (CC). * * This enum could be extended in future releases to include additional feature states. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionState.aidl index f350a6c41d..d03431d93c 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionState.aidl @@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle; * Used to enumerate the current state of driver distraction monitoring. * * This enum could be extended in future releases to include additional feature states. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionWarning.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionWarning.aidl index a4b1984a58..e145be2b19 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionWarning.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDistractionWarning.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current warning state of the driver distraction monitoring system. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionState.aidl index d2aec1ffc6..f94479b8cd 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionState.aidl @@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle; * Used to enumerate the current state of driver drowsiness and attention monitoring. * * This enum could be extended in future releases to include additional feature states. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionWarning.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionWarning.aidl index 53b66b9e50..efa12a4311 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionWarning.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverDrowsinessAttentionWarning.aidl @@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current warning state of the driver drowsiness and attention monitoring * system. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicStabilityControlState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicStabilityControlState.aidl index 006bbf2e70..bc9148a321 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicStabilityControlState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicStabilityControlState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Electronic Stability Control (ESC). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardStatus.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardStatus.aidl index 94209ba150..ce4def189f 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardStatus.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardStatus.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used by ELECTRONIC_TOLL_COLLECTION_CARD_STATUS. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardType.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardType.aidl index 46c5f4839b..0be981c38c 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardType.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ElectronicTollCollectionCardType.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used by ELECTRONIC_TOLL_COLLECTION_CARD_TYPE. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EmergencyLaneKeepAssistState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EmergencyLaneKeepAssistState.aidl index 302b9aff4b..bbc8d3b8fa 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EmergencyLaneKeepAssistState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EmergencyLaneKeepAssistState.aidl @@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle; * Used by emergency lane keep assist to enumerate state. * * This enum could be extended in future releases to include additional feature states. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ErrorState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ErrorState.aidl index ba44672976..5b13ec9ee7 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ErrorState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ErrorState.aidl @@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the possible error states. For version 2 of this interface, ErrorState is used * by ADAS STATE properties, but its use may be expanded in future releases. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvChargeState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvChargeState.aidl index e095fc4959..ec533e1549 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvChargeState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvChargeState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used by EV charging properties to enumerate the current state of the battery charging. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvRegenerativeBrakingState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvRegenerativeBrakingState.aidl index 438228719a..15372f7aa1 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvRegenerativeBrakingState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvRegenerativeBrakingState.aidl @@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle; /** * Used by the regenerative braking property to enumerate the current state * of the regenerative braking. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvStoppingMode.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvStoppingMode.aidl index 8c5ac46c4e..c82b8a8a64 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvStoppingMode.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvStoppingMode.aidl @@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle; * Used by EV_STOPPING_MODE to enumerate the current state of the stopping mode. * * This enum may be extended to include more states in the future. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ForwardCollisionWarningState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ForwardCollisionWarningState.aidl index b20cf259d2..69dce897cb 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ForwardCollisionWarningState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ForwardCollisionWarningState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Forward Collision Warning State (FCW). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionDriverState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionDriverState.aidl index 4a36999ecb..c9f9322cc2 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionDriverState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionDriverState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current driver state of Hands On Detection (HOD). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionWarning.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionWarning.aidl index c1a58ce609..dd6a78f7e9 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionWarning.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/HandsOnDetectionWarning.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current warning state of Hands On Detection (HOD). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ImpactSensorLocation.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ImpactSensorLocation.aidl index 0fc1a50a83..b0a6a60fc0 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ImpactSensorLocation.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/ImpactSensorLocation.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the various impact sensor locations on the car. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistCommand.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistCommand.aidl index d8b0e65857..bf8a6dfa77 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistCommand.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistCommand.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used by Lane Centering Assist (LCA) to enumerate commands. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistState.aidl index 340a669d2d..eb8e9c8b6b 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneCenteringAssistState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Lane Centering Assist (LCA). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneDepartureWarningState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneDepartureWarningState.aidl index c12c5765ad..21eeaa52e8 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneDepartureWarningState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneDepartureWarningState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Lane Departure Warning (LDW). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneKeepAssistState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneKeepAssistState.aidl index c1c15a0e93..8c770869c9 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneKeepAssistState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LaneKeepAssistState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Lane Keep Assist (LKA). + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedAutomaticEmergencyBrakingState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedAutomaticEmergencyBrakingState.aidl index 978da25d15..c2cb51a04d 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedAutomaticEmergencyBrakingState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedAutomaticEmergencyBrakingState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Low Speed Automatic Emergency Braking. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedCollisionWarningState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedCollisionWarningState.aidl index 028a2d9e40..fd410d8c05 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedCollisionWarningState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LowSpeedCollisionWarningState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the state of Low Speed Collision Warning State. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/TrailerState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/TrailerState.aidl index ef653746c2..d31fb257b2 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/TrailerState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/TrailerState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current state of VehicleProperty#TRAILER_PRESENT. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAirbagLocation.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAirbagLocation.aidl index e4c43f7992..a029ed8ccf 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAirbagLocation.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAirbagLocation.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the various airbag locations per seat. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAutonomousState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAutonomousState.aidl index 3860e7f222..4a48e97df8 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAutonomousState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAutonomousState.aidl @@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the various level of automation that can be expressed by the * VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL property. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleGear.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleGear.aidl index 40e492eca6..2fd94c7f07 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleGear.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleGear.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Various gears which can be selected by user and chosen in system. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl index f5b77dea10..dc1379d95e 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Bit flags for fan direction + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleIgnitionState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleIgnitionState.aidl index 2338008d59..bcdc3ebb39 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleIgnitionState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleIgnitionState.aidl @@ -16,6 +16,12 @@ package android.hardware.automotive.vehicle; +/** + * Used to enumerate the different states the ignition of the vehicle can be in. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. + */ @VintfStability @Backing(type="int") enum VehicleIgnitionState { diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightState.aidl index ede20b7967..e7ed13cb0c 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightState.aidl @@ -21,6 +21,9 @@ package android.hardware.automotive.vehicle; * * Most XXX_LIGHTS_STATE properties will only report ON and OFF states. Only * the HEADLIGHTS_STATE property will report DAYTIME_RUNNING. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightSwitch.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightSwitch.aidl index 247e731206..d147404f10 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightSwitch.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleLightSwitch.aidl @@ -22,6 +22,9 @@ package android.hardware.automotive.vehicle; * XXX_LIGHTS_SWITCH properties report the switch settings that the user * selects. The switch setting may be decoupled from the state reported if the * user selects AUTOMATIC. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleOilLevel.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleOilLevel.aidl index 3c722bad8e..acc4201db1 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleOilLevel.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleOilLevel.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current level of VehicleProperty#ENGINE_OIL_LEVEL. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleSeatOccupancyState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleSeatOccupancyState.aidl index 3a08a51492..266d3f91b5 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleSeatOccupancyState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleSeatOccupancyState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used by seat occupancy to enumerate the current occupancy state of the seat. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersState.aidl index 820fcc8659..953a80dbdc 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersState.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersState.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current state of VehicleProperty#WINDSHIELD_WIPERS_STATE. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersSwitch.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersSwitch.aidl index 911d7ebfa5..4ef16b52c3 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersSwitch.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/WindshieldWipersSwitch.aidl @@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle; /** * Used to enumerate the current position of VehicleProperty#WINDSHIELD_WIPERS_SWITCH. + * + * Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a + * subset of the enums that are defined here. */ @VintfStability @Backing(type="int") From 3beaf4faca83ce44728b1389b621b67c1e89238d Mon Sep 17 00:00:00 2001 From: lichen yu Date: Thu, 6 Jun 2024 03:40:43 +0000 Subject: [PATCH 2/2] Fix VtsHalSensorsV2_0TargetTest During VTS testing, when many sensors are quickly enabled, the load on the Sensorhub side will be too heavy, and then continue to send sensor enable instructions and Sensor Flush instructions. These instructions sent by the Kernel driver to the Sensorhub through inter-core communication cannot be responded to in a timely manner. After the Kernel side judges the timeout, it will determine that the enable fails; after the enable fails, it cannot continue to test the flush or return the expected flush data. ten sensors is tested as a group Bug: 339763843 Test: run vts -m VtsHalSensorsV2_0TargetTest (cherry picked from https://android-review.googlesource.com/q/commit:09952885e441bcf0d8f0bf0834ff46608b07e0d0) Change-Id: I6f6d36d1e3c98b85b412189c3f97163c0945a7ab --- .../vts/2_X/VtsHalSensorsV2_XTargetTest.h | 71 +++++++++++-------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h index becc93ce3e..51879b2263 100644 --- a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h +++ b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h @@ -603,42 +603,55 @@ void SensorsHidlTest::runFlushTest(const std::vector& sensors, b EventCallback callback; getEnvironment()->registerCallback(&callback); - for (const SensorInfoType& sensor : sensors) { - // Configure and activate the sensor - batch(sensor.sensorHandle, sensor.maxDelay, 0 /* maxReportLatencyNs */); - activate(sensor.sensorHandle, activateSensor); + // 10 sensors per group + constexpr size_t kSensorsPerGroup = 10; + for (size_t sensorOffset = 0; sensorOffset < sensors.size(); + sensorOffset += kSensorsPerGroup) { + std::vector sensorGroup( + sensors.begin() + sensorOffset, + sensors.begin() + + std::min(sensorOffset + kSensorsPerGroup, sensors.size())); - // Flush the sensor - for (int32_t i = 0; i < flushCalls; i++) { + for (const SensorInfoType& sensor : sensorGroup) { + // Configure and activate the sensor + batch(sensor.sensorHandle, sensor.maxDelay, 0 /* maxReportLatencyNs */); + activate(sensor.sensorHandle, activateSensor); + + // Flush the sensor + for (int32_t i = 0; i < flushCalls; i++) { + SCOPED_TRACE(::testing::Message() + << "Flush " << i << "/" << flushCalls << ": " + << " handle=0x" << std::hex << std::setw(8) << std::setfill('0') + << sensor.sensorHandle << std::dec + << " type=" << static_cast(sensor.type) + << " name=" << sensor.name); + + Result flushResult = flush(sensor.sensorHandle); + EXPECT_EQ(flushResult, expectedResponse); + } + } + + // Wait up to one second for the flush events + callback.waitForFlushEvents(sensorGroup, flushCalls, + std::chrono::milliseconds(1000) /* timeout */); + + // Deactivate all sensors after waiting for flush events so pending flush events are not + // abandoned by the HAL. + for (const SensorInfoType& sensor : sensorGroup) { + activate(sensor.sensorHandle, false); + } + + // Check that the correct number of flushes are present for each sensor + for (const SensorInfoType& sensor : sensorGroup) { SCOPED_TRACE(::testing::Message() - << "Flush " << i << "/" << flushCalls << ": " << " handle=0x" << std::hex << std::setw(8) << std::setfill('0') << sensor.sensorHandle << std::dec - << " type=" << static_cast(sensor.type) << " name=" << sensor.name); - - Result flushResult = flush(sensor.sensorHandle); - EXPECT_EQ(flushResult, expectedResponse); + << " type=" << static_cast(sensor.type) + << " name=" << sensor.name); + ASSERT_EQ(callback.getFlushCount(sensor.sensorHandle), expectedFlushCount); } } - - // Wait up to one second for the flush events - callback.waitForFlushEvents(sensors, flushCalls, std::chrono::milliseconds(1000) /* timeout */); - - // Deactivate all sensors after waiting for flush events so pending flush events are not - // abandoned by the HAL. - for (const SensorInfoType& sensor : sensors) { - activate(sensor.sensorHandle, false); - } getEnvironment()->unregisterCallback(); - - // Check that the correct number of flushes are present for each sensor - for (const SensorInfoType& sensor : sensors) { - SCOPED_TRACE(::testing::Message() - << " handle=0x" << std::hex << std::setw(8) << std::setfill('0') - << sensor.sensorHandle << std::dec << " type=" << static_cast(sensor.type) - << " name=" << sensor.name); - ASSERT_EQ(callback.getFlushCount(sensor.sensorHandle), expectedFlushCount); - } } TEST_P(SensorsHidlTest, FlushSensor) {