Merge "Revert^2 "Add PER_DISPLAY_MAX_BRIGHTNESS VHAL property."" into main

This commit is contained in:
Yu Shan 2024-06-11 23:52:21 +00:00 committed by Android (Google) Code Review
commit 4f45ed5f75
11 changed files with 42 additions and 4 deletions

View file

@ -40,7 +40,7 @@ cc_test {
cc_test {
name: "VehiclePropertyAnnotationCppTest",
srcs: ["VehiclePropertyAnnotationCppTest.cpp"],
header_libs: ["IVehicleGeneratedHeaders"],
header_libs: ["IVehicleGeneratedHeaders-V3"],
defaults: ["VehicleHalInterfaceDefaults"],
test_suites: ["general-tests"],
}

View file

@ -521,7 +521,7 @@
{
"name": "PER_DISPLAY_BRIGHTNESS",
"value": 289475076,
"description": "Property to represent brightness of the displays which are controlled separately.\nSome cars have one or more displays whose brightness is controlled separately and this property is to inform the brightness of each passenger display. In cars where all displays' brightness is controlled together, they must use DISPLAY_BRIGHTNESS.\nOnly one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by AAOS.\nThe display port uniquely identifies a physical connector on the device for display output, ranging from 0 to 255.\nWriting this property must cause an on property change event that contains the same [display port, brightness] tuple even if the new display brightness is the same as the current value.\nTo get the display brightness for a specific display port, the GetValueRequest must contain a VehiclePropValue, which contains one int32Value: displayPort. Getting this property without specifying the the display port is undefined behavior.\nint32Values[0] : display port int32Values[1] : brightness"
"description": "Property to represent brightness of the displays which are controlled separately.\nSome cars have one or more displays whose brightness is controlled separately and this property is to inform the brightness of each passenger display. In cars where all displays' brightness is controlled together, they must use DISPLAY_BRIGHTNESS.\nOnly one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by AAOS.\nIf this is supported, PER_DISPLAY_MAX_BRIGHTNESS must be supported to represent the max display brightness for each display. Otherwise, the max display brightness is by default 1. The VehicleAreaConfig.maxInt32Value must not be used to represent max display brightness, because maxInt32Value is defined to be the max value for all the elements inside the integer value, which includes display port and brightness. So it is not meaningful.\nThe display port uniquely identifies a physical connector on the device for display output, ranging from 0 to 255.\nWriting this property must cause an on property change event that contains the same [display port, brightness] tuple even if the new display brightness is the same as the current value.\nTo get the display brightness for a specific display port, the GetValueRequest must contain a VehiclePropValue, which contains one int32Value: displayPort. Getting this property without specifying the the display port is undefined behavior.\nint32Values[0] : display port int32Values[1] : brightness"
},
{
"name": "Valet mode enabled",
@ -1363,6 +1363,11 @@
"data_enum": "CameraServiceState",
"description": "Reports current state of CarEvsService types.\nInforms other components of current state of each CarEvsService service type with values defined in CameraServiceState. CarEvsService will update this property whenever a service type transitions into a new state.\nint32[0]: Current state of REARVIEW service type. int32[1]: Current state of SURROUNDVIEW service type. int32[2]: Current state of FRONTVIEW service type. int32[3]: Current state of LEFTVIEW service type. int32[4]: Current state of RIGHTVIEW service type. int32[5]: Current state of DRIVERVIEW service type. int32[6]: Current state of FRONT_PASSENGERVIEW service type. int32[7]: Current state of REAR_PASSENGERVIEW service type."
},
{
"name": "PER_DISPLAY_MAX_BRIGHTNESS",
"value": 289476430,
"description": "Property to represent max brightness of the displays which are controlled separately.\nThis is only used if PER_DISPLAY_BRIGHTNESS is supported.\nThe display port uniquely identifies a physical connector on the device for display output, ranging from 0 to 255.\nint32Values[0] : display port number int32Values[1] : max brightness for display port number specified at int32Values[0] int32Values[2] : display port number int32Values[3] : max brightness for display port number specified at int32Values[2] ..."
},
{
"name": "AUTOMATIC_EMERGENCY_BRAKING_ENABLED",
"value": 287313920,

View file

@ -263,6 +263,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
{VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyAccess::WRITE},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyAccess::READ},
{VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyAccess::WRITE},
{VehicleProperty::PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyAccess::READ},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess::READ},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},

View file

@ -263,6 +263,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
{VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},

View file

@ -262,6 +262,7 @@ std::unordered_map<VehicleProperty, int32_t> VersionForVehicleProperty = {
{VehicleProperty::CLUSTER_HEARTBEAT, 3},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, 3},
{VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, 3},
{VehicleProperty::PER_DISPLAY_MAX_BRIGHTNESS, 3},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, 2},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, 2},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, 2},

View file

@ -256,6 +256,7 @@ public final class AccessForVehicleProperty {
Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyAccess.WRITE),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyAccess.WRITE),
Map.entry(VehicleProperty.PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),

View file

@ -256,6 +256,7 @@ public final class ChangeModeForVehicleProperty {
Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),

View file

@ -28,7 +28,7 @@ aidl_interface {
// This HAL was originally part of android.hardware.automotive.vehicle
"android/hardware/automotive/vehicle/*.aidl",
],
frozen: true,
frozen: false,
stability: "vintf",
backend: {
cpp: {

View file

@ -262,6 +262,7 @@ enum VehicleProperty {
CLUSTER_HEARTBEAT = (((0x0F4B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED) /* 299896651 */,
VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL = (((0x0F4C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410892 */,
CAMERA_SERVICE_CURRENT_STATE = (((0x0F4D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 289476429 */,
PER_DISPLAY_MAX_BRIGHTNESS = (((0x0F4E + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 289476430 */,
AUTOMATIC_EMERGENCY_BRAKING_ENABLED = (((0x1000 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313920 */,
AUTOMATIC_EMERGENCY_BRAKING_STATE = (((0x1001 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411073 */,
FORWARD_COLLISION_WARNING_ENABLED = (((0x1002 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313922 */,

View file

@ -1757,6 +1757,12 @@ enum VehicleProperty {
* implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by
* AAOS.
*
* If this is supported, PER_DISPLAY_MAX_BRIGHTNESS must be supported to represent the max
* display brightness for each display. Otherwise, the max display brightness is by default 1.
* The VehicleAreaConfig.maxInt32Value must not be used to represent max display brightness,
* because maxInt32Value is defined to be the max value for all the elements inside the integer
* value, which includes display port and brightness. So it is not meaningful.
*
* The display port uniquely identifies a physical connector on the device
* for display output, ranging from 0 to 255.
*
@ -5214,6 +5220,27 @@ enum VehicleProperty {
CAMERA_SERVICE_CURRENT_STATE = 0x0F4D + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL
+ VehiclePropertyType.INT32_VEC,
/**
* Property to represent max brightness of the displays which are controlled separately.
*
* This is only used if PER_DISPLAY_BRIGHTNESS is supported.
*
* The display port uniquely identifies a physical connector on the device
* for display output, ranging from 0 to 255.
*
* int32Values[0] : display port number
* int32Values[1] : max brightness for display port number specified at int32Values[0]
* int32Values[2] : display port number
* int32Values[3] : max brightness for display port number specified at int32Values[2]
* ...
*
* @change_mode VehiclePropertyChangeMode.STATIC
* @access VehiclePropertyAccess.READ
* @version 3
*/
PER_DISPLAY_MAX_BRIGHTNESS = 0x0F4E + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL
+ VehiclePropertyType.INT32_VEC,
/***********************************************************************************************
* Start of ADAS Properties
*

View file

@ -84,7 +84,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.automotive.vehicle</name>
<version>1-3</version>
<version>1-4</version>
<interface>
<name>IVehicle</name>
<instance>default</instance>