Snap for 11959661 from 853a3a6934 to 24Q3-release

Change-Id: Ibe93ec5fbdbebd26fbd27e54e7d680a001b4c20b
This commit is contained in:
Android Build Coastguard Worker 2024-06-12 23:20:19 +00:00
commit b9bd2b0915
16 changed files with 50 additions and 12 deletions

View file

@ -114,7 +114,7 @@ class BassBoostEffectHelper : public EffectHelper {
}
static constexpr int kSamplingFrequency = 44100;
static constexpr int kDurationMilliSec = 2000;
static constexpr int kDurationMilliSec = 720;
static constexpr int kInputSize = kSamplingFrequency * kDurationMilliSec / 1000;
long mInputFrameCount, mOutputFrameCount;
std::shared_ptr<IFactory> mFactory;
@ -231,7 +231,7 @@ class BassBoostDataTest : public ::testing::TestWithParam<BassBoostDataTestParam
return gains[0] - gains[1];
}
static constexpr int kNPointFFT = 32768;
static constexpr int kNPointFFT = 16384;
static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT;
std::set<int> mStrengthValues;
int32_t mChannelLayout;

View file

@ -82,7 +82,7 @@ class PresetReverbHelper : public EffectHelper {
}
static constexpr int kSamplingFrequency = 44100;
static constexpr int kDurationMilliSec = 2000;
static constexpr int kDurationMilliSec = 500;
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
int mStereoChannelCount =
getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(

View file

@ -96,7 +96,7 @@ class VirtualizerHelper : public EffectHelper {
static constexpr int kSamplingFrequency = 44100;
static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO;
static constexpr int kDurationMilliSec = 2000;
static constexpr int kDurationMilliSec = 720;
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
int kChannelCount = getChannelCount(
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(kDefaultChannelLayout));

View file

@ -94,7 +94,7 @@ class VolumeControlHelper : public EffectHelper {
}
static constexpr int kSamplingFrequency = 44100;
static constexpr int kDurationMilliSec = 2000;
static constexpr int kDurationMilliSec = 720;
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
static constexpr int kMinLevel = -96;
static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO;
@ -180,7 +180,7 @@ class VolumeDataTest : public ::testing::TestWithParam<VolumeDataTestParam>,
const int kVsrApiLevel;
static constexpr int kMaxAudioSample = 1;
static constexpr int kTransitionDuration = 300;
static constexpr int kNPointFFT = 32768;
static constexpr int kNPointFFT = 16384;
static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT;
static constexpr size_t offset = kSamplingFrequency * kTransitionDuration / 1000;
static constexpr float kBaseLevel = 0;

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>

View file

@ -2059,7 +2059,7 @@ TEST_P(NewKeyGenerationTest, EcdsaAttestationIdTags) {
extra_tags.Authorization(TAG_ATTESTATION_ID_IMEI, imei.data(), imei.size());
}
string second_imei = get_imei(1);
if (!second_imei.empty()) {
if (!second_imei.empty() && isSecondImeiIdAttestationRequired()) {
extra_tags.Authorization(TAG_ATTESTATION_ID_SECOND_IMEI, second_imei.data(),
second_imei.size());
}
@ -2135,7 +2135,7 @@ TEST_P(NewKeyGenerationTest, EcdsaAttestationIdAllTags) {
extra_tags.Authorization(TAG_ATTESTATION_ID_IMEI, imei.data(), imei.size());
}
string second_imei = get_imei(1);
if (!second_imei.empty()) {
if (!second_imei.empty() && isSecondImeiIdAttestationRequired()) {
extra_tags.Authorization(TAG_ATTESTATION_ID_SECOND_IMEI, second_imei.data(),
second_imei.size());
}