From dced9c7772590c49de1bd1b868aa0a8c01e6e950 Mon Sep 17 00:00:00 2001 From: shrikar Date: Tue, 14 Mar 2023 18:08:20 +0000 Subject: [PATCH] Removing DRIVER_ATTENTION_MONITORING properties from HAL layer. Bug: 273522827 Test: atest VtsHalAutomotiveVehicle_TargetTest Change-Id: Id7c505960b5395812e0d420997b3a0917bf02ba2 --- .../cpp/AccessForVehicleProperty.h | 3 - .../cpp/ChangeModeForVehicleProperty.h | 3 - .../java/AccessForVehicleProperty.java | 5 +- .../java/ChangeModeForVehicleProperty.java | 5 +- .../JsonConfigLoader/src/JsonConfigLoader.cpp | 6 -- .../config/DefaultProperties.json | 44 ------------- .../utils/common/include/VehicleHalTypes.h | 2 - .../DriverAttentionMonitoringState.aidl | 40 ----------- .../DriverAttentionMonitoringWarning.aidl | 40 ----------- .../automotive/vehicle/VehicleProperty.aidl | 3 - .../DriverAttentionMonitoringState.aidl | 43 ------------ .../DriverAttentionMonitoringWarning.aidl | 43 ------------ .../automotive/vehicle/VehicleProperty.aidl | 66 ------------------- .../VtsHalAutomotiveVehicle_TargetTest.cpp | 18 ----- 14 files changed, 2 insertions(+), 319 deletions(-) delete mode 100644 automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl delete mode 100644 automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl delete mode 100644 automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl delete mode 100644 automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl diff --git a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h index c8a36b82eb..d0c6e83ebe 100644 --- a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h +++ b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h @@ -272,9 +272,6 @@ std::unordered_map AccessForVehiclePrope {VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess::READ_WRITE}, {VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyAccess::READ}, {VehicleProperty::HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess::READ}, - {VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyAccess::READ_WRITE}, - {VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyAccess::READ}, - {VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyAccess::READ}, }; } // namespace vehicle diff --git a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h index bea5002c9f..48532c93ca 100644 --- a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h +++ b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h @@ -272,9 +272,6 @@ std::unordered_map ChangeModeForVehi {VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode::ON_CHANGE}, {VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyChangeMode::ON_CHANGE}, {VehicleProperty::HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode::ON_CHANGE}, - {VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE}, - {VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyChangeMode::ON_CHANGE}, - {VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyChangeMode::ON_CHANGE}, }; } // namespace vehicle diff --git a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java index ee214efb67..758670d588 100644 --- a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java +++ b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java @@ -263,10 +263,7 @@ public final class AccessForVehicleProperty { Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyAccess.READ), Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess.READ_WRITE), Map.entry(VehicleProperty.HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyAccess.READ), - Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess.READ), - Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyAccess.READ_WRITE), - Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyAccess.READ), - Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyAccess.READ) + Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess.READ) ); } diff --git a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java index d3cf71e6a4..29069f8de4 100644 --- a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java +++ b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java @@ -263,10 +263,7 @@ public final class ChangeModeForVehicleProperty { Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyChangeMode.CONTINUOUS), Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode.ON_CHANGE), Map.entry(VehicleProperty.HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyChangeMode.ON_CHANGE), - Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode.ON_CHANGE), - Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE), - Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyChangeMode.ON_CHANGE), - Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyChangeMode.ON_CHANGE) + Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode.ON_CHANGE) ); } diff --git a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp index d92107945e..ec0d310508 100644 --- a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp +++ b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp @@ -41,8 +41,6 @@ using ::aidl::android::hardware::automotive::vehicle::ChangeModeForVehicleProper using ::aidl::android::hardware::automotive::vehicle::CruiseControlCommand; using ::aidl::android::hardware::automotive::vehicle::CruiseControlState; using ::aidl::android::hardware::automotive::vehicle::CruiseControlType; -using ::aidl::android::hardware::automotive::vehicle::DriverAttentionMonitoringState; -using ::aidl::android::hardware::automotive::vehicle::DriverAttentionMonitoringWarning; using ::aidl::android::hardware::automotive::vehicle::EmergencyLaneKeepAssistState; using ::aidl::android::hardware::automotive::vehicle::ErrorState; using ::aidl::android::hardware::automotive::vehicle::EvConnectorType; @@ -245,10 +243,6 @@ JsonValueParser::JsonValueParser() { std::make_unique>(); mConstantParsersByType["HandsOnDetectionWarning"] = std::make_unique>(); - mConstantParsersByType["DriverAttentionMonitoringState"] = - std::make_unique>(); - mConstantParsersByType["DriverAttentionMonitoringWarning"] = - std::make_unique>(); mConstantParsersByType["ErrorState"] = std::make_unique>(); mConstantParsersByType["AutomaticEmergencyBrakingState"] = std::make_unique>(); diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json index 8476c1b01c..28790e2982 100644 --- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json +++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json @@ -3536,50 +3536,6 @@ } ] }, - { - "property": "VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED", - "defaultValue": { - "int32Values": [ - 1 - ] - } - }, - { - "property": "VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE", - "defaultValue": { - "int32Values": [ - "DriverAttentionMonitoringState::NOT_DISTRACTED" - ] - }, - "areas": [ - { - "areaId": 0, - "supportedEnumValues": [ - "ErrorState::NOT_AVAILABLE_DISABLED", - "DriverAttentionMonitoringState::DISTRACTED", - "DriverAttentionMonitoringState::NOT_DISTRACTED" - ] - } - ] - }, - { - "property": "VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING", - "defaultValue": { - "int32Values": [ - "DriverAttentionMonitoringWarning::NO_WARNING" - ] - }, - "areas": [ - { - "areaId": 0, - "supportedEnumValues": [ - "ErrorState::NOT_AVAILABLE_DISABLED", - "DriverAttentionMonitoringWarning::NO_WARNING", - "DriverAttentionMonitoringWarning::WARNING" - ] - } - ] - }, { "property": "VehicleProperty::INITIAL_USER_INFO" }, diff --git a/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h b/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h index 7db4246333..e6d657d675 100644 --- a/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h +++ b/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl deleted file mode 100644 index 925f4474e0..0000000000 --- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/////////////////////////////////////////////////////////////////////////////// -// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // -/////////////////////////////////////////////////////////////////////////////// - -// This file is a snapshot of an AIDL file. Do not edit it manually. There are -// two cases: -// 1). this is a frozen version file - do not edit this in any case. -// 2). this is a 'current' file. If you make a backwards compatible change to -// the interface (from the latest frozen version), the build system will -// prompt you to update this file with `m -update-api`. -// -// You must not make a backward incompatible change to any AIDL file built -// with the aidl_interface module type with versions property set. The module -// type is used to build AIDL files in a way that they can be used across -// independently updatable components of the system. If a device is shipped -// with such a backward incompatible change, it has a high risk of breaking -// later when a module using the interface is updated, e.g., Mainline modules. - -package android.hardware.automotive.vehicle; -@Backing(type="int") @VintfStability -enum DriverAttentionMonitoringState { - OTHER = 0, - DISTRACTED = 1, - NOT_DISTRACTED = 2, -} diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl deleted file mode 100644 index 758b251702..0000000000 --- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/////////////////////////////////////////////////////////////////////////////// -// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // -/////////////////////////////////////////////////////////////////////////////// - -// This file is a snapshot of an AIDL file. Do not edit it manually. There are -// two cases: -// 1). this is a frozen version file - do not edit this in any case. -// 2). this is a 'current' file. If you make a backwards compatible change to -// the interface (from the latest frozen version), the build system will -// prompt you to update this file with `m -update-api`. -// -// You must not make a backward incompatible change to any AIDL file built -// with the aidl_interface module type with versions property set. The module -// type is used to build AIDL files in a way that they can be used across -// independently updatable components of the system. If a device is shipped -// with such a backward incompatible change, it has a high risk of breaking -// later when a module using the interface is updated, e.g., Mainline modules. - -package android.hardware.automotive.vehicle; -@Backing(type="int") @VintfStability -enum DriverAttentionMonitoringWarning { - OTHER = 0, - NO_WARNING = 1, - WARNING = 2, -} diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl index e0267f3aec..ba75e7b261 100644 --- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl +++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl @@ -270,7 +270,4 @@ enum VehicleProperty { HANDS_ON_DETECTION_ENABLED = (((0x1016 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313942 */, HANDS_ON_DETECTION_DRIVER_STATE = (((0x1017 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411095 */, HANDS_ON_DETECTION_WARNING = (((0x1018 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411096 */, - DRIVER_ATTENTION_MONITORING_ENABLED = (((0x1019 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313945 */, - DRIVER_ATTENTION_MONITORING_STATE = (((0x101A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411098 */, - DRIVER_ATTENTION_MONITORING_WARNING = (((0x101B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411099 */, } diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl deleted file mode 100644 index 7ebf844274..0000000000 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.hardware.automotive.vehicle; - -/** - * Used to enumerate the current driver state of Driver Attention Monitoring. - * - * This enum could be extended in future releases to include additional feature states. - */ -@VintfStability -@Backing(type="int") -enum DriverAttentionMonitoringState { - /** - * This state is used as an alternative for any DriverAttentionMonitoringState value that is - * not defined in the platform. Ideally, implementations of - * VehicleProperty#DRIVER_ATTENTION_MONITORING_STATE should not use this state. The - * framework can use this field to remain backwards compatible if DriverAttentionMonitoringState - * is extended to include additional states. - */ - OTHER = 0, - /** - * The system detects that the driver is distracted. - */ - DISTRACTED = 1, - /** - * The system detects that the driver is attentive / not distracted. - */ - NOT_DISTRACTED = 2, -} diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl deleted file mode 100644 index 373dd7f763..0000000000 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.hardware.automotive.vehicle; - -/** - * Used to enumerate the current warning state of Driver Attention Monitoring. - */ -@VintfStability -@Backing(type="int") -enum DriverAttentionMonitoringWarning { - /** - * This state is used as an alternative for any DriverAttentionMonitoringWarning value that is - * defined in the platform. Ideally, implementations of - * VehicleProperty#DRIVER_ATTENTION_MONITORING_WARNING should not use this state. The framework - * can use this field to remain backwards compatible if DriverAttentionMonitoringWarning is - * extended to include additional states. - */ - OTHER = 0, - /** - * Driver Attention Monitoring is enabled and the driver's current state does not warrant - * sending a warning. - */ - NO_WARNING = 1, - /** - * Driver Attention Monitoring is enabled and the driver has been distracted for too long of a - * duration, and the vehicle is sending a warning to the driver as a consequence of this. - */ - WARNING = 2, -} 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 cd1f2947fe..7856e9ab3e 100644 --- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl +++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl @@ -4165,72 +4165,6 @@ enum VehicleProperty { HANDS_ON_DETECTION_WARNING = 0x1018 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32, - /** - * Enable or disable driver attention monitoring. - * - * Set true to enable driver attention monitoring and false to disable driver attention - * monitoring. When driver attention monitoring is enabled, a system inside the vehicle should - * be monitoring the attention level of the driver and should send a warning if it detects that - * the driver is distracted. - * - * In general, DRIVER_ATTENTION_MONITORING_ENABLED should always return true or false. If the - * feature is not available due to some temporary state, that information must be conveyed - * through the ErrorState values in the DRIVER_ATTENTION_MONITORING_STATE property. - * - * This property is defined as read_write, but OEMs have the option to implement it as read - * only. - * - * @change_mode VehiclePropertyChangeMode.ON_CHANGE - * @access VehiclePropertyAccess.READ_WRITE - */ - DRIVER_ATTENTION_MONITORING_ENABLED = - 0x1019 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN, - - /** - * Driver attention monitoring state. - * - * Returns whether the driver is currently attentive or distracted. Generally, this property - * should return a valid state defined in the DriverAttentionMonitoringState or ErrorState. For - * example, if the feature is not available due to some temporary state, that information should - * be conveyed through an ErrorState. - * - * If the vehicle wants to send a warning to the user because the driver has been distracted for - * too long, the warning should be surfaced through DRIVER_ATTENTION_MONITORING_WARNING. - * - * The VehicleAreaConfig#configArray array must define all states from - * DriverAttentionMonitoringState (including OTHER, which is not recommended) and ErrorState - * that are supported. - * - * @change_mode VehiclePropertyChangeMode.ON_CHANGE - * @access VehiclePropertyAccess.READ - * @data_enum DriverAttentionMonitoringState - * @data_enum ErrorState - */ - DRIVER_ATTENTION_MONITORING_STATE = - 0x101A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32, - - /** - * Driver attention monitoring warning. - * - * Returns whether a warning is being sent to the driver for being distracted for too long a - * duration. - * - * Generally, this property should return a valid state defined in the - * DriverAttentionMonitoringWarning or ErrorState. For example, if the feature is not available - * due to some temporary state, that information should be conveyed through an ErrorState. - * - * For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined - * unless all states of both DriverAttentionMonitoringWarning (including OTHER, which is not - * recommended) and ErrorState are supported. - * - * @change_mode VehiclePropertyChangeMode.ON_CHANGE - * @access VehiclePropertyAccess.READ - * @data_enum DriverAttentionMonitoringWarning - * @data_enum ErrorState - */ - DRIVER_ATTENTION_MONITORING_WARNING = - 0x101B + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32, - /*************************************************************************** * End of ADAS Properties **************************************************************************/ diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp index 90fc7270d3..8bcad1e0cb 100644 --- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp +++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp @@ -601,24 +601,6 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyHandsOnDetectionWarningConfig) { VehicleArea::GLOBAL, VehiclePropertyType::INT32); } -TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDriverAttentionMonitoringEnabledConfig) { - verifyProperty(VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED, - VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE, - VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN); -} - -TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDriverAttentionMonitoringStateConfig) { - verifyProperty(VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyAccess::READ, - VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM, - VehicleArea::GLOBAL, VehiclePropertyType::INT32); -} - -TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDriverAttentionMonitoringWarningConfig) { - verifyProperty(VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING, - VehiclePropertyAccess::READ, VehiclePropertyChangeMode::ON_CHANGE, - VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32); -} - TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyEvBrakeRegenerationLevelConfig) { verifyProperty(VehicleProperty::EV_BRAKE_REGENERATION_LEVEL, VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,