Merge "Camera VTS: Synchronize access to 'mOutstandingBufferIds'" into main
diff --git a/METADATA b/METADATA
deleted file mode 100644
index d97975c..0000000
--- a/METADATA
+++ /dev/null
@@ -1,3 +0,0 @@
-third_party {
- license_type: NOTICE
-}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZone.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZone.aidl
index 2cb1760..57a9812 100644
--- a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZone.aidl
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZone.aidl
@@ -35,11 +35,10 @@
@JavaDerive(equals=true, toString=true) @VintfStability
parcelable AudioZone {
String name;
- int id;
+ int id = android.media.audio.common.AudioHalProductStrategy.ZoneId.DEFAULT /* 0 */;
int occupantZoneId = UNASSIGNED_OCCUPANT /* -1 */;
android.hardware.automotive.audiocontrol.AudioZoneContext audioZoneContext;
List<android.hardware.automotive.audiocontrol.AudioZoneConfig> audioZoneConfigs;
List<android.media.audio.common.AudioPort> inputAudioDevices;
- const int PRIMARY_AUDIO_ZONE = 0;
const int UNASSIGNED_OCCUPANT = (-1) /* -1 */;
}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl
index d3181da..4190c46 100644
--- a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl
@@ -73,6 +73,10 @@
/**
* Fade in delayed duration for audio focus offender in milliseconds
+ *
+ * <p>Fade offender are defined as audio players that do not stop playback after audio focus
+ * lost. This timeout serves to continue to fadeout the offender until audio is stopped or the
+ * timeout expires.
*/
long fadeInDelayedForOffendersMs = DEFAULT_DELAY_FADE_IN_OFFENDERS_MS;
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZone.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZone.aidl
index c90bcfd..d31d6fd 100644
--- a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZone.aidl
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZone.aidl
@@ -18,6 +18,7 @@
import android.hardware.automotive.audiocontrol.AudioZoneConfig;
import android.hardware.automotive.audiocontrol.AudioZoneContext;
+import android.media.audio.common.AudioHalProductStrategy;
import android.media.audio.common.AudioPort;
/**
@@ -27,11 +28,6 @@
@VintfStability
parcelable AudioZone {
/**
- * Value indicating the primary audio zone
- */
- const int PRIMARY_AUDIO_ZONE = 0;
-
- /**
* Value indicating the occupant zone is not assigned.
*/
const int UNASSIGNED_OCCUPANT = -1;
@@ -47,8 +43,11 @@
/**
* Audio zone id use to distiguish between the different audio zones for
* volume management, fade, and min/max activation management.
+ *
+ * <p>Value must start at {@link AudioHalProductStrategy#ZoneId#DEFAULT} for the primary zone
+ * and increase for each different zone. Zone id must also not repeat for different zones.
*/
- int id;
+ int id = AudioHalProductStrategy.ZoneId.DEFAULT;
/**
* Occupant zone id that should be mapped to this audio zone.
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl
index 7e3bc60..bea80ce 100644
--- a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl
@@ -33,8 +33,9 @@
/**
* Audio zone group name.
*
- * <p>Must be non-empty if using configurable audio policy engine volume management, see
- * {@code AudioDeviceConfiguration#useCoreAudioVolume} for details.
+ * <p>Must be non-empty if using configurable audio policy engine volume management,
+ * {@see AudioDeviceConfiguration#useCoreAudioVolume} for details. For non-core volume group
+ * management this can be left empty or use for debugging purposes.
*/
String name;
diff --git a/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
index 206ce0c..f4e8123 100644
--- a/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
+++ b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
@@ -49,6 +49,7 @@
using aidl::android::media::audio::common::AudioDeviceAddress;
using aidl::android::media::audio::common::AudioDeviceDescription;
using aidl::android::media::audio::common::AudioDeviceType;
+using aidl::android::media::audio::common::AudioHalProductStrategy;
using aidl::android::media::audio::common::AudioPort;
using aidl::android::media::audio::common::AudioPortDeviceExt;
using aidl::android::media::audio::common::AudioPortExt;
@@ -537,6 +538,7 @@
bool parseAudioZone(const xsd::ZoneType& zone, const ActivationMap& activations,
const FadeConfigurationMap& fadeConfigurations, api::AudioZone& audioZone) {
+ static int kPrimaryZoneId = static_cast<int>(AudioHalProductStrategy::ZoneId::DEFAULT);
if (zone.hasName()) {
audioZone.name = zone.getName();
}
@@ -558,7 +560,7 @@
bool isPrimary = zone.hasIsPrimary() && zone.getIsPrimary();
if (isPrimary) {
- audioZone.id = api::AudioZone::PRIMARY_AUDIO_ZONE;
+ audioZone.id = kPrimaryZoneId;
}
// ID not required in XML for primary zone
@@ -569,10 +571,10 @@
return false;
}
- if (isPrimary && audioZone.id != api::AudioZone::PRIMARY_AUDIO_ZONE) {
+ if (isPrimary && audioZone.id != kPrimaryZoneId) {
LOG(ERROR) << __func__ << " Audio zone is primary but has zone id "
<< std::to_string(audioZone.id) << " instead of primary zone id "
- << std::to_string(api::AudioZone::PRIMARY_AUDIO_ZONE);
+ << std::to_string(kPrimaryZoneId);
return false;
}
diff --git a/automotive/audiocontrol/aidl/default/converter/test/AudioControlConverterUnitTest.cpp b/automotive/audiocontrol/aidl/default/converter/test/AudioControlConverterUnitTest.cpp
index b6bebe5..d11a59a 100644
--- a/automotive/audiocontrol/aidl/default/converter/test/AudioControlConverterUnitTest.cpp
+++ b/automotive/audiocontrol/aidl/default/converter/test/AudioControlConverterUnitTest.cpp
@@ -38,6 +38,7 @@
using ::aidl::android::media::audio::common::AudioDeviceAddress;
using ::aidl::android::media::audio::common::AudioDeviceDescription;
using ::aidl::android::media::audio::common::AudioDeviceType;
+using ::aidl::android::media::audio::common::AudioHalProductStrategy;
using ::aidl::android::media::audio::common::AudioPort;
using ::aidl::android::media::audio::common::AudioPortDeviceExt;
using ::aidl::android::media::audio::common::AudioPortExt;
@@ -476,7 +477,7 @@
{kBusMediaVolumeGroup, kBusNavVolumeGroup, kBusCallVolumeGroup, kBusSysVolumeGroup}, true);
const api::AudioZone kDriverZone =
- createAudioZone("driver zone", api::AudioZone::PRIMARY_AUDIO_ZONE,
+ createAudioZone("driver zone", static_cast<int>(AudioHalProductStrategy::ZoneId::DEFAULT),
kSimpleCarAudioConfigurationContext, {kDriverZoneConfig});
const api::AudioZoneFadeConfiguration kZoneAudioConfigFading = createAudioZoneFadeConfiguration(
@@ -491,9 +492,9 @@
"oem_system_sound", "oem_notification"})});
const api::AudioZoneConfig kFrontZoneConfig = createAudioZoneConfig(
"front passenger config 0", kZoneAudioConfigFading, {kFrontVolumeGroup}, true);
-const api::AudioZone kFrontZone =
- createAudioZone("front passenger zone", api::AudioZone::PRIMARY_AUDIO_ZONE + 1,
- kSimpleCarAudioConfigurationContext, {kFrontZoneConfig});
+const api::AudioZone kFrontZone = createAudioZone(
+ "front passenger zone", static_cast<int>(AudioHalProductStrategy::ZoneId::DEFAULT) + 1,
+ kSimpleCarAudioConfigurationContext, {kFrontZoneConfig});
const AudioPort kBusRearDevice = createAudioPort("BUS_REAR", AudioDeviceType::OUT_BUS);
const api::VolumeGroupConfig kRearVolumeGroup =
@@ -503,9 +504,9 @@
"oem_system_sound", "oem_notification"})});
const api::AudioZoneConfig kRearZoneConfig = createAudioZoneConfig(
"rear seat config 0", kZoneAudioConfigFading, {kRearVolumeGroup}, true);
-const api::AudioZone kRearZone =
- createAudioZone("rear seat zone", api::AudioZone::PRIMARY_AUDIO_ZONE + 2,
- kSimpleCarAudioConfigurationContext, {kRearZoneConfig});
+const api::AudioZone kRearZone = createAudioZone(
+ "rear seat zone", static_cast<int>(AudioHalProductStrategy::ZoneId::DEFAULT) + 2,
+ kSimpleCarAudioConfigurationContext, {kRearZoneConfig});
std::vector<api::AudioZone> kMultiZones = {kDriverZone, kFrontZone, kRearZone};
@@ -624,7 +625,7 @@
EXPECT_EQ(zones.size(), 1);
const auto& zone = zones.front();
- EXPECT_EQ(zone.id, api::AudioZone::PRIMARY_AUDIO_ZONE);
+ EXPECT_EQ(zone.id, static_cast<int>(AudioHalProductStrategy::ZoneId::DEFAULT));
EXPECT_EQ(zone.occupantZoneId, 0);
EXPECT_EQ(zone.name, "primary zone");
@@ -685,7 +686,7 @@
EXPECT_EQ(zones.size(), 1);
const auto& zone = zones.front();
- EXPECT_EQ(zone.id, api::AudioZone::PRIMARY_AUDIO_ZONE);
+ EXPECT_EQ(zone.id, static_cast<int>(AudioHalProductStrategy::ZoneId::DEFAULT));
EXPECT_EQ(zone.occupantZoneId, 0);
EXPECT_EQ(zone.name, "primary zone");
diff --git a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
index 6781a81..f01f04d 100644
--- a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
+++ b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
@@ -26,6 +26,7 @@
#include <android/hardware/automotive/audiocontrol/BnModuleChangeCallback.h>
#include <android/hardware/automotive/audiocontrol/IAudioControl.h>
#include <android/log.h>
+#include <android/media/audio/common/AudioHalProductStrategy.h>
#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
#include <include/AudioControlTestUtils.h>
@@ -63,6 +64,8 @@
DEFAULT_MAX_ACTIVATION_VALUE;
using android::hardware::automotive::audiocontrol::VolumeActivationConfigurationEntry::
DEFAULT_MIN_ACTIVATION_VALUE;
+using android::media::audio::common::AudioHalProductStrategy;
+
using ::testing::AnyOf;
using ::testing::Eq;
@@ -199,7 +202,7 @@
void validateVolumeGroupInfo(const AudioZoneConfig& audioZoneConfig,
const VolumeGroupConfig& volumeGroupConfig,
const AudioDeviceConfiguration& deviceConfig,
- std::set<std::string>& groupDevices) {
+ std::set<std::string>& groupDevices, std::set<int>& groupIds) {
std::string zoneConfigName = testutils::toAlphaNumeric(ToString(audioZoneConfig.name));
std::string volumeGroupName = testutils::toAlphaNumeric(ToString(volumeGroupConfig.name));
std::string volumeGroupInfo =
@@ -212,6 +215,10 @@
EXPECT_FALSE(volumeGroupConfig.name.empty())
<< volumeGroupInfo << " must have a non-empty volume name";
}
+ if (volumeGroupConfig.id != VolumeGroupConfig::UNASSIGNED_ID) {
+ EXPECT_TRUE(groupIds.insert(volumeGroupConfig.id).second)
+ << volumeGroupInfo << " repeats volume group id " << volumeGroupConfig.id;
+ }
for (const auto& audioRoute : volumeGroupConfig.carAudioRoutes) {
std::string routeMessage;
EXPECT_TRUE(hasValidAudioRoute(audioRoute, routeMessage, groupDevices))
@@ -257,6 +264,7 @@
EXPECT_FALSE(audioZoneConfig.volumeGroups.empty())
<< "Volume groups for zone config " << zoneConfigName.c_str();
std::set<std::string> groupDevices;
+ std::set<int> groupIds;
for (const auto& volumeGroup : audioZoneConfig.volumeGroups) {
ALOGI("Zone config name %s volume group test %s", zoneConfigName.c_str(),
ToString(volumeGroup.name).c_str());
@@ -271,7 +279,7 @@
if (deviceConfig.routingConfig == CONFIGURABLE_AUDIO_ENGINE_ROUTING) {
groupDevices.clear();
}
- validateVolumeGroupInfo(audioZoneConfig, volumeGroup, deviceConfig, groupDevices);
+ validateVolumeGroupInfo(audioZoneConfig, volumeGroup, deviceConfig, groupDevices, groupIds);
}
const auto& audioZoneContexts = carAudioZone.audioZoneContext.audioContextInfos;
std::map<std::string, AudioZoneContextInfo> infoNameToInfo;
@@ -623,7 +631,7 @@
std::set<android::String16> zoneNames;
std::set<std::string> deviceAddresses;
for (const auto& zone : audioZones) {
- if (zone.id == AudioZone::PRIMARY_AUDIO_ZONE) {
+ if (zone.id == static_cast<int>(AudioHalProductStrategy::ZoneId::DEFAULT)) {
EXPECT_FALSE(primaryZoneFound) << "There can only be one primary zone";
primaryZoneFound = true;
}
diff --git a/automotive/vehicle/Android.bp b/automotive/vehicle/Android.bp
index 7c2d115..d549a82 100644
--- a/automotive/vehicle/Android.bp
+++ b/automotive/vehicle/Android.bp
@@ -29,7 +29,7 @@
cc_defaults {
name: "VehicleHalInterfaceDefaults",
static_libs: [
- "android.hardware.automotive.vehicle-V3-ndk",
+ "android.hardware.automotive.vehicle-V4-ndk",
"android.hardware.automotive.vehicle.property-V4-ndk",
],
}
@@ -45,7 +45,7 @@
aidl_interface_defaults {
name: "android.hardware.automotive.vehicle-latest-defaults",
imports: [
- "android.hardware.automotive.vehicle-V3",
+ "android.hardware.automotive.vehicle-V4",
"android.hardware.automotive.vehicle.property-V4",
],
}
diff --git a/automotive/vehicle/aidl/aidl_test/Android.bp b/automotive/vehicle/aidl/aidl_test/Android.bp
index 1e43070..8edd636 100644
--- a/automotive/vehicle/aidl/aidl_test/Android.bp
+++ b/automotive/vehicle/aidl/aidl_test/Android.bp
@@ -52,7 +52,7 @@
":IVehicleGeneratedJavaFiles-V4",
],
static_libs: [
- "android.hardware.automotive.vehicle-V3-java",
+ "android.hardware.automotive.vehicle-V4-java",
"android.hardware.automotive.vehicle.property-V4-java",
"androidx.test.runner",
"truth",
diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/ValueRange.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/ValueRange.aidl
deleted file mode 100644
index 816a6a8..0000000
--- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/ValueRange.aidl
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2024 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;
-
-import android.hardware.automotive.vehicle.RawPropValues;
-
-/**
- * Represents the value range for a vehicle property.
- *
- * This applies for the values read from VHAL and the values sent to VHAL.
- *
- * If the value range differs, this is the super set.
- */
-@VintfStability
-@JavaDerive(equals=true, toString=true)
-@RustDerive(Clone=true)
-parcelable ValueRange {
- /**
- * The currently specified minimum value for the property.
- *
- * {@code null} if not specified.
- */
- @nullable RawPropValues minValue;
-
- /**
- * The currently specified maximum value for the property.
- *
- * {@code null} if not specified.
- */
- @nullable RawPropValues maxValue;
-
- /**
- * The currently specified supported values for the property.
- *
- * If the value type is int32, int64 or float, the returned list must be
- * sorted in ascending order.
- *
- * {@code null} if not specified.
- */
- @nullable List<RawPropValues> supportedValues;
-}
diff --git a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
index 9bbeb9a..272f7c5 100644
--- a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
+++ b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
@@ -93,6 +93,20 @@
"description": "Multiple EV port locations\nImplement this property if the vehicle has multiple EV ports. Port locations are defined in PortLocationType. For example, a car has one port in front left and one port in rear left: int32Values[0] = PortLocationType::FRONT_LEFT int32Values[1] = PortLocationType::REAR_LEFT\nIf only one port exists on the vehicle, this property's value should list just one element. See INFO_EV_PORT_LOCATION for describing just one port location."
},
{
+ "name": "INFO_MODEL_TRIM",
+ "value": 286261517,
+ "description": "Public trim name of the vehicle.\nThis property must communicate the vehicle's public trim name.\nFor example, say an OEM manufactures two different versions of a vehicle model: \"makeName modelName\" and \"makeName modelName Sport\" This property must be empty for the first vehicle (i.e. base model), and set to \"Sport\" for the second vehicle."
+ },
+ {
+ "name": "Vehicle Size Class.",
+ "value": 289472782,
+ "data_enums": [
+ "VehicleSizeClass"
+ ],
+ "data_enum": "VehicleSizeClass",
+ "description": "Vehicle Size Class.\nThis property must communicate an integer array that contains the size classifications followed by the vehicle as enumerated in VehicleSizeClass.aidl. If the vehicle follows a single standard, then the array size of the property's value should be 1. If the vehicle follows multiple standards that the OEM wants to communicate, this may be communicated as additional values in the array.\nFor example, suppose a vehicle model follows the VehicleSizeClass.EU_A_SEGMENT standard in the EU and the VehicleSizeClass.JPN_KEI standard in Japan. In this scenario this property must return an intArray = [VehicleSizeClass.EU_A_SEGMENT, VehicleSizeClass.JPN_KEI]. If this vehicle only followed the VehicleSizeClass.EU_A_SEGMENT standard, then we expect intArray = [VehicleSizeClass.EU_A_SEGMENT]."
+ },
+ {
"name": "PERF_ODOMETER",
"value": 291504644,
"description": "Current odometer value of the vehicle"
@@ -118,6 +132,16 @@
"description": "Rear bicycle model steering angle for vehicle\nAngle is in degrees. Left is negative.\nThis property is independent of the angle of the steering wheel. This property must communicate the angle of the rear wheels with respect to the vehicle, not the angle of the steering wheel."
},
{
+ "name": "INSTANTANEOUS_FUEL_ECONOMY",
+ "value": 291504657,
+ "description": "Instantaneous Fuel Economy in L\/100km.\nThis property must communicate the instantaneous fuel economy of the vehicle in units of L\/100km. The property's value is independent of DISTANCE_DISPLAY_UNITS, FUEL_VOLUME_DISPLAY_UNITS, and FUEL_CONSUMPTION_UNITS_DISTANCE_OVER_VOLUME property i.e. this property must always communicate the value in L\/100km.\nFor the EV version of this property, see INSTANTANEOUS_EV_EFFICIENCY."
+ },
+ {
+ "name": "INSTANTANEOUS_EV_EFFICIENCY",
+ "value": 291504658,
+ "description": "Instantaneous EV efficiency in km\/kWh.\nThis property must communicate the instantaneous EV battery efficiency of the vehicle in units of km\/kWh. The property's value is independent of the DISTANCE_DISPLAY_UNITS and EV_BATTERY_DISPLAY_UNITS properties i.e. this property must always communicate the value in km\/kWh.\nFor the fuel version of this property, see INSTANTANEOUS_FUEL_ECONOMY."
+ },
+ {
"name": "Temperature of engine coolant",
"value": 291504897,
"description": "Temperature of engine coolant"
@@ -202,6 +226,31 @@
"description": "Critically low tire pressure\nThis property indicates the critically low pressure threshold for each tire. It indicates when it is time for tires to be replaced or fixed. The value must be less than or equal to minFloatValue in TIRE_PRESSURE. Minimum and maximum property values (that is, minFloatValue, maxFloatValue) are not applicable to this property."
},
{
+ "name": "ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE",
+ "value": 291504911,
+ "description": "Accelerator pedal compression percentage.\nThis property must communicate the percentage that the physical accelerator pedal in the vehicle is compressed. This property must return a float value from 0 to 100.\n0 indicates the pedal is not compressed. 100 indicates the pedal is maximally compressed."
+ },
+ {
+ "name": "BRAKE_PEDAL_COMPRESSION_PERCENTAGE",
+ "value": 291504912,
+ "description": "Brake pedal compression percentage.\nThis property must communicate the percentage that the physical brake pedal in the vehicle is compressed. This property must return a float value from 0 to 100.\n0 indicates the pedal is not compressed. 100 indicates the pedal is maximally compressed."
+ },
+ {
+ "name": "Brake pad wear percentage.",
+ "value": 392168209,
+ "description": "Brake pad wear percentage.\nThis property must communicate the amount of brake pad wear accumulated by the vehicle as a percentage. This property return a float value from 0 to 100.\n0 indicates the brake pad has no wear. 100 indicates the brake pad is maximally worn."
+ },
+ {
+ "name": "Brake fluid low.",
+ "value": 287310610,
+ "description": "Brake fluid low.\nThis property must communicate that the brake fluid level in the vehicle is low according to the OEM. This property must match the vehicle's brake fluid level status as displayed on the instrument cluster. If the brake fluid level is low, this property must be set to true. If not, it must be set to false."
+ },
+ {
+ "name": "VEHICLE_PASSIVE_SUSPENSION_HEIGHT",
+ "value": 390071059,
+ "description": "Vehicle Passive Suspension Height in mm.\nThis property must communicate the real-time suspension displacement of the vehicle relative to its neutral position, given in mm. In other words, the displacement of the suspension at any given point in time relative to the suspension's position when the vehicle is on a flat surface with no passengers or cargo. When the suspension is compressed in comparison to the neutral position, the value should be negative. When the suspension is decompressed in comparison to the neutral position, the value should be positive.\nExamples for further clarity: 1) Suppose the user is driving on a smooth flat surface, and all wheels are currently compressed by 2 cm in comparison to the default suspension height. In this scenario, this property must be set to -20 for all wheels. 2) Suppose the user drives over a pothole. While the front left wheel is over the pothole, it's decompressed by 3 cm in comparison to the rest of the wheels, or 1 cm in comparison to the default suspension height. All the others are still compressed by 2 cm. In this scenario, this property must be set to -20 for all wheels except for the front left, which must be set to 10.\nHasSupportedValueInfo.hasMinSupportedValue and HasSupportedValueInfo.hasMaxSupportedValue must be true for all areas.\nMinMaxSupportedValueResult.minSupportedValue represents the lower bound of the suspension height for the wheel at the specified area ID.\nMinMaxSupportedValueResult.maxSupportedValue represents the upper bound of the suspension height for the wheel at the specified area ID."
+ },
+ {
"name": "ENGINE_IDLE_AUTO_STOP_ENABLED",
"value": 287310624,
"description": "Represents feature for engine idle automatic stop.\nIf true, the vehicle may automatically shut off the engine when it is not needed and then automatically restart it when needed.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
@@ -216,6 +265,11 @@
"description": "Impact detected.\nBit flag property to relay information on whether an impact has occurred on a particular side of the vehicle as described through the ImpactSensorLocation enum. As a bit flag property, this property can be set to multiple ORed together values of the enum when necessary.\nFor the global area ID (0), {@code getSupportedValuesList} must return a {@code SupportedValuesListResult} that contains supported values unless all bit flags of ImpactSensorLocation are supported.\nFor backward compatibility, if {@code SupportedValuesListResult} is defined, {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values."
},
{
+ "name": "Vehicle horn engaged.",
+ "value": 287310656,
+ "description": "Vehicle horn engaged.\nThis property must communicate if the vehicle's horn is currently engaged or not. If true, the horn is engaged. If false, the horn is disengaged."
+ },
+ {
"name": "Currently selected gear",
"value": 289408000,
"data_enums": [
@@ -265,7 +319,7 @@
"VehicleTurnSignal"
],
"data_enum": "VehicleTurnSignal",
- "description": "State of the vehicles turn signals"
+ "description": "(Deprecated) State of the vehicles turn signals\nThis property has been deprecated as it ambiguously defines the state of the vehicle turn signals without making clear if it means the state of the turn signal lights or the state of the turn signal switch. The introduction of TURN_SIGNAL_LIGHT_STATE and TURN_SIGNAL_SWITCH rectifies this problem."
},
{
"name": "Represents ignition state",
@@ -311,6 +365,24 @@
"description": "Electronic Stability Control (ESC) state.\nReturns the current state of ESC. This property must always return a valid state defined in ElectronicStabilityControlState or ErrorState. It must not surface errors through StatusCode and must use the supported error states instead.\nFor the global area ID (0), {@code getSupportedValuesList} must return a {@code SupportedValuesListResult} that contains supported values unless all states of both ElectronicStabilityControlState (including OTHER, which is not recommended) and ErrorState are supported.\nFor backward compatibility, if {@code SupportedValuesListResult} is defined, {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values."
},
{
+ "name": "Turn signal light state.",
+ "value": 289408016,
+ "data_enums": [
+ "VehicleTurnSignal"
+ ],
+ "data_enum": "VehicleTurnSignal",
+ "description": "Turn signal light state.\nThis property must communicate the actual state of the turn signal lights.\nExamples: 1) Left turn signal light is currently pulsing, right turn signal light is currently off. This property must return VehicleTurnSignal.LEFT while the light is on during the pulse, and VehicleTurnSignal.NONE when it is off during the pulse. 2) Right turn signal light is currently pulsing, left turn signal light is currently off. This property must return VehicleTurnSignal.RIGHT while the light is on during the pulse, and VehicleTurnSignal.NONE when it is off during the pulse. 3) Both turn signal lights are currently pulsing (e.g. when hazard lights switch is on). This property must return VehicleTurnSignal.LEFT | VehicleTurnSignal.RIGHT while the lights are on during the pulse, and VehicleTurnSignal.NONE when they are off during the pulse.\nNote that this property uses VehicleTurnSignal as a bit flag, unlike TURN_SIGNAL_SWITCH, which uses it like a regular enum. This means this property can support ORed together values in VehicleTurnSignal.\nThis is different from the function of TURN_SIGNAL_SWITCH, which must communicate the state of the turn signal lever\/switch.\nThis property is a replacement to the TURN_SIGNAL_STATE property, which is now deprecated."
+ },
+ {
+ "name": "Turn signal switch.",
+ "value": 289408017,
+ "data_enums": [
+ "VehicleTurnSignal"
+ ],
+ "data_enum": "VehicleTurnSignal",
+ "description": "Turn signal switch.\nThis property must communicate the state of the turn signal lever\/switch. This is different from the function of TURN_SIGNAL_LIGHT_STATE, which must communicate the actual state of the turn signal lights.\nNote that this property uses VehicleTurnSignal as a regular enum, unlike TURN_SIGNAL_LIGHT_STATE, which uses it like a bit flag. This means this property cannot support ORed together values in VehicleTurnSignal.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ },
+ {
"name": "Fan speed setting",
"value": 356517120,
"description": "Fan speed setting\nThe maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. All integers between minInt32Value and maxInt32Value must be supported.\nThe minInt32Value indicates the lowest fan speed. The maxInt32Value indicates the highest fan speed.\nThis property is not in any particular unit but in a specified range of relative speeds.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
@@ -1356,7 +1428,16 @@
"VehicleAutonomousState"
],
"data_enum": "VehicleAutonomousState",
- "description": "Current state of vehicle autonomy.\nDefines the level of autonomy currently engaged in the vehicle from the J3016_202104 revision of the SAE standard levels 0-5, with 0 representing no autonomy and 5 representing full driving automation. These levels should be used in accordance with the standards defined in https:\/\/www.sae.org\/standards\/content\/j3016_202104\/ and https:\/\/www.sae.org\/blog\/sae-j3016-update\nFor the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined unless all states of VehicleAutonomousState are supported."
+ "description": "Current state of vehicle autonomy.\nDefines the level of autonomy currently engaged in the vehicle from the J3016_202104 revision of the SAE standard levels 0-5, with 0 representing no autonomy and 5 representing full driving automation.\nFor the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined unless all states of VehicleAutonomousState are supported."
+ },
+ {
+ "name": "VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL",
+ "value": 289410895,
+ "data_enums": [
+ "VehicleAutonomousState"
+ ],
+ "data_enum": "VehicleAutonomousState",
+ "description": "Target state of vehicle autonomy.\nDefines the level of autonomy being targeted by the vehicle from the J3016_202104 revision of the SAE standard levels 0-5, with 0 representing no autonomy and 5 representing full driving automation.\nFor example, suppose the vehicle is currently in a Level 3 state of automation and wants to give the driver full manual control (i.e. Level 0) as soon as it's safe to do so. In this scenario, this property must be set to VehicleAutonomousState.LEVEL_0. Similarly, if the vehicle is currently in Level 1 state of automation and wants to go up to Level 2, this property must be set to VehicleAutonomousState.LEVEL_2. If the vehicle has already reached and is currently in the target level of autonomy, this property must be equal to the value of VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL.\nFor the global area ID (0), the SupportedValuesListResult#supportedValuesList array must be defined unless all states of VehicleAutonomousState are supported. These values must match the values in supportedValuesList of VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL.\nFor the property that communicates the current state of autonomy, see VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL."
},
{
"name": "CAMERA_SERVICE_CURRENT_STATE",
@@ -2196,6 +2277,14 @@
"value": 11
},
{
+ "name": "SAE_J3400_AC",
+ "value": 8
+ },
+ {
+ "name": "SAE_J3400_DC",
+ "value": 9
+ },
+ {
"name": "OTHER",
"value": 101
}
@@ -2954,6 +3043,152 @@
]
},
{
+ "name": "VehicleSizeClass",
+ "package": "android.hardware.automotive.vehicle",
+ "values": [
+ {
+ "name": "EPA_TWO_SEATER",
+ "value": 256
+ },
+ {
+ "name": "EPA_MINICOMPACT",
+ "value": 257
+ },
+ {
+ "name": "EPA_SUBCOMPACT",
+ "value": 258
+ },
+ {
+ "name": "EPA_COMPACT",
+ "value": 259
+ },
+ {
+ "name": "EPA_MIDSIZE",
+ "value": 260
+ },
+ {
+ "name": "EPA_LARGE",
+ "value": 261
+ },
+ {
+ "name": "EPA_SMALL_STATION_WAGON",
+ "value": 262
+ },
+ {
+ "name": "EPA_MIDSIZE_STATION_WAGON",
+ "value": 263
+ },
+ {
+ "name": "EPA_LARGE_STATION_WAGON",
+ "value": 264
+ },
+ {
+ "name": "EPA_SMALL_PICKUP_TRUCK",
+ "value": 265
+ },
+ {
+ "name": "EPA_STANDARD_PICKUP_TRUCK",
+ "value": 266
+ },
+ {
+ "name": "EPA_VAN",
+ "value": 267
+ },
+ {
+ "name": "EPA_MINIVAN",
+ "value": 268
+ },
+ {
+ "name": "EPA_SMALL_SUV",
+ "value": 269
+ },
+ {
+ "name": "EPA_STANDARD_SUV",
+ "value": 270
+ },
+ {
+ "name": "EU_A_SEGMENT",
+ "value": 512
+ },
+ {
+ "name": "EU_B_SEGMENT",
+ "value": 513
+ },
+ {
+ "name": "EU_C_SEGMENT",
+ "value": 514
+ },
+ {
+ "name": "EU_D_SEGMENT",
+ "value": 515
+ },
+ {
+ "name": "EU_E_SEGMENT",
+ "value": 516
+ },
+ {
+ "name": "EU_F_SEGMENT",
+ "value": 517
+ },
+ {
+ "name": "EU_J_SEGMENT",
+ "value": 518
+ },
+ {
+ "name": "EU_M_SEGMENT",
+ "value": 519
+ },
+ {
+ "name": "EU_S_SEGMENT",
+ "value": 520
+ },
+ {
+ "name": "JPN_KEI",
+ "value": 768
+ },
+ {
+ "name": "JPN_SMALL_SIZE",
+ "value": 769
+ },
+ {
+ "name": "JPN_NORMAL_SIZE",
+ "value": 770
+ },
+ {
+ "name": "US_GVWR_CLASS_1_CV",
+ "value": 1024
+ },
+ {
+ "name": "US_GVWR_CLASS_2_CV",
+ "value": 1025
+ },
+ {
+ "name": "US_GVWR_CLASS_3_CV",
+ "value": 1026
+ },
+ {
+ "name": "US_GVWR_CLASS_4_CV",
+ "value": 1027
+ },
+ {
+ "name": "US_GVWR_CLASS_5_CV",
+ "value": 1028
+ },
+ {
+ "name": "US_GVWR_CLASS_6_CV",
+ "value": 1029
+ },
+ {
+ "name": "US_GVWR_CLASS_7_CV",
+ "value": 1030
+ },
+ {
+ "name": "US_GVWR_CLASS_8_CV",
+ "value": 1031
+ }
+ ]
+ },
+ {
"name": "VehicleTurnSignal",
"package": "android.hardware.automotive.vehicle",
"values": [
diff --git a/automotive/vehicle/aidl/generated_lib/3/cpp/Android.bp b/automotive/vehicle/aidl/generated_lib/3/cpp/Android.bp
index 8e750b1..612ed64 100644
--- a/automotive/vehicle/aidl/generated_lib/3/cpp/Android.bp
+++ b/automotive/vehicle/aidl/generated_lib/3/cpp/Android.bp
@@ -32,6 +32,6 @@
vendor_available: true,
local_include_dirs: ["."],
export_include_dirs: ["."],
- defaults: ["VehicleHalInterfaceDefaults"],
+ defaults: ["VehicleHalInterfaceDefaults-V3"],
host_supported: true,
}
diff --git a/automotive/vehicle/aidl/generated_lib/4/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/4/cpp/AccessForVehicleProperty.h
index 6d07fe5..8441af3 100644
--- a/automotive/vehicle/aidl/generated_lib/4/cpp/AccessForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/4/cpp/AccessForVehicleProperty.h
@@ -49,11 +49,15 @@
{VehicleProperty::INFO_DRIVER_SEAT, VehiclePropertyAccess::READ},
{VehicleProperty::INFO_EXTERIOR_DIMENSIONS, VehiclePropertyAccess::READ},
{VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS, VehiclePropertyAccess::READ},
+ {VehicleProperty::INFO_MODEL_TRIM, VehiclePropertyAccess::READ},
+ {VehicleProperty::INFO_VEHICLE_SIZE_CLASS, VehiclePropertyAccess::READ},
{VehicleProperty::PERF_ODOMETER, VehiclePropertyAccess::READ},
{VehicleProperty::PERF_VEHICLE_SPEED, VehiclePropertyAccess::READ},
{VehicleProperty::PERF_VEHICLE_SPEED_DISPLAY, VehiclePropertyAccess::READ},
{VehicleProperty::PERF_STEERING_ANGLE, VehiclePropertyAccess::READ},
{VehicleProperty::PERF_REAR_STEERING_ANGLE, VehiclePropertyAccess::READ},
+ {VehicleProperty::INSTANTANEOUS_FUEL_ECONOMY, VehiclePropertyAccess::READ},
+ {VehicleProperty::INSTANTANEOUS_EV_EFFICIENCY, VehiclePropertyAccess::READ},
{VehicleProperty::ENGINE_COOLANT_TEMP, VehiclePropertyAccess::READ},
{VehicleProperty::ENGINE_OIL_LEVEL, VehiclePropertyAccess::READ},
{VehicleProperty::ENGINE_OIL_TEMP, VehiclePropertyAccess::READ},
@@ -70,8 +74,14 @@
{VehicleProperty::EV_BATTERY_AVERAGE_TEMPERATURE, VehiclePropertyAccess::READ},
{VehicleProperty::TIRE_PRESSURE, VehiclePropertyAccess::READ},
{VehicleProperty::CRITICALLY_LOW_TIRE_PRESSURE, VehiclePropertyAccess::READ},
+ {VehicleProperty::ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyAccess::READ},
+ {VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyAccess::READ},
+ {VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyAccess::READ},
+ {VehicleProperty::BRAKE_FLUID_LEVEL_LOW, VehiclePropertyAccess::READ},
+ {VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyAccess::READ},
{VehicleProperty::ENGINE_IDLE_AUTO_STOP_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::IMPACT_DETECTED, VehiclePropertyAccess::READ},
+ {VehicleProperty::VEHICLE_HORN_ENGAGED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::GEAR_SELECTION, VehiclePropertyAccess::READ},
{VehicleProperty::CURRENT_GEAR, VehiclePropertyAccess::READ},
{VehicleProperty::PARKING_BRAKE_ON, VehiclePropertyAccess::READ},
@@ -86,6 +96,8 @@
{VehicleProperty::EV_STOPPING_MODE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::ELECTRONIC_STABILITY_CONTROL_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::ELECTRONIC_STABILITY_CONTROL_STATE, VehiclePropertyAccess::READ},
+ {VehicleProperty::TURN_SIGNAL_LIGHT_STATE, VehiclePropertyAccess::READ},
+ {VehicleProperty::TURN_SIGNAL_SWITCH, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::HVAC_FAN_SPEED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::HVAC_FAN_DIRECTION, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::HVAC_TEMPERATURE_CURRENT, VehiclePropertyAccess::READ},
@@ -262,6 +274,7 @@
{VehicleProperty::VEHICLE_IN_USE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyAccess::WRITE},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyAccess::READ},
+ {VehicleProperty::VEHICLE_DRIVING_AUTOMATION_TARGET_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},
diff --git a/automotive/vehicle/aidl/generated_lib/4/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/4/cpp/ChangeModeForVehicleProperty.h
index 5ecee95..3775f18 100644
--- a/automotive/vehicle/aidl/generated_lib/4/cpp/ChangeModeForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/4/cpp/ChangeModeForVehicleProperty.h
@@ -49,11 +49,15 @@
{VehicleProperty::INFO_DRIVER_SEAT, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::INFO_EXTERIOR_DIMENSIONS, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS, VehiclePropertyChangeMode::STATIC},
+ {VehicleProperty::INFO_MODEL_TRIM, VehiclePropertyChangeMode::STATIC},
+ {VehicleProperty::INFO_VEHICLE_SIZE_CLASS, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::PERF_ODOMETER, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::PERF_VEHICLE_SPEED, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::PERF_VEHICLE_SPEED_DISPLAY, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::PERF_STEERING_ANGLE, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::PERF_REAR_STEERING_ANGLE, VehiclePropertyChangeMode::CONTINUOUS},
+ {VehicleProperty::INSTANTANEOUS_FUEL_ECONOMY, VehiclePropertyChangeMode::CONTINUOUS},
+ {VehicleProperty::INSTANTANEOUS_EV_EFFICIENCY, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::ENGINE_COOLANT_TEMP, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::ENGINE_OIL_LEVEL, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::ENGINE_OIL_TEMP, VehiclePropertyChangeMode::CONTINUOUS},
@@ -70,8 +74,14 @@
{VehicleProperty::EV_BATTERY_AVERAGE_TEMPERATURE, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::TIRE_PRESSURE, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::CRITICALLY_LOW_TIRE_PRESSURE, VehiclePropertyChangeMode::STATIC},
+ {VehicleProperty::ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyChangeMode::CONTINUOUS},
+ {VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyChangeMode::CONTINUOUS},
+ {VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::BRAKE_FLUID_LEVEL_LOW, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyChangeMode::CONTINUOUS},
{VehicleProperty::ENGINE_IDLE_AUTO_STOP_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::IMPACT_DETECTED, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::VEHICLE_HORN_ENGAGED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::GEAR_SELECTION, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::CURRENT_GEAR, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::PARKING_BRAKE_ON, VehiclePropertyChangeMode::ON_CHANGE},
@@ -86,6 +96,8 @@
{VehicleProperty::EV_STOPPING_MODE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::ELECTRONIC_STABILITY_CONTROL_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::ELECTRONIC_STABILITY_CONTROL_STATE, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::TURN_SIGNAL_LIGHT_STATE, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::TURN_SIGNAL_SWITCH, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HVAC_FAN_SPEED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HVAC_FAN_DIRECTION, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HVAC_TEMPERATURE_CURRENT, VehiclePropertyChangeMode::ON_CHANGE},
@@ -262,6 +274,7 @@
{VehicleProperty::VEHICLE_IN_USE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::VEHICLE_DRIVING_AUTOMATION_TARGET_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},
diff --git a/automotive/vehicle/aidl/generated_lib/4/cpp/VersionForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/4/cpp/VersionForVehicleProperty.h
index 8b9c1bd..0a28b68 100644
--- a/automotive/vehicle/aidl/generated_lib/4/cpp/VersionForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/4/cpp/VersionForVehicleProperty.h
@@ -48,11 +48,15 @@
{VehicleProperty::INFO_DRIVER_SEAT, 2},
{VehicleProperty::INFO_EXTERIOR_DIMENSIONS, 2},
{VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS, 2},
+ {VehicleProperty::INFO_MODEL_TRIM, 4},
+ {VehicleProperty::INFO_VEHICLE_SIZE_CLASS, 4},
{VehicleProperty::PERF_ODOMETER, 2},
{VehicleProperty::PERF_VEHICLE_SPEED, 2},
{VehicleProperty::PERF_VEHICLE_SPEED_DISPLAY, 2},
{VehicleProperty::PERF_STEERING_ANGLE, 2},
{VehicleProperty::PERF_REAR_STEERING_ANGLE, 2},
+ {VehicleProperty::INSTANTANEOUS_FUEL_ECONOMY, 4},
+ {VehicleProperty::INSTANTANEOUS_EV_EFFICIENCY, 4},
{VehicleProperty::ENGINE_COOLANT_TEMP, 2},
{VehicleProperty::ENGINE_OIL_LEVEL, 2},
{VehicleProperty::ENGINE_OIL_TEMP, 2},
@@ -69,8 +73,14 @@
{VehicleProperty::EV_BATTERY_AVERAGE_TEMPERATURE, 3},
{VehicleProperty::TIRE_PRESSURE, 2},
{VehicleProperty::CRITICALLY_LOW_TIRE_PRESSURE, 2},
+ {VehicleProperty::ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE, 4},
+ {VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE, 4},
+ {VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE, 4},
+ {VehicleProperty::BRAKE_FLUID_LEVEL_LOW, 4},
+ {VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT, 4},
{VehicleProperty::ENGINE_IDLE_AUTO_STOP_ENABLED, 2},
{VehicleProperty::IMPACT_DETECTED, 3},
+ {VehicleProperty::VEHICLE_HORN_ENGAGED, 4},
{VehicleProperty::GEAR_SELECTION, 2},
{VehicleProperty::CURRENT_GEAR, 2},
{VehicleProperty::PARKING_BRAKE_ON, 2},
@@ -85,6 +95,8 @@
{VehicleProperty::EV_STOPPING_MODE, 2},
{VehicleProperty::ELECTRONIC_STABILITY_CONTROL_ENABLED, 3},
{VehicleProperty::ELECTRONIC_STABILITY_CONTROL_STATE, 3},
+ {VehicleProperty::TURN_SIGNAL_LIGHT_STATE, 4},
+ {VehicleProperty::TURN_SIGNAL_SWITCH, 4},
{VehicleProperty::HVAC_FAN_SPEED, 2},
{VehicleProperty::HVAC_FAN_DIRECTION, 2},
{VehicleProperty::HVAC_TEMPERATURE_CURRENT, 2},
@@ -261,6 +273,7 @@
{VehicleProperty::VEHICLE_IN_USE, 2},
{VehicleProperty::CLUSTER_HEARTBEAT, 3},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, 3},
+ {VehicleProperty::VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL, 4},
{VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, 3},
{VehicleProperty::PER_DISPLAY_MAX_BRIGHTNESS, 3},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, 2},
diff --git a/automotive/vehicle/aidl/generated_lib/4/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/4/java/AccessForVehicleProperty.java
index e9f35a5..1a68d4d 100644
--- a/automotive/vehicle/aidl/generated_lib/4/java/AccessForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/4/java/AccessForVehicleProperty.java
@@ -42,11 +42,15 @@
Map.entry(VehicleProperty.INFO_DRIVER_SEAT, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.INFO_EXTERIOR_DIMENSIONS, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.INFO_MULTI_EV_PORT_LOCATIONS, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.INFO_MODEL_TRIM, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.INFO_VEHICLE_SIZE_CLASS, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.PERF_ODOMETER, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.PERF_VEHICLE_SPEED, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.PERF_VEHICLE_SPEED_DISPLAY, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.PERF_STEERING_ANGLE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.PERF_REAR_STEERING_ANGLE, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.INSTANTANEOUS_FUEL_ECONOMY, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.INSTANTANEOUS_EV_EFFICIENCY, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.ENGINE_COOLANT_TEMP, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.ENGINE_OIL_LEVEL, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.ENGINE_OIL_TEMP, VehiclePropertyAccess.READ),
@@ -63,8 +67,14 @@
Map.entry(VehicleProperty.EV_BATTERY_AVERAGE_TEMPERATURE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.TIRE_PRESSURE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.CRITICALLY_LOW_TIRE_PRESSURE, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.BRAKE_FLUID_LEVEL_LOW, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.ENGINE_IDLE_AUTO_STOP_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.IMPACT_DETECTED, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.VEHICLE_HORN_ENGAGED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.GEAR_SELECTION, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.CURRENT_GEAR, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.PARKING_BRAKE_ON, VehiclePropertyAccess.READ),
@@ -79,6 +89,8 @@
Map.entry(VehicleProperty.EV_STOPPING_MODE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.ELECTRONIC_STABILITY_CONTROL_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.ELECTRONIC_STABILITY_CONTROL_STATE, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.TURN_SIGNAL_LIGHT_STATE, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.TURN_SIGNAL_SWITCH, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.HVAC_FAN_SPEED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.HVAC_FAN_DIRECTION, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.HVAC_TEMPERATURE_CURRENT, VehiclePropertyAccess.READ),
@@ -255,6 +267,7 @@
Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyAccess.WRITE),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_TARGET_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),
diff --git a/automotive/vehicle/aidl/generated_lib/4/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/4/java/ChangeModeForVehicleProperty.java
index 3fb52b7..a0dab66 100644
--- a/automotive/vehicle/aidl/generated_lib/4/java/ChangeModeForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/4/java/ChangeModeForVehicleProperty.java
@@ -42,11 +42,15 @@
Map.entry(VehicleProperty.INFO_DRIVER_SEAT, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.INFO_EXTERIOR_DIMENSIONS, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.INFO_MULTI_EV_PORT_LOCATIONS, VehiclePropertyChangeMode.STATIC),
+ Map.entry(VehicleProperty.INFO_MODEL_TRIM, VehiclePropertyChangeMode.STATIC),
+ Map.entry(VehicleProperty.INFO_VEHICLE_SIZE_CLASS, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.PERF_ODOMETER, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.PERF_VEHICLE_SPEED, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.PERF_VEHICLE_SPEED_DISPLAY, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.PERF_STEERING_ANGLE, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.PERF_REAR_STEERING_ANGLE, VehiclePropertyChangeMode.CONTINUOUS),
+ Map.entry(VehicleProperty.INSTANTANEOUS_FUEL_ECONOMY, VehiclePropertyChangeMode.CONTINUOUS),
+ Map.entry(VehicleProperty.INSTANTANEOUS_EV_EFFICIENCY, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.ENGINE_COOLANT_TEMP, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.ENGINE_OIL_LEVEL, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.ENGINE_OIL_TEMP, VehiclePropertyChangeMode.CONTINUOUS),
@@ -63,8 +67,14 @@
Map.entry(VehicleProperty.EV_BATTERY_AVERAGE_TEMPERATURE, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.TIRE_PRESSURE, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.CRITICALLY_LOW_TIRE_PRESSURE, VehiclePropertyChangeMode.STATIC),
+ Map.entry(VehicleProperty.ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyChangeMode.CONTINUOUS),
+ Map.entry(VehicleProperty.BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyChangeMode.CONTINUOUS),
+ Map.entry(VehicleProperty.BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.BRAKE_FLUID_LEVEL_LOW, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.ENGINE_IDLE_AUTO_STOP_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.IMPACT_DETECTED, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.VEHICLE_HORN_ENGAGED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.GEAR_SELECTION, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.CURRENT_GEAR, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.PARKING_BRAKE_ON, VehiclePropertyChangeMode.ON_CHANGE),
@@ -79,6 +89,8 @@
Map.entry(VehicleProperty.EV_STOPPING_MODE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.ELECTRONIC_STABILITY_CONTROL_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.ELECTRONIC_STABILITY_CONTROL_STATE, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.TURN_SIGNAL_LIGHT_STATE, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.TURN_SIGNAL_SWITCH, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.HVAC_FAN_SPEED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.HVAC_FAN_DIRECTION, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.HVAC_TEMPERATURE_CURRENT, VehiclePropertyChangeMode.ON_CHANGE),
@@ -255,6 +267,7 @@
Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_TARGET_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),
diff --git a/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java
index 24cc75b..7ab14ec 100644
--- a/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/4/java/EnumForVehicleProperty.java
@@ -36,6 +36,7 @@
Map.entry(VehicleProperty.INFO_EV_PORT_LOCATION, List.of(PortLocationType.class)),
Map.entry(VehicleProperty.INFO_DRIVER_SEAT, List.of(VehicleAreaSeat.class)),
Map.entry(VehicleProperty.INFO_MULTI_EV_PORT_LOCATIONS, List.of(PortLocationType.class)),
+ Map.entry(VehicleProperty.INFO_VEHICLE_SIZE_CLASS, List.of(VehicleSizeClass.class)),
Map.entry(VehicleProperty.ENGINE_OIL_LEVEL, List.of(VehicleOilLevel.class)),
Map.entry(VehicleProperty.IMPACT_DETECTED, List.of(ImpactSensorLocation.class)),
Map.entry(VehicleProperty.GEAR_SELECTION, List.of(VehicleGear.class)),
@@ -44,6 +45,8 @@
Map.entry(VehicleProperty.IGNITION_STATE, List.of(VehicleIgnitionState.class)),
Map.entry(VehicleProperty.EV_STOPPING_MODE, List.of(EvStoppingMode.class)),
Map.entry(VehicleProperty.ELECTRONIC_STABILITY_CONTROL_STATE, List.of(ElectronicStabilityControlState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.TURN_SIGNAL_LIGHT_STATE, List.of(VehicleTurnSignal.class)),
+ Map.entry(VehicleProperty.TURN_SIGNAL_SWITCH, List.of(VehicleTurnSignal.class)),
Map.entry(VehicleProperty.HVAC_FAN_DIRECTION, List.of(VehicleHvacFanDirection.class)),
Map.entry(VehicleProperty.HVAC_TEMPERATURE_DISPLAY_UNITS, List.of(VehicleUnit.class)),
Map.entry(VehicleProperty.HVAC_FAN_DIRECTION_AVAILABLE, List.of(VehicleHvacFanDirection.class)),
@@ -86,6 +89,7 @@
Map.entry(VehicleProperty.GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT, List.of(GsrComplianceRequirementType.class)),
Map.entry(VehicleProperty.SHUTDOWN_REQUEST, List.of(VehicleApPowerStateShutdownParam.class)),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, List.of(VehicleAutonomousState.class)),
+ Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL, List.of(VehicleAutonomousState.class)),
Map.entry(VehicleProperty.CAMERA_SERVICE_CURRENT_STATE, List.of(CameraServiceState.class)),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, List.of(AutomaticEmergencyBrakingState.class, ErrorState.class)),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_STATE, List.of(ForwardCollisionWarningState.class, ErrorState.class)),
diff --git a/automotive/vehicle/aidl/impl/current/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp b/automotive/vehicle/aidl/impl/current/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
index 57af04c..7a1f0e0 100644
--- a/automotive/vehicle/aidl/impl/current/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
+++ b/automotive/vehicle/aidl/impl/current/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
@@ -84,6 +84,7 @@
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyAccess;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyChangeMode;
using ::aidl::android::hardware::automotive::vehicle::VehicleSeatOccupancyState;
+using ::aidl::android::hardware::automotive::vehicle::VehicleSizeClass;
using ::aidl::android::hardware::automotive::vehicle::VehicleTurnSignal;
using ::aidl::android::hardware::automotive::vehicle::VehicleUnit;
using ::aidl::android::hardware::automotive::vehicle::VehicleVendorPermission;
@@ -261,6 +262,8 @@
std::make_unique<ConstantParser<VehicleAirbagLocation>>();
mConstantParsersByType["ImpactSensorLocation"] =
std::make_unique<ConstantParser<ImpactSensorLocation>>();
+ mConstantParsersByType["VehicleSizeClass"] =
+ std::make_unique<ConstantParser<VehicleSizeClass>>();
mConstantParsersByType["EmergencyLaneKeepAssistState"] =
std::make_unique<ConstantParser<EmergencyLaneKeepAssistState>>();
mConstantParsersByType["CameraServiceState"] =
diff --git a/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
index 489d638..86ac92e 100644
--- a/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
@@ -100,6 +100,21 @@
}
},
{
+ "property": "VehicleProperty::INFO_MODEL_TRIM",
+ "defaultValue": {
+ "stringValue": "Sport"
+ }
+ },
+ {
+ "property": "VehicleProperty::INFO_VEHICLE_SIZE_CLASS",
+ "defaultValue": {
+ "int32Values": [
+ "VehicleSizeClass::EU_A_SEGMENT",
+ "VehicleSizeClass::JPN_KEI"
+ ]
+ }
+ },
+ {
"property": "VehicleProperty::PERF_VEHICLE_SPEED",
"defaultValue": {
"floatValues": [
@@ -1465,6 +1480,26 @@
"minSampleRate": 1.0
},
{
+ "property": "VehicleProperty::INSTANTANEOUS_FUEL_ECONOMY",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ },
+ "maxSampleRate": 10.0,
+ "minSampleRate": 1.0
+ },
+ {
+ "property": "VehicleProperty::INSTANTANEOUS_EV_EFFICIENCY",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ },
+ "maxSampleRate": 10.0,
+ "minSampleRate": 1.0
+ },
+ {
"property": "VehicleProperty::ENGINE_RPM",
"defaultValue": {
"floatValues": [
@@ -1709,6 +1744,118 @@
]
},
{
+ "property": "VehicleProperty::ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ },
+ "maxSampleRate": 10.0,
+ "minSampleRate": 1.0
+ },
+ {
+ "property": "VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ },
+ "maxSampleRate": 10.0,
+ "minSampleRate": 1.0
+ },
+ {
+ "property": "VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE",
+ "areas": [
+ {
+ "areaId": "Constants::WHEEL_FRONT_LEFT",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ }
+ },
+ {
+ "areaId": "Constants::WHEEL_FRONT_RIGHT",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ }
+ },
+ {
+ "areaId": "Constants::WHEEL_REAR_LEFT",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ }
+ },
+ {
+ "areaId": "Constants::WHEEL_REAR_RIGHT",
+ "defaultValue": {
+ "floatValues": [
+ 0.0
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "property": "VehicleProperty::BRAKE_FLUID_LEVEL_LOW",
+ "defaultValue": {
+ "int32Values": [
+ 0
+ ]
+ }
+ },
+ {
+ "property": "VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT",
+ "areas": [
+ {
+ "defaultValue": {
+ "int32Values": [
+ 0
+ ]
+ },
+ "areaId": "Constants::WHEEL_FRONT_LEFT",
+ "minInt32Value": -100,
+ "maxInt32Value": 100
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 0
+ ]
+ },
+ "areaId": "Constants::WHEEL_FRONT_RIGHT",
+ "minInt32Value": -100,
+ "maxInt32Value": 100
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 0
+ ]
+ },
+ "areaId": "Constants::WHEEL_REAR_RIGHT",
+ "minInt32Value": -100,
+ "maxInt32Value": 100
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 0
+ ]
+ },
+ "areaId": "Constants::WHEEL_REAR_LEFT",
+ "minInt32Value": -100,
+ "maxInt32Value": 100
+ }
+ ],
+ "maxSampleRate": 10.0,
+ "minSampleRate": 1.0
+ },
+ {
"property": "VehicleProperty::TIRE_PRESSURE_DISPLAY_UNITS",
"defaultValue": {
"int32Values": [
@@ -2521,7 +2668,15 @@
]
},
{
- "property": "VehicleProperty::TURN_SIGNAL_STATE",
+ "property": "VehicleProperty::TURN_SIGNAL_LIGHT_STATE",
+ "defaultValue": {
+ "int32Values": [
+ "VehicleTurnSignal::NONE"
+ ]
+ }
+ },
+ {
+ "property": "VehicleProperty::TURN_SIGNAL_SWITCH",
"defaultValue": {
"int32Values": [
"VehicleTurnSignal::NONE"
@@ -2594,6 +2749,14 @@
]
},
{
+ "property": "VehicleProperty::VEHICLE_HORN_ENGAGED",
+ "defaultValue": {
+ "int32Values": [
+ 0
+ ]
+ }
+ },
+ {
"property": "VehicleProperty::DOOR_LOCK",
"areas": [
{
@@ -4750,6 +4913,14 @@
}
},
{
+ "property": "VehicleProperty::VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL",
+ "defaultValue": {
+ "int32Values": [
+ "VehicleAutonomousState::LEVEL_0"
+ ]
+ }
+ },
+ {
"property": "VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED",
"defaultValue": {
"int32Values": [
diff --git a/automotive/vehicle/aidl/impl/current/proto/Android.bp b/automotive/vehicle/aidl/impl/current/proto/Android.bp
index 2f8ed08..2b5cdf4 100644
--- a/automotive/vehicle/aidl/impl/current/proto/Android.bp
+++ b/automotive/vehicle/aidl/impl/current/proto/Android.bp
@@ -123,4 +123,5 @@
proto_flags: [
"-I external/protobuf/src",
],
+ min_sdk_version: "35",
}
diff --git a/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleHalTypes.h b/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleHalTypes.h
index 30f14e2..4fa0a06 100644
--- a/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleHalTypes.h
+++ b/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleHalTypes.h
@@ -93,6 +93,7 @@
#include <aidl/android/hardware/automotive/vehicle/VehiclePropertyStatus.h>
#include <aidl/android/hardware/automotive/vehicle/VehiclePropertyType.h>
#include <aidl/android/hardware/automotive/vehicle/VehicleSeatOccupancyState.h>
+#include <aidl/android/hardware/automotive/vehicle/VehicleSizeClass.h>
#include <aidl/android/hardware/automotive/vehicle/VehicleTurnSignal.h>
#include <aidl/android/hardware/automotive/vehicle/VehicleUnit.h>
#include <aidl/android/hardware/automotive/vehicle/VehicleVendorPermission.h>
diff --git a/automotive/vehicle/aidl/impl/current/vhal/include/DefaultVehicleHal.h b/automotive/vehicle/aidl/impl/current/vhal/include/DefaultVehicleHal.h
index 932a2e2..5d64e6f 100644
--- a/automotive/vehicle/aidl/impl/current/vhal/include/DefaultVehicleHal.h
+++ b/automotive/vehicle/aidl/impl/current/vhal/include/DefaultVehicleHal.h
@@ -70,6 +70,18 @@
const std::vector<int32_t>& propIds) override;
ndk::ScopedAStatus returnSharedMemory(const CallbackType& callback,
int64_t sharedMemoryId) override;
+ ndk::ScopedAStatus getSupportedValuesLists(
+ const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds,
+ aidlvhal::SupportedValuesListResults* supportedValuesListResults) override;
+ ndk::ScopedAStatus getMinMaxSupportedValue(
+ const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds,
+ aidlvhal::MinMaxSupportedValueResults* minMaxSupportedValueResults) override;
+ ndk::ScopedAStatus registerSupportedValueChangeCallback(
+ const std::shared_ptr<aidlvhal::IVehicleCallback>& callback,
+ const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds) override;
+ ndk::ScopedAStatus unregisterSupportedValueChangeCallback(
+ const std::shared_ptr<aidlvhal::IVehicleCallback>& callback,
+ const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds) override;
binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
IVehicleHardware* getHardware();
diff --git a/automotive/vehicle/aidl/impl/current/vhal/src/DefaultVehicleHal.cpp b/automotive/vehicle/aidl/impl/current/vhal/src/DefaultVehicleHal.cpp
index aa9ef53..1e55a1a 100644
--- a/automotive/vehicle/aidl/impl/current/vhal/src/DefaultVehicleHal.cpp
+++ b/automotive/vehicle/aidl/impl/current/vhal/src/DefaultVehicleHal.cpp
@@ -49,12 +49,15 @@
using ::aidl::android::hardware::automotive::vehicle::GetValueRequests;
using ::aidl::android::hardware::automotive::vehicle::GetValueResult;
using ::aidl::android::hardware::automotive::vehicle::GetValueResults;
+using ::aidl::android::hardware::automotive::vehicle::IVehicleCallback;
+using ::aidl::android::hardware::automotive::vehicle::MinMaxSupportedValueResults;
using ::aidl::android::hardware::automotive::vehicle::SetValueRequest;
using ::aidl::android::hardware::automotive::vehicle::SetValueRequests;
using ::aidl::android::hardware::automotive::vehicle::SetValueResult;
using ::aidl::android::hardware::automotive::vehicle::SetValueResults;
using ::aidl::android::hardware::automotive::vehicle::StatusCode;
using ::aidl::android::hardware::automotive::vehicle::SubscribeOptions;
+using ::aidl::android::hardware::automotive::vehicle::SupportedValuesListResults;
using ::aidl::android::hardware::automotive::vehicle::VehicleAreaConfig;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfig;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfigs;
@@ -961,6 +964,34 @@
return ScopedAStatus::ok();
}
+ScopedAStatus DefaultVehicleHal::getSupportedValuesLists(
+ const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&,
+ SupportedValuesListResults*) {
+ // TODO(b/381020465): Add relevant implementation.
+ return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ScopedAStatus DefaultVehicleHal::getMinMaxSupportedValue(
+ const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&,
+ MinMaxSupportedValueResults*) {
+ // TODO(b/381020465): Add relevant implementation.
+ return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ScopedAStatus DefaultVehicleHal::registerSupportedValueChangeCallback(
+ const std::shared_ptr<IVehicleCallback>&,
+ const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&) {
+ // TODO(b/381020465): Add relevant implementation.
+ return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ScopedAStatus DefaultVehicleHal::unregisterSupportedValueChangeCallback(
+ const std::shared_ptr<IVehicleCallback>&,
+ const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&) {
+ // TODO(b/381020465): Add relevant implementation.
+ return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
IVehicleHardware* DefaultVehicleHal::getHardware() {
return mVehicleHardware.get();
}
diff --git a/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.cpp b/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.cpp
index c272123..72c5dc5 100644
--- a/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.cpp
+++ b/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.cpp
@@ -27,6 +27,7 @@
namespace {
using ::aidl::android::hardware::automotive::vehicle::GetValueResults;
+using ::aidl::android::hardware::automotive::vehicle::PropIdAreaId;
using ::aidl::android::hardware::automotive::vehicle::SetValueResults;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropErrors;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValues;
@@ -91,6 +92,11 @@
return result;
}
+ScopedAStatus MockVehicleCallback::onSupportedValueChange(const std::vector<PropIdAreaId>&) {
+ // TODO(b/381020465): Add relevant implementation.
+ return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
std::optional<GetValueResults> MockVehicleCallback::nextGetValueResults() {
std::scoped_lock<std::mutex> lockGuard(mLock);
return pop(mGetValueResults);
diff --git a/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.h b/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.h
index 672ff4f..81a85ff 100644
--- a/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.h
+++ b/automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.h
@@ -55,6 +55,9 @@
int32_t) override;
ndk::ScopedAStatus onPropertySetError(
const aidl::android::hardware::automotive::vehicle::VehiclePropErrors&) override;
+ ndk::ScopedAStatus onSupportedValueChange(
+ const std::vector<aidl::android::hardware::automotive::vehicle::PropIdAreaId>&)
+ override;
// Test functions
std::optional<aidl::android::hardware::automotive::vehicle::GetValueResults>
diff --git a/automotive/vehicle/aidl/impl/current/vhal/test/SubscriptionManagerTest.cpp b/automotive/vehicle/aidl/impl/current/vhal/test/SubscriptionManagerTest.cpp
index 440a9f9..5d58de5 100644
--- a/automotive/vehicle/aidl/impl/current/vhal/test/SubscriptionManagerTest.cpp
+++ b/automotive/vehicle/aidl/impl/current/vhal/test/SubscriptionManagerTest.cpp
@@ -70,6 +70,12 @@
return ScopedAStatus::ok();
}
+ ScopedAStatus onSupportedValueChange(
+ const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&)
+ override {
+ return ScopedAStatus::ok();
+ }
+
// Test functions.
std::list<VehiclePropValue> getEvents() {
std::scoped_lock<std::mutex> lockGuard(mLock);
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/EvConnectorType.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/EvConnectorType.aidl
index b469578..768e97e 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/EvConnectorType.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/EvConnectorType.aidl
@@ -46,5 +46,7 @@
TESLA_SUPERCHARGER = 9,
GBT_AC = 10,
GBT_DC = 11,
+ SAE_J3400_AC = 8,
+ SAE_J3400_DC = 9,
OTHER = 101,
}
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 4c5dad2..6188dd9 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
@@ -48,11 +48,15 @@
INFO_DRIVER_SEAT = (((0x010A + 0x10000000) + 0x05000000) + 0x00400000) /* 356516106 */,
INFO_EXTERIOR_DIMENSIONS = (((0x010B + 0x10000000) + 0x01000000) + 0x00410000) /* 289472779 */,
INFO_MULTI_EV_PORT_LOCATIONS = (((0x010C + 0x10000000) + 0x01000000) + 0x00410000) /* 289472780 */,
+ INFO_MODEL_TRIM = (((0x010D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.STRING) /* 286261517 */,
+ INFO_VEHICLE_SIZE_CLASS = (((0x010E + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 289472782 */,
PERF_ODOMETER = (((0x0204 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504644 */,
PERF_VEHICLE_SPEED = (((0x0207 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504647 */,
PERF_VEHICLE_SPEED_DISPLAY = (((0x0208 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504648 */,
PERF_STEERING_ANGLE = (((0x0209 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504649 */,
PERF_REAR_STEERING_ANGLE = (((0x0210 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504656 */,
+ INSTANTANEOUS_FUEL_ECONOMY = (((0x0211 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291504657 */,
+ INSTANTANEOUS_EV_EFFICIENCY = (((0x0212 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291504658 */,
ENGINE_COOLANT_TEMP = (((0x0301 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504897 */,
ENGINE_OIL_LEVEL = (((0x0303 + 0x10000000) + 0x01000000) + 0x00400000) /* 289407747 */,
ENGINE_OIL_TEMP = (((0x0304 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504900 */,
@@ -69,8 +73,14 @@
EV_BATTERY_AVERAGE_TEMPERATURE = (((0x030E + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291504910 */,
TIRE_PRESSURE = (((0x0309 + 0x10000000) + 0x07000000) + 0x00600000) /* 392168201 */,
CRITICALLY_LOW_TIRE_PRESSURE = (((0x030A + 0x10000000) + 0x07000000) + 0x00600000) /* 392168202 */,
+ ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE = (((0x030F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291504911 */,
+ BRAKE_PEDAL_COMPRESSION_PERCENTAGE = (((0x0310 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291504912 */,
+ BRAKE_PAD_WEAR_PERCENTAGE = (((0x0311 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.WHEEL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 392168209 */,
+ BRAKE_FLUID_LEVEL_LOW = (((0x0312 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287310610 */,
+ VEHICLE_PASSIVE_SUSPENSION_HEIGHT = (((0x0313 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.WHEEL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 390071059 */,
ENGINE_IDLE_AUTO_STOP_ENABLED = (((0x0320 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287310624 */,
IMPACT_DETECTED = (((0x0330 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289407792 */,
+ VEHICLE_HORN_ENGAGED = (((0x0340 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287310656 */,
GEAR_SELECTION = (((0x0400 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408000 */,
CURRENT_GEAR = (((0x0401 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408001 */,
PARKING_BRAKE_ON = (((0x0402 + 0x10000000) + 0x01000000) + 0x00200000) /* 287310850 */,
@@ -85,6 +95,8 @@
EV_STOPPING_MODE = (((0x040D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289408013 */,
ELECTRONIC_STABILITY_CONTROL_ENABLED = (((0x040E + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287310862 */,
ELECTRONIC_STABILITY_CONTROL_STATE = (((0x040F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289408015 */,
+ TURN_SIGNAL_LIGHT_STATE = (((0x0410 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289408016 */,
+ TURN_SIGNAL_SWITCH = (((0x0411 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289408017 */,
HVAC_FAN_SPEED = (((0x0500 + 0x10000000) + 0x05000000) + 0x00400000) /* 356517120 */,
HVAC_FAN_DIRECTION = (((0x0501 + 0x10000000) + 0x05000000) + 0x00400000) /* 356517121 */,
HVAC_TEMPERATURE_CURRENT = (((0x0502 + 0x10000000) + 0x05000000) + 0x00600000) /* 358614274 */,
@@ -261,6 +273,7 @@
VEHICLE_IN_USE = (((0x0F4A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313738 */,
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 */,
+ VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL = (((0x0F4F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410895 */,
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 */,
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleSizeClass.aidl
similarity index 63%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleSizeClass.aidl
index 077652b..6817124 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleSizeClass.aidl
@@ -32,9 +32,41 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.automotive.vehicle;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+@Backing(type="int") @VintfStability
+enum VehicleSizeClass {
+ EPA_TWO_SEATER = 0x100,
+ EPA_MINICOMPACT = 0x101,
+ EPA_SUBCOMPACT = 0x102,
+ EPA_COMPACT = 0x103,
+ EPA_MIDSIZE = 0x104,
+ EPA_LARGE = 0x105,
+ EPA_SMALL_STATION_WAGON = 0x106,
+ EPA_MIDSIZE_STATION_WAGON = 0x107,
+ EPA_LARGE_STATION_WAGON = 0x108,
+ EPA_SMALL_PICKUP_TRUCK = 0x109,
+ EPA_STANDARD_PICKUP_TRUCK = 0x10A,
+ EPA_VAN = 0x10B,
+ EPA_MINIVAN = 0x10C,
+ EPA_SMALL_SUV = 0x10D,
+ EPA_STANDARD_SUV = 0x10E,
+ EU_A_SEGMENT = 0x200,
+ EU_B_SEGMENT = 0x201,
+ EU_C_SEGMENT = 0x202,
+ EU_D_SEGMENT = 0x203,
+ EU_E_SEGMENT = 0x204,
+ EU_F_SEGMENT = 0x205,
+ EU_J_SEGMENT = 0x206,
+ EU_M_SEGMENT = 0x207,
+ EU_S_SEGMENT = 0x208,
+ JPN_KEI = 0x300,
+ JPN_SMALL_SIZE = 0x301,
+ JPN_NORMAL_SIZE = 0x302,
+ US_GVWR_CLASS_1_CV = 0x400,
+ US_GVWR_CLASS_2_CV = 0x401,
+ US_GVWR_CLASS_3_CV = 0x402,
+ US_GVWR_CLASS_4_CV = 0x403,
+ US_GVWR_CLASS_5_CV = 0x404,
+ US_GVWR_CLASS_6_CV = 0x405,
+ US_GVWR_CLASS_7_CV = 0x406,
+ US_GVWR_CLASS_8_CV = 0x407,
}
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvConnectorType.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvConnectorType.aidl
index 7891dd9..5738d21 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvConnectorType.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/EvConnectorType.aidl
@@ -72,12 +72,15 @@
TESLA_ROADSTER = 7,
/**
* DO NOT USE
- * Use TESLA_SUPERCHARGER instead.
+ * Use SAE_J3400_AC instead.
*
* High Power Wall Charger of Tesla.
*/
TESLA_HPWC = 8,
/**
+ * DO NOT USE
+ * Use SAE_J3400_DC instead.
+ *
* SAE J3400 connector
*
* Also known as the "North American Charging Standard" (NACS)
@@ -89,6 +92,32 @@
/** GBT_DC Fast Charging Standard */
GBT_DC = 11,
/**
+ * SAE J3400 connector - AC Charging.
+ *
+ * Also known as the "North American Charging Standard" (NACS).
+ *
+ * This enum must be used if the vehicle specifically supports AC charging. If the vehicle
+ * supports both AC and DC, INFO_EV_CONNECTOR_TYPE should be populated with both SAE_J3400_AC
+ * and SAE_J3400_DC. If the vehicle only supports AC charging, it should only be populated with
+ * SAE_J3400_AC.
+ *
+ * This is equivalent to TESLA_HPWC enum.
+ */
+ SAE_J3400_AC = 8,
+ /**
+ * SAE J3400 connector - DC Charging.
+ *
+ * Also known as the "North American Charging Standard" (NACS).
+ *
+ * This enum must be used if the vehicle specifically supports DC charging. If the vehicle
+ * supports both AC and DC, INFO_EV_CONNECTOR_TYPE should be populated with both SAE_J3400_AC
+ * and SAE_J3400_DC. If the vehicle only supports DC charging, it should only be populated with
+ * SAE_J3400_DC.
+ *
+ * This is equivalent to TESLA_SUPERCHARGER enum.
+ */
+ SAE_J3400_DC = 9,
+ /**
* Connector type to use when no other types apply. Before using this
* value, work with Google to see if the EvConnectorType enum can be
* extended with an appropriate value.
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 e854ecc..43675ff 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -232,6 +232,45 @@
INFO_MULTI_EV_PORT_LOCATIONS = 0x010C + 0x10000000 + 0x01000000
+ 0x00410000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32_VEC
/**
+ * Public trim name of the vehicle.
+ *
+ * This property must communicate the vehicle's public trim name.
+ *
+ * For example, say an OEM manufactures two different versions of a vehicle model:
+ * "makeName modelName" and
+ * "makeName modelName Sport"
+ * This property must be empty for the first vehicle (i.e. base model), and set to "Sport" for
+ * the second vehicle.
+ *
+ * @change_mode VehiclePropertyChangeMode.STATIC
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ INFO_MODEL_TRIM =
+ 0x010D + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.STRING,
+ /**
+ * Vehicle Size Class.
+ *
+ * This property must communicate an integer array that contains the size classifications
+ * followed by the vehicle as enumerated in VehicleSizeClass.aidl. If the vehicle follows a
+ * single standard, then the array size of the property's value should be 1. If the vehicle
+ * follows multiple standards that the OEM wants to communicate, this may be communicated as
+ * additional values in the array.
+ *
+ * For example, suppose a vehicle model follows the VehicleSizeClass.EU_A_SEGMENT standard in
+ * the EU and the VehicleSizeClass.JPN_KEI standard in Japan. In this scenario this property
+ * must return an intArray = [VehicleSizeClass.EU_A_SEGMENT, VehicleSizeClass.JPN_KEI]. If this
+ * vehicle only followed the VehicleSizeClass.EU_A_SEGMENT standard, then we expect intArray =
+ * [VehicleSizeClass.EU_A_SEGMENT].
+ *
+ * @change_mode VehiclePropertyChangeMode.STATIC
+ * @access VehiclePropertyAccess.READ
+ * @data_enum VehicleSizeClass
+ * @version 4
+ */
+ INFO_VEHICLE_SIZE_CLASS = 0x010E + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL
+ + VehiclePropertyType.INT32_VEC,
+ /**
* Current odometer value of the vehicle
*
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
@@ -303,6 +342,38 @@
PERF_REAR_STEERING_ANGLE = 0x0210 + 0x10000000 + 0x01000000
+ 0x00600000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:FLOAT
/**
+ * Instantaneous Fuel Economy in L/100km.
+ *
+ * This property must communicate the instantaneous fuel economy of the vehicle in units of
+ * L/100km. The property's value is independent of DISTANCE_DISPLAY_UNITS,
+ * FUEL_VOLUME_DISPLAY_UNITS, and FUEL_CONSUMPTION_UNITS_DISTANCE_OVER_VOLUME property i.e. this
+ * property must always communicate the value in L/100km.
+ *
+ * For the EV version of this property, see INSTANTANEOUS_EV_EFFICIENCY.
+ *
+ * @change_mode VehiclePropertyChangeMode.CONTINUOUS
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ INSTANTANEOUS_FUEL_ECONOMY =
+ 0x0211 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.FLOAT,
+ /**
+ * Instantaneous EV efficiency in km/kWh.
+ *
+ * This property must communicate the instantaneous EV battery efficiency of the vehicle in
+ * units of km/kWh. The property's value is independent of the DISTANCE_DISPLAY_UNITS and
+ * EV_BATTERY_DISPLAY_UNITS properties i.e. this property must always communicate the value in
+ * km/kWh.
+ *
+ * For the fuel version of this property, see INSTANTANEOUS_FUEL_ECONOMY.
+ *
+ * @change_mode VehiclePropertyChangeMode.CONTINUOUS
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ INSTANTANEOUS_EV_EFFICIENCY =
+ 0x0212 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.FLOAT,
+ /**
* Temperature of engine coolant
*
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
@@ -579,6 +650,100 @@
CRITICALLY_LOW_TIRE_PRESSURE = 0x030A + 0x10000000 + 0x07000000
+ 0x00600000, // VehiclePropertyGroup:SYSTEM,VehicleArea:WHEEL,VehiclePropertyType:FLOAT
/**
+ * Accelerator pedal compression percentage.
+ *
+ * This property must communicate the percentage that the physical accelerator pedal in the
+ * vehicle is compressed. This property must return a float value from 0 to 100.
+ *
+ * 0 indicates the pedal is not compressed.
+ * 100 indicates the pedal is maximally compressed.
+ *
+ * @change_mode VehiclePropertyChangeMode.CONTINUOUS
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE =
+ 0x030F + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.FLOAT,
+ /**
+ * Brake pedal compression percentage.
+ *
+ * This property must communicate the percentage that the physical brake pedal in the vehicle is
+ * compressed. This property must return a float value from 0 to 100.
+ *
+ * 0 indicates the pedal is not compressed.
+ * 100 indicates the pedal is maximally compressed.
+ *
+ * @change_mode VehiclePropertyChangeMode.CONTINUOUS
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ BRAKE_PEDAL_COMPRESSION_PERCENTAGE =
+ 0x0310 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.FLOAT,
+ /**
+ * Brake pad wear percentage.
+ *
+ * This property must communicate the amount of brake pad wear accumulated by the vehicle as a
+ * percentage. This property return a float value from 0 to 100.
+ *
+ * 0 indicates the brake pad has no wear.
+ * 100 indicates the brake pad is maximally worn.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ BRAKE_PAD_WEAR_PERCENTAGE =
+ 0x0311 + VehiclePropertyGroup.SYSTEM + VehicleArea.WHEEL + VehiclePropertyType.FLOAT,
+ /**
+ * Brake fluid low.
+ *
+ * This property must communicate that the brake fluid level in the vehicle is low according to
+ * the OEM. This property must match the vehicle's brake fluid level status as displayed on the
+ * instrument cluster. If the brake fluid level is low, this property must be set to true. If
+ * not, it must be set to false.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ BRAKE_FLUID_LEVEL_LOW =
+ 0x0312 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
+ /**
+ * Vehicle Passive Suspension Height in mm.
+ *
+ * This property must communicate the real-time suspension displacement of the vehicle relative
+ * to its neutral position, given in mm. In other words, the displacement of the suspension at
+ * any given point in time relative to the suspension's position when the vehicle is on a flat
+ * surface with no passengers or cargo. When the suspension is compressed in comparison to the
+ * neutral position, the value should be negative. When the suspension is decompressed in
+ * comparison to the neutral position, the value should be positive.
+ *
+ * Examples for further clarity:
+ * 1) Suppose the user is driving on a smooth flat surface, and all wheels are currently
+ * compressed by 2 cm in comparison to the default suspension height. In this scenario, this
+ * property must be set to -20 for all wheels.
+ * 2) Suppose the user drives over a pothole. While the front left wheel is over the pothole,
+ * it's decompressed by 3 cm in comparison to the rest of the wheels, or 1 cm in comparison to
+ * the default suspension height. All the others are still compressed by 2 cm. In this
+ * scenario, this property must be set to -20 for all wheels except for the front left, which
+ * must be set to 10.
+ *
+ * HasSupportedValueInfo.hasMinSupportedValue and HasSupportedValueInfo.hasMaxSupportedValue
+ * must be true for all areas.
+ *
+ * MinMaxSupportedValueResult.minSupportedValue represents the lower bound of the suspension
+ * height for the wheel at the specified area ID.
+ *
+ * MinMaxSupportedValueResult.maxSupportedValue represents the upper bound of the suspension
+ * height for the wheel at the specified area ID.
+ *
+ * @change_mode VehiclePropertyChangeMode.CONTINUOUS
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ VEHICLE_PASSIVE_SUSPENSION_HEIGHT =
+ 0x0313 + VehiclePropertyGroup.SYSTEM + VehicleArea.WHEEL + VehiclePropertyType.INT32,
+ /**
* Represents feature for engine idle automatic stop.
*
* If true, the vehicle may automatically shut off the engine when it is not needed and then
@@ -616,6 +781,19 @@
IMPACT_DETECTED =
0x0330 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
+ * Vehicle horn engaged.
+ *
+ * This property must communicate if the vehicle's horn is currently engaged or not. If true,
+ * the horn is engaged. If false, the horn is disengaged.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
+ * @version 4
+ */
+ VEHICLE_HORN_ENGAGED =
+ 0x0340 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
+ /**
* Currently selected gear
*
* This is the gear selected by the user.
@@ -773,7 +951,12 @@
NIGHT_MODE = 0x0407 + 0x10000000 + 0x01000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
/**
- * State of the vehicles turn signals
+ * (Deprecated) State of the vehicles turn signals
+ *
+ * This property has been deprecated as it ambiguously defines the state of the vehicle turn
+ * signals without making clear if it means the state of the turn signal lights or the state of
+ * the turn signal switch. The introduction of TURN_SIGNAL_LIGHT_STATE and TURN_SIGNAL_SWITCH
+ * rectifies this problem.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ
@@ -887,6 +1070,60 @@
ELECTRONIC_STABILITY_CONTROL_STATE =
0x040F + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
+ * Turn signal light state.
+ *
+ * This property must communicate the actual state of the turn signal lights.
+ *
+ * Examples:
+ * 1) Left turn signal light is currently pulsing, right turn signal light is currently off.
+ * This property must return VehicleTurnSignal.LEFT while the light is on during the pulse,
+ * and VehicleTurnSignal.NONE when it is off during the pulse.
+ * 2) Right turn signal light is currently pulsing, left turn signal light is currently off.
+ * This property must return VehicleTurnSignal.RIGHT while the light is on during the pulse,
+ * and VehicleTurnSignal.NONE when it is off during the pulse.
+ * 3) Both turn signal lights are currently pulsing (e.g. when hazard lights switch is on).
+ * This property must return VehicleTurnSignal.LEFT | VehicleTurnSignal.RIGHT while the lights
+ * are on during the pulse, and VehicleTurnSignal.NONE when they are off during the pulse.
+ *
+ * Note that this property uses VehicleTurnSignal as a bit flag, unlike TURN_SIGNAL_SWITCH,
+ * which uses it like a regular enum. This means this property can support ORed together values
+ * in VehicleTurnSignal.
+ *
+ * This is different from the function of TURN_SIGNAL_SWITCH, which must communicate the state
+ * of the turn signal lever/switch.
+ *
+ * This property is a replacement to the TURN_SIGNAL_STATE property, which is now deprecated.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ
+ * @data_enum VehicleTurnSignal
+ * @version 4
+ */
+ TURN_SIGNAL_LIGHT_STATE =
+ 0x0410 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
+ /**
+ * Turn signal switch.
+ *
+ * This property must communicate the state of the turn signal lever/switch. This is different
+ * from the function of TURN_SIGNAL_LIGHT_STATE, which must communicate the actual state of the
+ * turn signal lights.
+ *
+ * Note that this property uses VehicleTurnSignal as a regular enum, unlike
+ * TURN_SIGNAL_LIGHT_STATE, which uses it like a bit flag. This means this property cannot
+ * support ORed together values in VehicleTurnSignal.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
+ * @data_enum VehicleTurnSignal
+ * @version 4
+ */
+ TURN_SIGNAL_SWITCH =
+ 0x0411 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
+ /**
* HVAC Properties
*
* Additional rules for mapping non-GLOBAL VehicleArea type HVAC properties
@@ -5256,9 +5493,7 @@
*
* Defines the level of autonomy currently engaged in the vehicle from the J3016_202104 revision
* of the SAE standard levels 0-5, with 0 representing no autonomy and 5 representing full
- * driving automation. These levels should be used in accordance with the standards defined in
- * https://www.sae.org/standards/content/j3016_202104/ and
- * https://www.sae.org/blog/sae-j3016-update
+ * driving automation.
*
* For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined
* unless all states of VehicleAutonomousState are supported.
@@ -5270,7 +5505,35 @@
*/
VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL =
0x0F4C + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
-
+ /**
+ * Target state of vehicle autonomy.
+ *
+ * Defines the level of autonomy being targeted by the vehicle from the J3016_202104 revision of
+ * the SAE standard levels 0-5, with 0 representing no autonomy and 5 representing full driving
+ * automation.
+ *
+ * For example, suppose the vehicle is currently in a Level 3 state of automation and wants to
+ * give the driver full manual control (i.e. Level 0) as soon as it's safe to do so. In this
+ * scenario, this property must be set to VehicleAutonomousState.LEVEL_0. Similarly, if the
+ * vehicle is currently in Level 1 state of automation and wants to go up to Level 2, this
+ * property must be set to VehicleAutonomousState.LEVEL_2. If the vehicle has already reached
+ * and is currently in the target level of autonomy, this property must be equal to the value of
+ * VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL.
+ *
+ * For the global area ID (0), the SupportedValuesListResult#supportedValuesList array must be
+ * defined unless all states of VehicleAutonomousState are supported. These values must match
+ * the values in supportedValuesList of VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL.
+ *
+ * For the property that communicates the current state of autonomy, see
+ * VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ
+ * @data_enum VehicleAutonomousState
+ * @version 4
+ */
+ VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL =
+ 0x0F4F + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
* Reports current state of CarEvsService types.
*
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleSizeClass.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleSizeClass.aidl
new file mode 100644
index 0000000..1915c4a
--- /dev/null
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleSizeClass.aidl
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2024 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 various size classes of vehicles.
+ *
+ * This enum can be extended in future releases to include additional values.
+ */
+@VintfStability
+@Backing(type="int")
+enum VehicleSizeClass {
+ /**
+ * Represents two-seaters as defined by the EPA standard of size classes for vehicles in the
+ * United States.
+ *
+ * The current implementation of EPA-standard enums follows the classification defined in
+ * Federal Regulation, Title 40—Protection of Environment, Section 600.315-08 "Classes of
+ * comparable automobiles".
+ */
+ EPA_TWO_SEATER = 0x100,
+ /**
+ * Represents minicompact cars as defined by the EPA standard of size classes for vehicles in
+ * the United States.
+ */
+ EPA_MINICOMPACT = 0x101,
+ /**
+ * Represents subcompact cars as defined by the EPA standard of size classes for vehicles in the
+ * United States.
+ */
+ EPA_SUBCOMPACT = 0x102,
+ /**
+ * Represents compact cars as defined by the EPA standard of size classes for vehicles in the
+ * United States.
+ */
+ EPA_COMPACT = 0x103,
+ /**
+ * Represents midsize cars as defined by the EPA standard of size classes for vehicles in the
+ * United States.
+ */
+ EPA_MIDSIZE = 0x104,
+ /**
+ * Represents large cars as defined by the EPA standard of size classes for vehicles in the
+ * United States.
+ */
+ EPA_LARGE = 0x105,
+ /**
+ * Represents small station wagons as defined by the EPA standard of size classes for vehicles
+ * in the United States.
+ */
+ EPA_SMALL_STATION_WAGON = 0x106,
+ /**
+ * Represents midsize station wagons as defined by the EPA standard of size classes for vehicles
+ * in the United States.
+ */
+ EPA_MIDSIZE_STATION_WAGON = 0x107,
+ /**
+ * Represents large station wagons as defined by the EPA standard of size classes for vehicles
+ * in the United States.
+ */
+ EPA_LARGE_STATION_WAGON = 0x108,
+ /**
+ * Represents small pickup trucks as defined by the EPA standard of size classes for vehicles
+ * in the United States.
+ */
+ EPA_SMALL_PICKUP_TRUCK = 0x109,
+ /**
+ * Represents standard pickup trucks as defined by the EPA standard of size classes for vehicles
+ * in the United States.
+ */
+ EPA_STANDARD_PICKUP_TRUCK = 0x10A,
+ /**
+ * Represents vans as defined by the EPA standard of size classes for vehicles in the United
+ * States.
+ */
+ EPA_VAN = 0x10B,
+ /**
+ * Represents minivans as defined by the EPA standard of size classes for vehicles in the United
+ * States.
+ */
+ EPA_MINIVAN = 0x10C,
+ /**
+ * Represents small sport utility vehicles (SUVs) as defined by the EPA standard of size classes
+ * for vehicles in the United States.
+ */
+ EPA_SMALL_SUV = 0x10D,
+ /**
+ * Represents standard sport utility vehicles (SUVs) as defined by the EPA standard of size
+ * classes for vehicles in the United States.
+ */
+ EPA_STANDARD_SUV = 0x10E,
+ /**
+ * Represents A-segment vehicle size class, commonly called "mini" cars or "city" cars, as
+ * classified in the EU.
+ *
+ * The current implementation of the EU Car Segment enums follows the classification first
+ * described in Case No COMP/M.1406 Hyundai / Kia Regulation (EEC) No 4064/89 Merger Procedure.
+ */
+ EU_A_SEGMENT = 0x200,
+ /**
+ * Represents B-segment vehicle size class, commonly called "small" cars, as classified in the
+ * EU.
+ */
+ EU_B_SEGMENT = 0x201,
+ /**
+ * Represents C-segment vehicle size class, commonly called "medium" cars, as classified in the
+ * EU.
+ */
+ EU_C_SEGMENT = 0x202,
+ /**
+ * Represents D-segment vehicle size class, commonly called "large" cars, as classified in the
+ * EU.
+ */
+ EU_D_SEGMENT = 0x203,
+ /**
+ * Represents E-segment vehicle size class, commonly called "executive" cars, as classified in
+ * the EU.
+ */
+ EU_E_SEGMENT = 0x204,
+ /**
+ * Represents F-segment vehicle size class, commonly called "luxury" cars, as classified in the
+ * EU.
+ */
+ EU_F_SEGMENT = 0x205,
+ /**
+ * Represents J-segment vehicle size class, commonly associated with SUVs and off-road vehicles,
+ * as classified in the EU.
+ */
+ EU_J_SEGMENT = 0x206,
+ /**
+ * Represents M-segment vehicle size class, commonly called "multi-purpose" cars, as classified
+ * in the EU.
+ */
+ EU_M_SEGMENT = 0x207,
+ /**
+ * Represents S-segment vehicle size class, commonly called "sports" cars, as classified in the
+ * EU.
+ */
+ EU_S_SEGMENT = 0x208,
+ /**
+ * Represents keijidosha or "kei" cars as defined by the Japanese standard of size classes for
+ * vehicles.
+ *
+ * The current implementation of Japan-standard enums follows the classification defined in the
+ * Japanese Government's Road Vehicle Act of 1951.
+ */
+ JPN_KEI = 0x300,
+ /**
+ * Represents small-size passenger vehicles as defined by the Japanese standard of size classes
+ * for vehicles.
+ */
+ JPN_SMALL_SIZE = 0x301,
+ /**
+ * Represents normal-size passenger vehicles as defined by the Japanese standard of size classes
+ * for vehicles.
+ */
+ JPN_NORMAL_SIZE = 0x302,
+ /**
+ * Represents Class 1 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Light duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_1_CV = 0x400,
+ /**
+ * Represents Class 2 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Light duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_2_CV = 0x401,
+ /**
+ * Represents Class 3 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Medium duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_3_CV = 0x402,
+ /**
+ * Represents Class 4 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Medium duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_4_CV = 0x403,
+ /**
+ * Represents Class 5 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Medium duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_5_CV = 0x404,
+ /**
+ * Represents Class 6 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Medium duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_6_CV = 0x405,
+ /**
+ * Represents Class 7 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Heavy duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_7_CV = 0x406,
+ /**
+ * Represents Class 8 trucks following the US GVWR classification of commercial vehicles. This
+ * is classified under "Heavy duty" vehicles by the US Federal Highway Association.
+ */
+ US_GVWR_CLASS_8_CV = 0x407,
+}
diff --git a/automotive/vehicle/vhal_static_cpp_lib.mk b/automotive/vehicle/vhal_static_cpp_lib.mk
index 9371453..7ab34f4 100644
--- a/automotive/vehicle/vhal_static_cpp_lib.mk
+++ b/automotive/vehicle/vhal_static_cpp_lib.mk
@@ -16,5 +16,5 @@
# interface and VHAL properties.
LOCAL_STATIC_LIBRARIES += \
- android.hardware.automotive.vehicle-V3-ndk \
+ android.hardware.automotive.vehicle-V4-ndk \
android.hardware.automotive.vehicle.property-V4-ndk
diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
index fb3c8cd..02a9830 100644
--- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
+++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
@@ -1376,6 +1376,84 @@
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
}
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyInfoModelTrimConfig) {
+ verifyProperty(VehicleProperty::INFO_MODEL_TRIM, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::STATIC, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::STRING);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyInfoVehicleSizeClassConfig) {
+ verifyProperty(VehicleProperty::INFO_VEHICLE_SIZE_CLASS, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::STATIC, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::INT32_VEC);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyTurnSignalLightStateConfig) {
+ verifyProperty(VehicleProperty::TURN_SIGNAL_LIGHT_STATE, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::INT32);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyTurnSignalSwitchConfig) {
+ verifyProperty(VehicleProperty::TURN_SIGNAL_SWITCH, VehiclePropertyAccess::READ_WRITE,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::INT32);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyInstantaneousFuelEconomyConfig) {
+ verifyProperty(VehicleProperty::INSTANTANEOUS_FUEL_ECONOMY, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::CONTINUOUS, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::FLOAT);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyInstantaneousEvEfficiencyConfig) {
+ verifyProperty(VehicleProperty::INSTANTANEOUS_EV_EFFICIENCY, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::CONTINUOUS, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::FLOAT);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyVehicleHornEngagedConfig) {
+ verifyProperty(VehicleProperty::VEHICLE_HORN_ENGAGED, VehiclePropertyAccess::READ_WRITE,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyVehicleDrivingAutomationTargetLevelConfig) {
+ verifyProperty(VehicleProperty::VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL,
+ VehiclePropertyAccess::READ, VehiclePropertyChangeMode::ON_CHANGE,
+ VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyAcceleratorPedalCompressionPercentageConfig) {
+ verifyProperty(VehicleProperty::ACCELERATOR_PEDAL_COMPRESSION_PERCENTAGE,
+ VehiclePropertyAccess::READ, VehiclePropertyChangeMode::CONTINUOUS,
+ VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::FLOAT);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyBrakePedalCompressionPercentageConfig) {
+ verifyProperty(VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::CONTINUOUS, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::FLOAT);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyBrakePadWearPercentageConfig) {
+ verifyProperty(VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::WHEEL, VehiclePropertyType::FLOAT);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyBrakeFluidLevelLowConfig) {
+ verifyProperty(VehicleProperty::BRAKE_FLUID_LEVEL_LOW, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyVehiclePassiveSuspensionHeightConfig) {
+ verifyProperty(VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::CONTINUOUS, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::WHEEL, VehiclePropertyType::INT32);
+}
+
bool VtsHalAutomotiveVehicleTargetTest::checkIsSupported(int32_t propertyId) {
auto result = mVhalClient->getPropConfigs({propertyId});
return result.ok();
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastCapability.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastCapability.aidl
index 58710ef..2872362 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastCapability.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastCapability.aidl
@@ -38,6 +38,7 @@
android.hardware.bluetooth.audio.AudioLocation supportedChannel;
int channelCountPerStream;
android.hardware.bluetooth.audio.BroadcastCapability.LeAudioCodecCapabilities leAudioCodecCapabilities;
+ @nullable android.hardware.bluetooth.audio.CodecSpecificConfigurationLtv.AudioChannelAllocation audioLocation;
@VintfStability
parcelable VendorCapabilities {
ParcelableHolder extension;
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl
index be79b0d..97fcd1f 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl
@@ -92,6 +92,7 @@
const int FRONT_RIGHT_WIDE = 0x02000000;
const int LEFT_SURROUND = 0x04000000;
const int RIGHT_SURROUND = 0x08000000;
+ const int MONO = 0x00000000;
}
parcelable OctetsPerCodecFrame {
int value;
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl
index 481e2ac..6ed0e56 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl
@@ -39,6 +39,7 @@
int deviceCount;
int channelCountPerDevice;
android.hardware.bluetooth.audio.UnicastCapability.LeAudioCodecCapabilities leAudioCodecCapabilities;
+ @nullable android.hardware.bluetooth.audio.CodecSpecificConfigurationLtv.AudioChannelAllocation audioLocation;
@VintfStability
parcelable VendorCapabilities {
ParcelableHolder extension;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastCapability.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastCapability.aidl
index f1301fb..db3c10e 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastCapability.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastCapability.aidl
@@ -17,6 +17,7 @@
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AudioLocation;
+import android.hardware.bluetooth.audio.CodecSpecificConfigurationLtv.AudioChannelAllocation;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Capabilities;
@@ -35,8 +36,11 @@
@nullable VendorCapabilities[] vendorCapabillities;
}
CodecType codecType;
+ // @deprecated use audioLocation if present.
AudioLocation supportedChannel;
// Supported channel count for each stream
int channelCountPerStream;
LeAudioCodecCapabilities leAudioCodecCapabilities;
+ // The new audio location type, replacing supportedChannel
+ @nullable AudioChannelAllocation audioLocation;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl
index 5e32e5e..2835325 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.aidl
@@ -47,6 +47,7 @@
}
parcelable AudioChannelAllocation {
+ // @deprecated use MONO instead.
const int NOT_ALLOWED = 0x00000000;
const int FRONT_LEFT = 0x00000001;
const int FRONT_RIGHT = 0x00000002;
@@ -76,6 +77,7 @@
const int FRONT_RIGHT_WIDE = 0x02000000;
const int LEFT_SURROUND = 0x04000000;
const int RIGHT_SURROUND = 0x08000000;
+ const int MONO = 0x00000000;
// Bit mask of Audio Locations
int bitmask;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl
index 8583221..9f33672 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl
@@ -18,6 +18,7 @@
import android.hardware.bluetooth.audio.AptxAdaptiveLeCapabilities;
import android.hardware.bluetooth.audio.AudioLocation;
+import android.hardware.bluetooth.audio.CodecSpecificConfigurationLtv.AudioChannelAllocation;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Capabilities;
import android.hardware.bluetooth.audio.OpusCapabilities;
@@ -39,10 +40,13 @@
OpusCapabilities opusCapabilities;
}
CodecType codecType;
+ // @deprecated use audioLocation if present.
AudioLocation supportedChannel;
// The number of connected device
int deviceCount;
// Supported channel count for each device
int channelCountPerDevice;
LeAudioCodecCapabilities leAudioCodecCapabilities;
+ // The new audio location type, replacing supportedChannel
+ @nullable AudioChannelAllocation audioLocation;
}
diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
index a10e0a6..18fc4b2 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
@@ -534,7 +534,8 @@
direction_configurations,
const std::vector<std::optional<AseDirectionRequirement>>& requirements,
std::optional<std::vector<std::optional<AseDirectionConfiguration>>>&
- valid_direction_configurations) {
+ valid_direction_configurations,
+ bool isExact) {
if (!direction_configurations.has_value()) return;
if (!valid_direction_configurations.has_value()) {
@@ -542,55 +543,93 @@
std::vector<std::optional<AseDirectionConfiguration>>();
}
- // Exact matching process
- // Need to respect the number of device
- for (int i = 0; i < requirements.size(); ++i) {
- auto requirement = requirements[i];
- auto direction_configuration = direction_configurations.value()[i];
- if (!direction_configuration.has_value()) {
- valid_direction_configurations = std::nullopt;
- return;
- }
- auto cfg = direction_configuration.value();
- if (!filterMatchedAseConfiguration(cfg.aseConfiguration,
- requirement.value().aseConfiguration)) {
- valid_direction_configurations = std::nullopt;
- return; // No way to match
- }
- // For exact match, we require this direction to have the same allocation.
- // If stereo, need stereo.
- // If mono, need mono (modified to the correct required allocation)
- auto req_allocation_bitmask = getLeAudioAseConfigurationAllocationBitmask(
- requirement.value().aseConfiguration);
- int req_channel_count = getCountFromBitmask(req_allocation_bitmask);
- int cfg_bitmask =
- getLeAudioAseConfigurationAllocationBitmask(cfg.aseConfiguration);
- int cfg_channel_count = getCountFromBitmask(cfg_bitmask);
- if (req_channel_count <= 1) {
- // MONO case, is a match if also mono, modify to the same allocation
- if (cfg_channel_count > 1) {
+ if (isExact) {
+ // Exact matching process
+ // Need to respect the number of device
+ for (int i = 0; i < requirements.size(); ++i) {
+ auto requirement = requirements[i];
+ auto direction_configuration = direction_configurations.value()[i];
+ if (!direction_configuration.has_value()) {
valid_direction_configurations = std::nullopt;
- return; // Not a match
+ return;
}
- // Modify the bitmask to be the same as the requirement
- for (auto& codec_cfg : cfg.aseConfiguration.codecConfiguration) {
- if (codec_cfg.getTag() ==
- CodecSpecificConfigurationLtv::Tag::audioChannelAllocation) {
- codec_cfg
- .get<CodecSpecificConfigurationLtv::Tag::audioChannelAllocation>()
- .bitmask = req_allocation_bitmask;
- break;
+ auto cfg = direction_configuration.value();
+ if (!filterMatchedAseConfiguration(
+ cfg.aseConfiguration, requirement.value().aseConfiguration)) {
+ valid_direction_configurations = std::nullopt;
+ return; // No way to match
+ }
+ // For exact match, we require this direction to have the same allocation.
+ // If stereo, need stereo.
+ // If mono, need mono (modified to the correct required allocation)
+ auto req_allocation_bitmask = getLeAudioAseConfigurationAllocationBitmask(
+ requirement.value().aseConfiguration);
+ int req_channel_count = getCountFromBitmask(req_allocation_bitmask);
+ int cfg_bitmask =
+ getLeAudioAseConfigurationAllocationBitmask(cfg.aseConfiguration);
+ int cfg_channel_count = getCountFromBitmask(cfg_bitmask);
+ if (req_channel_count <= 1) {
+ // MONO case, is a match if also mono, modify to the same allocation
+ if (cfg_channel_count > 1) {
+ valid_direction_configurations = std::nullopt;
+ return; // Not a match
+ }
+ // Modify the bitmask to be the same as the requirement
+ for (auto& codec_cfg : cfg.aseConfiguration.codecConfiguration) {
+ if (codec_cfg.getTag() ==
+ CodecSpecificConfigurationLtv::Tag::audioChannelAllocation) {
+ codec_cfg
+ .get<CodecSpecificConfigurationLtv::Tag::
+ audioChannelAllocation>()
+ .bitmask = req_allocation_bitmask;
+ break;
+ }
+ }
+ } else {
+ // STEREO case, is a match if same allocation
+ if (req_allocation_bitmask != cfg_bitmask) {
+ valid_direction_configurations = std::nullopt;
+ return; // Not a match
}
}
- } else {
- // STEREO case, is a match if same allocation
- if (req_allocation_bitmask != cfg_bitmask) {
+ // Push to list if valid
+ valid_direction_configurations.value().push_back(cfg);
+ }
+ } else {
+ // Loose matching process
+ for (auto& requirement : requirements) {
+ if (!requirement.has_value()) continue;
+ auto req_allocation_bitmask = getLeAudioAseConfigurationAllocationBitmask(
+ requirement.value().aseConfiguration);
+ auto req_channel_count = getCountFromBitmask(req_allocation_bitmask);
+
+ auto temp = std::vector<AseDirectionConfiguration>();
+
+ for (auto direction_configuration : direction_configurations.value()) {
+ if (!direction_configuration.has_value()) continue;
+ if (!filterMatchedAseConfiguration(
+ direction_configuration.value().aseConfiguration,
+ requirement.value().aseConfiguration))
+ continue;
+ // Valid if match any requirement.
+ temp.push_back(direction_configuration.value());
+ }
+
+ // Get the best matching config based on channel allocation
+ auto total_cfg_channel_count = 0;
+ auto req_valid_configs = getValidConfigurationsFromAllocation(
+ req_allocation_bitmask, temp, isExact);
+ // Count and check required channel counts
+ for (auto& cfg : req_valid_configs) {
+ total_cfg_channel_count += getCountFromBitmask(
+ getLeAudioAseConfigurationAllocationBitmask(cfg.aseConfiguration));
+ valid_direction_configurations.value().push_back(cfg);
+ }
+ if (total_cfg_channel_count != req_channel_count) {
valid_direction_configurations = std::nullopt;
- return; // Not a match
+ return;
}
}
- // Push to list if valid
- valid_direction_configurations.value().push_back(cfg);
}
}
@@ -650,8 +689,8 @@
std::optional<LeAudioAseConfigurationSetting>
LeAudioOffloadAudioProvider::getRequirementMatchedAseConfigurationSettings(
IBluetoothAudioProvider::LeAudioAseConfigurationSetting& setting,
- const IBluetoothAudioProvider::LeAudioConfigurationRequirement&
- requirement) {
+ const IBluetoothAudioProvider::LeAudioConfigurationRequirement& requirement,
+ bool isExact) {
// Create a new LeAudioAseConfigurationSetting to return
// Make context the same as the requirement
LeAudioAseConfigurationSetting filtered_setting{
@@ -664,25 +703,27 @@
// is the number of device.
// The exact matching process is as follow:
- // 1. Setting direction has the same number of cfg (ignore when null require)
+ // 1. Setting direction has the same number of cfg (ignore when null
+ // require)
// 2. For each index, it's a 1-1 filter / mapping.
+ if (isExact) {
+ if (requirement.sinkAseRequirement.has_value() &&
+ requirement.sinkAseRequirement.value().size() !=
+ setting.sinkAseConfiguration.value().size()) {
+ return std::nullopt;
+ }
- if (requirement.sinkAseRequirement.has_value() &&
- requirement.sinkAseRequirement.value().size() !=
- setting.sinkAseConfiguration.value().size()) {
- return std::nullopt;
- }
-
- if (requirement.sourceAseRequirement.has_value() &&
- requirement.sourceAseRequirement.value().size() !=
- setting.sourceAseConfiguration.value().size()) {
- return std::nullopt;
+ if (requirement.sourceAseRequirement.has_value() &&
+ requirement.sourceAseRequirement.value().size() !=
+ setting.sourceAseConfiguration.value().size()) {
+ return std::nullopt;
+ }
}
if (requirement.sinkAseRequirement.has_value()) {
filterRequirementAseDirectionConfiguration(
setting.sinkAseConfiguration, requirement.sinkAseRequirement.value(),
- filtered_setting.sinkAseConfiguration);
+ filtered_setting.sinkAseConfiguration, isExact);
if (!filtered_setting.sinkAseConfiguration.has_value()) {
return std::nullopt;
}
@@ -692,7 +733,7 @@
filterRequirementAseDirectionConfiguration(
setting.sourceAseConfiguration,
requirement.sourceAseRequirement.value(),
- filtered_setting.sourceAseConfiguration);
+ filtered_setting.sourceAseConfiguration, isExact);
if (!filtered_setting.sourceAseConfiguration.has_value()) {
return std::nullopt;
}
@@ -706,9 +747,10 @@
std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>&
matched_ase_configuration_settings,
const IBluetoothAudioProvider::LeAudioConfigurationRequirement& requirement,
- bool isMatchContext) {
+ bool isMatchContext, bool isExact) {
LOG(INFO) << __func__ << ": Trying to match for the requirement "
- << requirement.toString() << ", match context = " << isMatchContext;
+ << requirement.toString() << ", match context = " << isMatchContext
+ << ", match exact = " << isExact;
for (auto& setting : matched_ase_configuration_settings) {
// Try to match context in metadata.
if (isMatchContext) {
@@ -720,7 +762,8 @@
}
auto filtered_ase_configuration_setting =
- getRequirementMatchedAseConfigurationSettings(setting, requirement);
+ getRequirementMatchedAseConfigurationSettings(setting, requirement,
+ isExact);
if (filtered_ase_configuration_setting.has_value()) {
LOG(INFO) << __func__ << ": Result found: "
<< getSettingOutputString(
@@ -811,26 +854,30 @@
// Matching priority list:
// Preferred context - exact match with allocation
+ // Preferred context - loose match with allocation
// Any context - exact match with allocation
- auto matched_setting_with_context = matchWithRequirement(
- matched_ase_configuration_settings, requirement, true);
- if (matched_setting_with_context.has_value()) {
- result.push_back(matched_setting_with_context.value());
- } else {
- auto matched_setting = matchWithRequirement(
- matched_ase_configuration_settings, requirement, false);
- if (matched_setting.has_value()) {
- result.push_back(matched_setting.value());
- } else {
- // Cannot find a match for this requirement
- // Immediately return
- LOG(ERROR)
- << __func__
- << ": Cannot find any match for this requirement, exitting...";
- result.clear();
- *_aidl_return = result;
- return ndk::ScopedAStatus::ok();
+ // Any context - loose match with allocation
+ bool found = false;
+ for (bool match_context : {true, false}) {
+ for (bool match_exact : {true, false}) {
+ auto matched_setting =
+ matchWithRequirement(matched_ase_configuration_settings,
+ requirement, match_context, match_exact);
+ if (matched_setting.has_value()) {
+ result.push_back(matched_setting.value());
+ found = true;
+ break;
+ }
}
+ if (found) break;
+ }
+
+ if (!found) {
+ LOG(ERROR) << __func__
+ << ": Cannot find any match for this requirement, exitting...";
+ result.clear();
+ *_aidl_return = result;
+ return ndk::ScopedAStatus::ok();
}
}
diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
index 798f183..3a82b73 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
@@ -139,7 +139,8 @@
direction_configurations,
const std::vector<std::optional<AseDirectionRequirement>>& requirements,
std::optional<std::vector<std::optional<AseDirectionConfiguration>>>&
- valid_direction_configurations);
+ valid_direction_configurations,
+ bool isExact);
std::optional<LeAudioAseConfigurationSetting>
getCapabilitiesMatchedAseConfigurationSettings(
IBluetoothAudioProvider::LeAudioAseConfigurationSetting& setting,
@@ -149,7 +150,8 @@
getRequirementMatchedAseConfigurationSettings(
IBluetoothAudioProvider::LeAudioAseConfigurationSetting& setting,
const IBluetoothAudioProvider::LeAudioConfigurationRequirement&
- requirement);
+ requirement,
+ bool isExact);
bool isMatchedQosRequirement(LeAudioAseQosConfiguration setting_qos,
AseQosDirectionRequirement requirement_qos);
std::optional<LeAudioBroadcastConfigurationSetting>
@@ -173,7 +175,7 @@
matched_ase_configuration_settings,
const IBluetoothAudioProvider::LeAudioConfigurationRequirement&
requirements,
- bool isMatchContext);
+ bool isMatchContext, bool isExact);
};
class LeAudioOffloadOutputAudioProvider : public LeAudioOffloadAudioProvider {
diff --git a/bluetooth/audio/utils/Android.bp b/bluetooth/audio/utils/Android.bp
index d931c4d..d4968a8 100644
--- a/bluetooth/audio/utils/Android.bp
+++ b/bluetooth/audio/utils/Android.bp
@@ -90,13 +90,15 @@
cc_test {
name: "BluetoothLeAudioCodecsProviderTest",
- defaults: [
- "latest_android_hardware_bluetooth_audio_ndk_shared",
- ],
srcs: [
"aidl_session/BluetoothLeAudioCodecsProvider.cpp",
"aidl_session/BluetoothLeAudioCodecsProviderTest.cpp",
],
+ defaults: [
+ "latest_android_hardware_audio_common_ndk_static",
+ "latest_android_hardware_bluetooth_audio_ndk_static",
+ "latest_android_media_audio_common_types_ndk_static",
+ ],
header_libs: [
"libxsdc-utils",
],
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
index 8475d39..07e4997 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
@@ -95,7 +95,7 @@
constexpr uint8_t kLeAudioCodecFrameDur20000us = 0x02;
/* Audio Allocations */
-constexpr uint32_t kLeAudioLocationNotAllowed = 0x00000000;
+constexpr uint32_t kLeAudioLocationMonoAudio = 0x00000000;
constexpr uint32_t kLeAudioLocationFrontLeft = 0x00000001;
constexpr uint32_t kLeAudioLocationFrontRight = 0x00000002;
constexpr uint32_t kLeAudioLocationFrontCenter = 0x00000004;
@@ -178,8 +178,8 @@
/* Helper map for matching various audio channel allocation notations */
std::map<uint32_t, uint32_t> audio_channel_allocation_map = {
- {kLeAudioLocationNotAllowed,
- CodecSpecificConfigurationLtv::AudioChannelAllocation::NOT_ALLOWED},
+ {kLeAudioLocationMonoAudio,
+ CodecSpecificConfigurationLtv::AudioChannelAllocation::MONO},
{kLeAudioLocationFrontLeft,
CodecSpecificConfigurationLtv::AudioChannelAllocation::FRONT_LEFT},
{kLeAudioLocationFrontRight,
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
index 473777c..59c43a4 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
@@ -119,19 +119,36 @@
// Mapping octetsPerCodecFrame to bitdepth for easier comparison.
transport.bitdepth.push_back(codec_config.getOctetsPerCodecFrame());
transport.frameDurationUs.push_back(codec_config.getFrameDurationUs());
- switch (strategy_config.getAudioLocation()) {
- case setting::AudioLocation::MONO:
+ if (strategy_config.hasAudioLocation()) {
+ switch (strategy_config.getAudioLocation()) {
+ case setting::AudioLocation::MONO:
+ if (strategy_config_channel_count == 1)
+ transport.channelMode.push_back(ChannelMode::MONO);
+ else
+ transport.channelMode.push_back(ChannelMode::DUALMONO);
+ break;
+ case setting::AudioLocation::STEREO:
+ transport.channelMode.push_back(ChannelMode::STEREO);
+ break;
+ default:
+ transport.channelMode.push_back(ChannelMode::UNKNOWN);
+ break;
+ }
+ } else if (strategy_config.hasAudioChannelAllocation()) {
+ auto count =
+ std::bitset<32>(strategy_config.getAudioChannelAllocation()).count();
+ if (count <= 1) {
if (strategy_config_channel_count == 1)
transport.channelMode.push_back(ChannelMode::MONO);
else
transport.channelMode.push_back(ChannelMode::DUALMONO);
- break;
- case setting::AudioLocation::STEREO:
+ } else if (count == 2) {
transport.channelMode.push_back(ChannelMode::STEREO);
- break;
- default:
+ } else {
transport.channelMode.push_back(ChannelMode::UNKNOWN);
- break;
+ }
+ } else {
+ transport.channelMode.push_back(ChannelMode::UNKNOWN);
}
}
@@ -336,8 +353,12 @@
for (const auto& scenario : supported_scenarios) {
UnicastCapability unicast_encode_capability =
GetUnicastCapability(scenario.getEncode());
+ LOG(INFO) << __func__ << ": Unicast capability encode = "
+ << unicast_encode_capability.toString();
UnicastCapability unicast_decode_capability =
GetUnicastCapability(scenario.getDecode());
+ LOG(INFO) << __func__ << ": Unicast capability decode = "
+ << unicast_decode_capability.toString();
BroadcastCapability broadcast_capability = {.codecType =
CodecType::UNKNOWN};
@@ -384,22 +405,36 @@
return {.codecType = CodecType::UNKNOWN};
}
+ // Populate audio location
+ AudioLocation audio_location = AudioLocation::UNKNOWN;
+ if (strategy_configuration_iter->second.hasAudioLocation()) {
+ audio_location = GetAudioLocation(
+ strategy_configuration_iter->second.getAudioLocation());
+ }
+
+ // Populate audio channel allocation
+ std::optional<CodecSpecificConfigurationLtv::AudioChannelAllocation>
+ audio_channel_allocation = std::nullopt;
+ if (strategy_configuration_iter->second.hasAudioChannelAllocation()) {
+ LOG(INFO) << __func__ << ": has allocation";
+ CodecSpecificConfigurationLtv::AudioChannelAllocation tmp;
+ tmp.bitmask =
+ strategy_configuration_iter->second.getAudioChannelAllocation();
+ audio_channel_allocation = tmp;
+ }
+
CodecType codec_type =
GetCodecType(codec_configuration_iter->second.getCodec());
if (codec_type == CodecType::LC3) {
return ComposeUnicastCapability(
- codec_type,
- GetAudioLocation(
- strategy_configuration_iter->second.getAudioLocation()),
+ codec_type, audio_location, audio_channel_allocation,
strategy_configuration_iter->second.getConnectedDevice(),
strategy_configuration_iter->second.getChannelCount(),
ComposeLc3Capability(codec_configuration_iter->second));
} else if (codec_type == CodecType::APTX_ADAPTIVE_LE ||
codec_type == CodecType::APTX_ADAPTIVE_LEX) {
return ComposeUnicastCapability(
- codec_type,
- GetAudioLocation(
- strategy_configuration_iter->second.getAudioLocation()),
+ codec_type, audio_location, audio_channel_allocation,
strategy_configuration_iter->second.getConnectedDevice(),
strategy_configuration_iter->second.getChannelCount(),
ComposeAptxAdaptiveLeCapability(codec_configuration_iter->second));
@@ -435,11 +470,27 @@
std::vector<std::optional<Lc3Capabilities>> bcastLc3Cap(
1, std::optional(ComposeLc3Capability(codec_configuration_iter->second)));
+ // Populate audio location
+ AudioLocation audio_location = AudioLocation::UNKNOWN;
+ if (strategy_configuration_iter->second.hasAudioLocation()) {
+ audio_location = GetAudioLocation(
+ strategy_configuration_iter->second.getAudioLocation());
+ }
+
+ // Populate audio channel allocation
+ std::optional<CodecSpecificConfigurationLtv::AudioChannelAllocation>
+ audio_channel_allocation = std::nullopt;
+ if (strategy_configuration_iter->second.hasAudioChannelAllocation()) {
+ LOG(INFO) << __func__ << ": has allocation";
+ CodecSpecificConfigurationLtv::AudioChannelAllocation tmp;
+ tmp.bitmask =
+ strategy_configuration_iter->second.getAudioChannelAllocation();
+ audio_channel_allocation = tmp;
+ }
+
if (codec_type == CodecType::LC3) {
return ComposeBroadcastCapability(
- codec_type,
- GetAudioLocation(
- strategy_configuration_iter->second.getAudioLocation()),
+ codec_type, audio_location, audio_channel_allocation,
strategy_configuration_iter->second.getChannelCount(), bcastLc3Cap);
}
return {.codecType = CodecType::UNKNOWN};
@@ -448,16 +499,21 @@
template <class T>
BroadcastCapability BluetoothLeAudioCodecsProvider::ComposeBroadcastCapability(
const CodecType& codec_type, const AudioLocation& audio_location,
+ const std::optional<CodecSpecificConfigurationLtv::AudioChannelAllocation>&
+ audio_channel_allocation,
const uint8_t& channel_count, const std::vector<T>& capability) {
return {.codecType = codec_type,
.supportedChannel = audio_location,
.channelCountPerStream = channel_count,
- .leAudioCodecCapabilities = std::optional(capability)};
+ .leAudioCodecCapabilities = std::optional(capability),
+ .audioLocation = audio_channel_allocation};
}
template <class T>
UnicastCapability BluetoothLeAudioCodecsProvider::ComposeUnicastCapability(
const CodecType& codec_type, const AudioLocation& audio_location,
+ const std::optional<CodecSpecificConfigurationLtv::AudioChannelAllocation>&
+ audio_channel_allocation,
const uint8_t& device_cnt, const uint8_t& channel_count,
const T& capability) {
return {
@@ -467,6 +523,7 @@
.channelCountPerDevice = channel_count,
.leAudioCodecCapabilities =
UnicastCapability::LeAudioCodecCapabilities(capability),
+ .audioLocation = audio_channel_allocation,
};
}
@@ -519,38 +576,87 @@
codec_configuration.hasOctetsPerCodecFrame();
}
+bool IsValidStereoAudioLocation(
+ const setting::StrategyConfiguration& strategy_configuration) {
+ if ((strategy_configuration.getConnectedDevice() == 2 &&
+ strategy_configuration.getChannelCount() == 1) ||
+ (strategy_configuration.getConnectedDevice() == 1 &&
+ strategy_configuration.getChannelCount() == 2)) {
+ // Stereo
+ // 1. two connected device, one for L one for R
+ // 2. one connected device for both L and R
+ return true;
+ } else if (strategy_configuration.getConnectedDevice() == 0 &&
+ strategy_configuration.getChannelCount() == 2) {
+ // Broadcast
+ return true;
+ }
+ return false;
+}
+
+bool IsValidMonoAudioLocation(
+ const setting::StrategyConfiguration& strategy_configuration) {
+ if (strategy_configuration.getConnectedDevice() == 1 &&
+ strategy_configuration.getChannelCount() == 1) {
+ return true;
+ }
+ return false;
+}
+
+bool IsValidAudioLocation(
+ const setting::StrategyConfiguration& strategy_configuration) {
+ if (strategy_configuration.getAudioLocation() ==
+ setting::AudioLocation::STEREO)
+ return IsValidStereoAudioLocation(strategy_configuration);
+ else if (strategy_configuration.getAudioLocation() ==
+ setting::AudioLocation::MONO)
+ return IsValidMonoAudioLocation(strategy_configuration);
+ return false;
+}
+
+bool IsValidAudioChannelAllocation(
+ const setting::StrategyConfiguration& strategy_configuration) {
+ // First, ensure that there's only 2 bitmask enabled
+ int audio_channel_allocation =
+ strategy_configuration.getAudioChannelAllocation();
+ int count = 0;
+ for (int bit = 0; bit < 32; ++bit)
+ if (audio_channel_allocation & (1 << bit)) ++count;
+ if (count > 2) {
+ LOG(WARNING) << "Cannot parse more than 2 audio location, input is "
+ << audio_channel_allocation;
+ return false;
+ }
+
+ if (count == 2)
+ return IsValidStereoAudioLocation(strategy_configuration);
+ else
+ return IsValidMonoAudioLocation(strategy_configuration);
+}
+
bool BluetoothLeAudioCodecsProvider::IsValidStrategyConfiguration(
const setting::StrategyConfiguration& strategy_configuration) {
if (!strategy_configuration.hasName() ||
- !strategy_configuration.hasAudioLocation() ||
!strategy_configuration.hasConnectedDevice() ||
!strategy_configuration.hasChannelCount()) {
return false;
}
- if (strategy_configuration.getAudioLocation() ==
- setting::AudioLocation::STEREO) {
- if ((strategy_configuration.getConnectedDevice() == 2 &&
- strategy_configuration.getChannelCount() == 1) ||
- (strategy_configuration.getConnectedDevice() == 1 &&
- strategy_configuration.getChannelCount() == 2)) {
- // Stereo
- // 1. two connected device, one for L one for R
- // 2. one connected device for both L and R
- return true;
- } else if (strategy_configuration.getConnectedDevice() == 0 &&
- strategy_configuration.getChannelCount() == 2) {
- // Broadcast
- return true;
- }
- } else if (strategy_configuration.getAudioLocation() ==
- setting::AudioLocation::MONO) {
- if (strategy_configuration.getConnectedDevice() == 1 &&
- strategy_configuration.getChannelCount() == 1) {
- // Mono
- return true;
- }
- }
- return false;
+
+ // Both audio location field cannot be empty
+ if (!strategy_configuration.hasAudioLocation() &&
+ !strategy_configuration.hasAudioChannelAllocation())
+ return false;
+
+ // Any audio location field that presents must be valid
+ if (strategy_configuration.hasAudioLocation() &&
+ !IsValidAudioLocation(strategy_configuration))
+ return false;
+
+ if (strategy_configuration.hasAudioChannelAllocation() &&
+ !IsValidAudioChannelAllocation(strategy_configuration))
+ return false;
+
+ return true;
}
} // namespace audio
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h
index 5bf67e2..23b2bb6 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h
@@ -23,6 +23,7 @@
#include <vector>
#include "aidl/android/hardware/bluetooth/audio/CodecInfo.h"
+#include "aidl/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.h"
#include "aidl/android/hardware/bluetooth/audio/SessionType.h"
#include "aidl_android_hardware_bluetooth_audio_setting.h"
@@ -84,12 +85,18 @@
template <class T>
static inline UnicastCapability ComposeUnicastCapability(
const CodecType& codec_type, const AudioLocation& audio_location,
+ const std::optional<
+ CodecSpecificConfigurationLtv::AudioChannelAllocation>&
+ audio_channel_allocation,
const uint8_t& device_cnt, const uint8_t& channel_count,
const T& capability);
template <class T>
static inline BroadcastCapability ComposeBroadcastCapability(
const CodecType& codec_type, const AudioLocation& audio_location,
+ const std::optional<
+ CodecSpecificConfigurationLtv::AudioChannelAllocation>&
+ audio_channel_allocation,
const uint8_t& channel_count, const std::vector<T>& capability);
static inline Lc3Capabilities ComposeLc3Capability(
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
index dba2749..c47f7d5 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
@@ -64,19 +64,101 @@
static const StrategyConfiguration kValidStrategyStereoOneCis(
std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
std::make_optional(AudioLocation::STEREO), std::make_optional(2),
- std::make_optional(1));
+ std::make_optional(1), std::nullopt);
static const StrategyConfiguration kValidStrategyStereoTwoCis(
std::make_optional("STEREO_TWO_CISES_PER_DEVICE"),
std::make_optional(AudioLocation::STEREO), std::make_optional(1),
- std::make_optional(2));
+ std::make_optional(2), std::nullopt);
static const StrategyConfiguration kValidStrategyMonoOneCis(
std::make_optional("MONO_ONE_CIS_PER_DEVICE"),
std::make_optional(AudioLocation::MONO), std::make_optional(1),
- std::make_optional(1));
+ std::make_optional(1), std::nullopt);
static const StrategyConfiguration kValidStrategyBroadcastStereo(
std::make_optional("BROADCAST_STEREO"),
std::make_optional(AudioLocation::STEREO), std::make_optional(0),
- std::make_optional(2));
+ std::make_optional(2), std::nullopt);
+
+static const StrategyConfiguration kValidStrategyStereoOneCisInt(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"), std::nullopt,
+ std::make_optional(2), std::make_optional(1), std::make_optional(3));
+static const StrategyConfiguration kValidStrategyStereoTwoCisInt(
+ std::make_optional("STEREO_TWO_CISES_PER_DEVICE"), std::nullopt,
+ std::make_optional(1), std::make_optional(2), std::make_optional(3));
+static const StrategyConfiguration kValidStrategyMonoOneCisInt(
+ std::make_optional("MONO_ONE_CIS_PER_DEVICE"), std::nullopt,
+ std::make_optional(1), std::make_optional(1), std::make_optional(4));
+static const StrategyConfiguration kValidStrategyBroadcastStereoInt(
+ std::make_optional("BROADCAST_STEREO"), std::nullopt, std::make_optional(0),
+ std::make_optional(2), std::make_optional(3));
+
+static const StrategyConfiguration kValidStrategyStereoOneCisBoth(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(2),
+ std::make_optional(1), std::make_optional(3));
+static const StrategyConfiguration kValidStrategyStereoTwoCisBoth(
+ std::make_optional("STEREO_TWO_CISES_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(1),
+ std::make_optional(2), std::make_optional(3));
+static const StrategyConfiguration kValidStrategyMonoOneCisBoth(
+ std::make_optional("MONO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::MONO), std::make_optional(1),
+ std::make_optional(1), std::make_optional(4));
+static const StrategyConfiguration kValidStrategyBroadcastStereoBoth(
+ std::make_optional("BROADCAST_STEREO"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(0),
+ std::make_optional(2), std::make_optional(3));
+
+// List of all invalid strategy configuration
+const auto kInvalidStrategyStereoTwoCisTwoDevice = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(2),
+ std::make_optional(2), std::nullopt)});
+const auto kInvalidStrategyMonoTwoCisTwoDevice = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("MONO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(2),
+ std::make_optional(2), std::nullopt)});
+const auto kInvalidStrategyNoName = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::nullopt, std::make_optional(AudioLocation::STEREO),
+ std::make_optional(2), std::make_optional(1), std::nullopt)});
+const auto kInvalidStrategyNoLocation = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"), std::nullopt,
+ std::make_optional(2), std::make_optional(1), std::nullopt)});
+const auto kInvalidStrategyNoDevice = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::nullopt,
+ std::make_optional(1), std::nullopt)});
+const auto kInvalidStrategyNoChannel = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(2),
+ std::nullopt, std::nullopt)});
+const auto kInvalidStrategyIntMoreBitmask = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(2),
+ std::make_optional(1), std::make_optional(7))});
+const auto kInvalidStrategyIntStereoTwoCisTwoDevice = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"), std::nullopt,
+ std::make_optional(2), std::make_optional(2), std::make_optional(3))});
+const auto kInvalidStrategyIntMonoTwoCisTwoDevice = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("MONO_ONE_CIS_PER_DEVICE"), std::nullopt,
+ std::make_optional(2), std::make_optional(2), std::make_optional(4))});
+const auto kInvalidStrategyIntBroadcast = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("MONO_ONE_CIS_PER_DEVICE"), std::nullopt,
+ std::make_optional(0), std::make_optional(1), std::make_optional(3))});
+const auto kInvalidStrategyBothStereoMonoInt = StrategyConfigurationList(
+ std::vector<StrategyConfiguration>{StrategyConfiguration(
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(2),
+ std::make_optional(1), std::make_optional(4))});
// Define valid test list built from above valid components
// Scenario, Configuration, CodecConfiguration, StrategyConfiguration
@@ -88,11 +170,16 @@
static const std::vector<CodecConfigurationList> kValidCodecConfigurationList =
{CodecConfigurationList(
std::vector<CodecConfiguration>{kValidCodecLC3_16k_1})};
+
static const std::vector<StrategyConfigurationList>
kValidStrategyConfigurationList = {
StrategyConfigurationList(std::vector<StrategyConfiguration>{
kValidStrategyStereoOneCis, kValidStrategyStereoTwoCis,
- kValidStrategyMonoOneCis, kValidStrategyBroadcastStereo})};
+ kValidStrategyMonoOneCis, kValidStrategyBroadcastStereo,
+ kValidStrategyStereoOneCisInt, kValidStrategyStereoTwoCisInt,
+ kValidStrategyMonoOneCisInt, kValidStrategyBroadcastStereoInt,
+ kValidStrategyStereoOneCisBoth, kValidStrategyStereoTwoCisBoth,
+ kValidStrategyMonoOneCisBoth, kValidStrategyBroadcastStereoBoth})};
class BluetoothLeAudioCodecsProviderTest
: public ::testing::TestWithParam<OffloadSetting> {
@@ -270,49 +357,19 @@
static std::vector<StrategyConfigurationList>
CreateInvalidStrategyConfigurations() {
std::vector<StrategyConfigurationList>
- invalid_strategy_configuration_test_cases;
- invalid_strategy_configuration_test_cases.push_back(
- StrategyConfigurationList(
- std::vector<StrategyConfiguration>{StrategyConfiguration(
- std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
- std::make_optional(AudioLocation::STEREO),
- std::make_optional(2), std::make_optional(2))}));
-
- invalid_strategy_configuration_test_cases.push_back(
- StrategyConfigurationList(
- std::vector<StrategyConfiguration>{StrategyConfiguration(
- std::make_optional("MONO_ONE_CIS_PER_DEVICE"),
- std::make_optional(AudioLocation::STEREO),
- std::make_optional(2), std::make_optional(2))}));
-
- invalid_strategy_configuration_test_cases.push_back(
- StrategyConfigurationList(
- std::vector<StrategyConfiguration>{StrategyConfiguration(
- std::nullopt, std::make_optional(AudioLocation::STEREO),
- std::make_optional(2), std::make_optional(1))}));
-
- invalid_strategy_configuration_test_cases.push_back(
- StrategyConfigurationList(
- std::vector<StrategyConfiguration>{StrategyConfiguration(
- std::make_optional("STEREO_ONE_CIS_PER_DEVICE"), std::nullopt,
- std::make_optional(2), std::make_optional(1))}));
-
- invalid_strategy_configuration_test_cases.push_back(
- StrategyConfigurationList(
- std::vector<StrategyConfiguration>{StrategyConfiguration(
- std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
- std::make_optional(AudioLocation::STEREO), std::nullopt,
- std::make_optional(1))}));
-
- invalid_strategy_configuration_test_cases.push_back(
- StrategyConfigurationList(
- std::vector<StrategyConfiguration>{StrategyConfiguration(
- std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
- std::make_optional(AudioLocation::STEREO),
- std::make_optional(2), std::nullopt)}));
-
- invalid_strategy_configuration_test_cases.push_back(
- StrategyConfigurationList(std::vector<StrategyConfiguration>{}));
+ invalid_strategy_configuration_test_cases = {
+ kInvalidStrategyStereoTwoCisTwoDevice,
+ kInvalidStrategyMonoTwoCisTwoDevice,
+ kInvalidStrategyNoName,
+ kInvalidStrategyNoLocation,
+ kInvalidStrategyNoDevice,
+ kInvalidStrategyNoChannel,
+ kInvalidStrategyIntMoreBitmask,
+ kInvalidStrategyIntStereoTwoCisTwoDevice,
+ kInvalidStrategyIntMonoTwoCisTwoDevice,
+ kInvalidStrategyIntBroadcast,
+ kInvalidStrategyBothStereoMonoInt,
+ StrategyConfigurationList(std::vector<StrategyConfiguration>{})};
return invalid_strategy_configuration_test_cases;
}
diff --git a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml
index eaace78..b6ebbd9 100644
--- a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml
+++ b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml
@@ -69,9 +69,9 @@
<codecConfiguration name="APTX_ADAPTIVE_LEX_96k" codec="APTX_ADAPTIVE_LEX" samplingFrequency="96000" frameDurationUs="10000" octetsPerCodecFrame="816"/>
</codecConfigurationList>
<strategyConfigurationList>
- <strategyConfiguration name="STEREO_ONE_CIS_PER_DEVICE" audioLocation="STEREO" connectedDevice="2" channelCount="1"/>
- <strategyConfiguration name="STEREO_TWO_CISES_PER_DEVICE" audioLocation="STEREO" connectedDevice="1" channelCount="2"/>
- <strategyConfiguration name="MONO_ONE_CIS_PER_DEVICE" audioLocation="MONO" connectedDevice="1" channelCount="1"/>
- <strategyConfiguration name="BROADCAST_STEREO" audioLocation="STEREO" connectedDevice="0" channelCount="2"/>
+ <strategyConfiguration name="STEREO_ONE_CIS_PER_DEVICE" audioLocation="STEREO" connectedDevice="2" channelCount="1" audioChannelAllocation="3"/>
+ <strategyConfiguration name="STEREO_TWO_CISES_PER_DEVICE" audioLocation="STEREO" connectedDevice="1" channelCount="2" audioChannelAllocation="3"/>
+ <strategyConfiguration name="MONO_ONE_CIS_PER_DEVICE" audioLocation="MONO" connectedDevice="1" channelCount="1" audioChannelAllocation="4"/>
+ <strategyConfiguration name="BROADCAST_STEREO" audioLocation="STEREO" connectedDevice="0" channelCount="2" audioChannelAllocation="3"/>
</strategyConfigurationList>
</leAudioOffloadSetting>
diff --git a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd
index 03c8ade..d9ccab5 100644
--- a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd
+++ b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd
@@ -56,9 +56,12 @@
<xs:element name="strategyConfiguration">
<xs:complexType>
<xs:attribute name="name" type="xs:string"/>
+ <!-- Deprecated definition of Audio Location, please use audioLocationInt -->
<xs:attribute name="audioLocation" type="audioLocation"/>
<xs:attribute name="connectedDevice" type="xs:unsignedByte"/>
<xs:attribute name="channelCount" type="xs:unsignedByte"/>
+ <!-- Integer Audio Location to populate to audioLocation if present -->
+ <xs:attribute name="audioChannelAllocation" type="xs:int"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="audioLocation">
diff --git a/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt b/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
index a882174..b6c2f03 100644
--- a/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
+++ b/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
@@ -81,10 +81,12 @@
public class StrategyConfiguration {
ctor public StrategyConfiguration();
+ method public int getAudioChannelAllocation();
method public aidl.android.hardware.bluetooth.audio.setting.AudioLocation getAudioLocation();
method public short getChannelCount();
method public short getConnectedDevice();
method public String getName();
+ method public void setAudioChannelAllocation(int);
method public void setAudioLocation(aidl.android.hardware.bluetooth.audio.setting.AudioLocation);
method public void setChannelCount(short);
method public void setConnectedDevice(short);
diff --git a/bluetooth/socket/aidl/Android.bp b/bluetooth/socket/aidl/Android.bp
index 44e7f5a..77679f8 100644
--- a/bluetooth/socket/aidl/Android.bp
+++ b/bluetooth/socket/aidl/Android.bp
@@ -26,8 +26,14 @@
vendor_available: true,
host_supported: true,
srcs: ["android/hardware/bluetooth/socket/*.aidl"],
+ imports: [
+ "android.hardware.contexthub-V4",
+ ],
stability: "vintf",
backend: {
+ java: {
+ enabled: false,
+ },
ndk: {
apex_available: [
"//apex_available:platform",
diff --git a/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl b/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl
index e5b31c2..6844d31 100644
--- a/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl
+++ b/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl
@@ -38,6 +38,5 @@
String name;
int aclConnectionHandle;
android.hardware.bluetooth.socket.ChannelInfo channelInfo;
- long hubId;
- long endpointId;
+ android.hardware.contexthub.EndpointId endpointId;
}
diff --git a/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl b/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl
index 5e9be31..1f9be07 100644
--- a/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl
+++ b/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl
@@ -17,6 +17,7 @@
package android.hardware.bluetooth.socket;
import android.hardware.bluetooth.socket.ChannelInfo;
+import android.hardware.contexthub.EndpointId;
/**
* Socket context.
@@ -48,12 +49,7 @@
ChannelInfo channelInfo;
/**
- * The ID of the Hub to which the end point belongs for hardware offload data path.
+ * Unique identifier for an endpoint at the hardware offload data path.
*/
- long hubId;
-
- /**
- * The ID of the Hub endpoint for hardware offload data path.
- */
- long endpointId;
+ EndpointId endpointId;
}
diff --git a/bluetooth/socket/aidl/default/Android.bp b/bluetooth/socket/aidl/default/Android.bp
index 10e673c..a730057 100644
--- a/bluetooth/socket/aidl/default/Android.bp
+++ b/bluetooth/socket/aidl/default/Android.bp
@@ -32,6 +32,7 @@
],
static_libs: [
"android.hardware.bluetooth.socket-V1-ndk",
+ "android.hardware.contexthub-V4-ndk",
"liblog",
],
fuzz_config: {
diff --git a/bluetooth/socket/aidl/vts/Android.bp b/bluetooth/socket/aidl/vts/Android.bp
index fa9e3b1..174dd4b 100644
--- a/bluetooth/socket/aidl/vts/Android.bp
+++ b/bluetooth/socket/aidl/vts/Android.bp
@@ -18,6 +18,7 @@
],
static_libs: [
"android.hardware.bluetooth.socket-V1-ndk",
+ "android.hardware.contexthub-V4-ndk",
"libbluetooth-types",
],
test_suites: [
diff --git a/broadcastradio/aidl/default/fuzzer.cpp b/broadcastradio/aidl/default/fuzzer.cpp
index d535432..2492d47 100644
--- a/broadcastradio/aidl/default/fuzzer.cpp
+++ b/broadcastradio/aidl/default/fuzzer.cpp
@@ -24,6 +24,8 @@
using ::android::fuzzService;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ // TODO(b/183141167): need to rewrite 'dump' to avoid SIGPIPE.
+ signal(SIGPIPE, SIG_IGN);
const VirtualRadio& amFmRadioMock = VirtualRadio::getAmFmRadio();
std::shared_ptr<BroadcastRadio> amFmRadio =
::ndk::SharedRefBase::make<BroadcastRadio>(amFmRadioMock);
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index 8a3efa7..8d5a50a 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -312,7 +312,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.security.secretkeeper</name>
- <version>1</version>
+ <version>1-2</version>
<interface>
<name>ISecretkeeper</name>
<instance>default</instance>
@@ -543,7 +543,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.sensors</name>
- <version>2</version>
+ <version>2-3</version>
<interface>
<name>ISensors</name>
<instance>default</instance>
@@ -653,6 +653,15 @@
</interface>
</hal>
<hal format="aidl">
+ <name>android.hardware.virtualization.capabilities</name>
+ <version>1</version>
+ <interface>
+ <name>IVmCapabilitiesService</name>
+ <instance>default</instance>
+ <instance>noop</instance>
+ </interface>
+ </hal>
+ <hal format="aidl">
<name>android.hardware.weaver</name>
<version>2</version>
<interface>
diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp
index 4995a72..57e039c 100644
--- a/compatibility_matrices/exclude/fcm_exclude.cpp
+++ b/compatibility_matrices/exclude/fcm_exclude.cpp
@@ -171,6 +171,7 @@
"android.hardware.audio.core.sounddose@3",
// This is only used by a trusty VM
"android.hardware.security.see.authmgr@1",
+ "android.hardware.security.see.hdcp@1",
// Deprecated HALs.
"android.hardware.audio.sounddose@3",
diff --git a/configstore/1.1/default/Android.bp b/configstore/1.1/default/Android.bp
new file mode 100644
index 0000000..34470ad
--- /dev/null
+++ b/configstore/1.1/default/Android.bp
@@ -0,0 +1,142 @@
+// Copyright (C) 2024 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 {
+ // See: http://go/android-license-faq
+ default_applicable_licenses: [
+ "hardware_interfaces_license",
+ ],
+}
+
+soong_config_module_type {
+ name: "surfaceflinger_cc_defaults_type",
+ module_type: "cc_defaults",
+ config_namespace: "surfaceflinger",
+ value_variables: [
+ "vsync_event_phase_offset_ns",
+ "sf_vsync_event_phase_offset_ns",
+ "present_time_offset_from_vsync_ns",
+ "max_virtual_displat_dimension",
+ "num_framebuffer_surface_buffers",
+ "sf_primary_display_orientation",
+ ],
+ bool_variables: [
+ "use_context_priority",
+ "has_wide_color_display",
+ "has_hdr_display",
+ "force_hwc_copy_for_virtual_displays",
+ "running_without_sync_framework",
+ "use_vr_flinger",
+ "sf_start_graphics_allocator_service",
+ ],
+ properties: [
+ "cflags",
+ ],
+}
+
+surfaceflinger_cc_defaults_type {
+ name: "surfaceflinger_cc_defaults",
+ srcs: [
+ "SurfaceFlingerConfigs.cpp",
+ ],
+ soong_config_variables: {
+ vsync_event_phase_offset_ns: {
+ cflags: ["-DVSYNC_EVENT_PHASE_OFFSET_NS=%s"],
+ },
+ sf_vsync_event_phase_offset_ns: {
+ cflags: ["-DSF_VSYNC_EVENT_PHASE_OFFSET_NS=%s"],
+ },
+ present_time_offset_from_vsync_ns: {
+ cflags: ["-DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=%s"],
+ },
+ max_virtual_displat_dimension: {
+ cflags: ["-DMAX_VIRTUAL_DISPLAY_DIMENSION=%s"],
+ },
+ num_framebuffer_surface_buffers: {
+ cflags: ["-DNUM_FRAMEBUFFER_SURFACE_BUFFERS=%s"],
+ },
+ sf_primary_display_orientation: {
+ cflags: ["-DPRIMARY_DISPLAY_ORIENTATION=%s"],
+ },
+ use_context_priority: {
+ cflags: ["-DUSE_CONTEXT_PRIORITY=1"],
+ },
+ has_wide_color_display: {
+ cflags: ["-DHAS_WIDE_COLOR_DISPLAY"],
+ },
+ has_hdr_display: {
+ cflags: ["-DHAS_HDR_DISPLAY"],
+ },
+ force_hwc_copy_for_virtual_displays: {
+ cflags: ["-DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS"],
+ },
+ running_without_sync_framework: {
+ cflags: ["-DRUNNING_WITHOUT_SYNC_FRAMEWORK"],
+ },
+ use_vr_flinger: {
+ cflags: ["-DUSE_VR_FLINGER"],
+ },
+ sf_start_graphics_allocator_service: {
+ cflags: ["-DSTART_GRAPHICS_ALLOCATOR_SERVICE"],
+ },
+ },
+}
+
+cc_binary {
+ name: "android.hardware.configstore@1.1-service",
+ srcs: ["service.cpp"],
+ vendor: true,
+ relative_install_path: "hw",
+ init_rc: ["android.hardware.configstore@1.1-service.rc"],
+ shared_libs: [
+ "libhidlbase",
+ "libbase",
+ "libhwminijail",
+ "liblog",
+ "libutils",
+ "android.hardware.configstore@1.0",
+ "android.hardware.configstore@1.1",
+ ],
+ defaults: [
+ "surfaceflinger_cc_defaults",
+ ],
+ required: select((arch(), soong_config_variable("ANDROID", "GCOV_COVERAGE")), {
+ ("arm64", false): ["configstore@1.1.policy"],
+ (default, default): [],
+ }),
+}
+
+// Only build for arm64
+prebuilt_etc {
+ name: "configstore@1.1.policy",
+ relative_install_path: "seccomp_policy",
+ proprietary: true,
+ enabled: false,
+ arch: {
+ arm64: {
+ src: "seccomp_policy/configstore@1.1-arm64.policy",
+ enabled: true,
+ },
+ },
+}
+
+// disable configstore
+cc_binary {
+ name: "disable_configstore",
+ installable: false,
+ srcs: ["disable_configstore.cpp"],
+ overrides: ["android.hardware.configstore@1.1-service"],
+ vendor: true,
+}
diff --git a/configstore/1.1/default/Android.mk b/configstore/1.1/default/Android.mk
deleted file mode 100644
index 9a6f0fc..0000000
--- a/configstore/1.1/default/Android.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.configstore@1.1-service
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
-# seccomp is not required for coverage build.
-ifneq ($(NATIVE_COVERAGE),true)
-LOCAL_REQUIRED_MODULES_arm64 := configstore@1.1.policy
-endif
-LOCAL_VENDOR_MODULE := true
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_INIT_RC := android.hardware.configstore@1.1-service.rc
-LOCAL_SRC_FILES:= service.cpp
-
-include $(LOCAL_PATH)/surfaceflinger.mk
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libbase \
- libhwminijail \
- liblog \
- libutils \
- android.hardware.configstore@1.0 \
- android.hardware.configstore@1.1
-
-include $(BUILD_EXECUTABLE)
-
-# seccomp filter for configstore
-ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), arm64))
-include $(CLEAR_VARS)
-LOCAL_MODULE := configstore@1.1.policy
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/seccomp_policy
-LOCAL_SRC_FILES := seccomp_policy/configstore@1.1-$(TARGET_ARCH).policy
-include $(BUILD_PREBUILT)
-endif
-
-# disable configstore
-include $(CLEAR_VARS)
-LOCAL_MODULE := disable_configstore
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_SRC_FILES:= disable_configstore.cpp
-LOCAL_OVERRIDES_MODULES := android.hardware.configstore@1.1-service
-LOCAL_VENDOR_MODULE := true
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_EXECUTABLE)
diff --git a/configstore/1.1/default/surfaceflinger.mk b/configstore/1.1/default/surfaceflinger.mk
index 35922eb..462fe85 100644
--- a/configstore/1.1/default/surfaceflinger.mk
+++ b/configstore/1.1/default/surfaceflinger.mk
@@ -2,55 +2,69 @@
LOCAL_SRC_FILES += SurfaceFlingerConfigs.cpp
ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
+ $(call soong_config_set,surfaceflinger,vsync_event_phase_offset_ns,$(VSYNC_EVENT_PHASE_OFFSET_NS))
LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
endif
ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
+ $(call soong_config_set,surfaceflinger,sf_vsync_event_phase_offset_ns,$(SF_VSYNC_EVENT_PHASE_OFFSET_NS))
LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
endif
ifeq ($(TARGET_USE_CONTEXT_PRIORITY),true)
+ $(call soong_config_set_bool,surfaceflinger,use_context_priority,true)
LOCAL_CFLAGS += -DUSE_CONTEXT_PRIORITY=1
endif
ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY),true)
+ $(call soong_config_set_bool,surfaceflinger,has_wide_color_display,true)
LOCAL_CFLAGS += -DHAS_WIDE_COLOR_DISPLAY
endif
ifeq ($(TARGET_HAS_HDR_DISPLAY),true)
+ $(call soong_config_set_bool,surfaceflinger,has_hdr_display,true)
LOCAL_CFLAGS += -DHAS_HDR_DISPLAY
endif
ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
+ $(call soong_config_set,surfaceflinger,present_time_offset_from_vsync_ns,$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS))
LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
else
+ $(call soong_config_set,surfaceflinger,present_time_offset_from_vsync_ns,0)
LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
endif
ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
+ $(call soong_config_set_bool,surfaceflinger,force_hwc_copy_for_virtual_displays,true)
LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
endif
ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
+ $(call soong_config_set,surfaceflinger,max_virtual_displat_dimension,$(MAX_VIRTUAL_DISPLAY_DIMENSION))
LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
endif
ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
+ $(call soong_config_set_bool,surfaceflinger,running_without_sync_framework,true)
LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
endif
ifneq ($(USE_VR_FLINGER),)
+ $(call soong_config_set_bool,surfaceflinger,use_vr_flinger,true)
LOCAL_CFLAGS += -DUSE_VR_FLINGER
endif
ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
+ $(call soong_config_set,surfaceflinger,num_framebuffer_surface_buffers,$(NUM_FRAMEBUFFER_SURFACE_BUFFERS))
LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
endif
ifneq ($(SF_START_GRAPHICS_ALLOCATOR_SERVICE),)
+ $(call soong_config_set_bool,surfaceflinger,sf_start_graphics_allocator_service,true)
LOCAL_CFLAGS += -DSTART_GRAPHICS_ALLOCATOR_SERVICE
endif
ifneq ($(SF_PRIMARY_DISPLAY_ORIENTATION),)
+ $(call soong_config_set,surfaceflinger,sf_primary_display_orientation,$(SF_PRIMARY_DISPLAY_ORIENTATION))
LOCAL_CFLAGS += -DPRIMARY_DISPLAY_ORIENTATION=$(SF_PRIMARY_DISPLAY_ORIENTATION)
endif
diff --git a/contexthub/aidl/Android.bp b/contexthub/aidl/Android.bp
index eaa47c6..674f8af 100644
--- a/contexthub/aidl/Android.bp
+++ b/contexthub/aidl/Android.bp
@@ -33,7 +33,12 @@
sdk_version: "module_current",
},
ndk: {
- apps_enabled: false,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.btservices",
+ ],
+ min_sdk_version: "33",
+ apps_enabled: true,
},
rust: {
enabled: true,
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
index 93b8ff5..2646d15 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
@@ -54,7 +54,7 @@
void registerEndpoint(in android.hardware.contexthub.EndpointInfo endpoint);
void unregisterEndpoint(in android.hardware.contexthub.EndpointInfo endpoint);
void registerEndpointCallback(in android.hardware.contexthub.IEndpointCallback callback);
- int[] requestSessionIdRange(int size);
+ int[2] requestSessionIdRange(int size);
void openEndpointSession(int sessionId, in android.hardware.contexthub.EndpointId destination, in android.hardware.contexthub.EndpointId initiator, in @nullable String serviceDescriptor);
void sendMessageToEndpoint(int sessionId, in android.hardware.contexthub.Message msg);
void sendMessageDeliveryStatusToEndpoint(int sessionId, in android.hardware.contexthub.MessageDeliveryStatus msgStatus);
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Reason.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Reason.aidl
index a315438..b285337 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Reason.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Reason.aidl
@@ -43,4 +43,5 @@
ENDPOINT_GONE,
ENDPOINT_CRASHED,
HUB_RESET,
+ PERMISSION_DENIED,
}
diff --git a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
index 83f73c3..eb6d051 100644
--- a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
@@ -303,7 +303,7 @@
* @throws EX_ILLEGAL_ARGUMENT if the size is invalid.
* @throws EX_SERVICE_SPECIFIC if the id range requested cannot be allocated.
*/
- int[] requestSessionIdRange(int size);
+ int[2] requestSessionIdRange(int size);
/**
* Request to open a session for communication between an endpoint previously registered by the
diff --git a/contexthub/aidl/android/hardware/contexthub/Reason.aidl b/contexthub/aidl/android/hardware/contexthub/Reason.aidl
index 65d9f8a..8a86f94 100644
--- a/contexthub/aidl/android/hardware/contexthub/Reason.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/Reason.aidl
@@ -63,4 +63,9 @@
* Hub was reset or is resetting.
*/
HUB_RESET,
+
+ /**
+ * The caller does not have the required permissions.
+ */
+ PERMISSION_DENIED,
}
diff --git a/contexthub/aidl/default/ContextHub.cpp b/contexthub/aidl/default/ContextHub.cpp
index 4ae9c09..7eb51d0 100644
--- a/contexthub/aidl/default/ContextHub.cpp
+++ b/contexthub/aidl/default/ContextHub.cpp
@@ -15,6 +15,7 @@
*/
#include "contexthub-impl/ContextHub.h"
+#include "aidl/android/hardware/contexthub/IContextHubCallback.h"
#ifndef LOG_TAG
#define LOG_TAG "CHRE"
@@ -22,6 +23,8 @@
#include <inttypes.h>
#include <log/log.h>
+#include <optional>
+#include <thread>
using ::ndk::ScopedAStatus;
@@ -62,6 +65,9 @@
},
};
+//! Mutex used to ensure callbacks are called after the initial function returns.
+std::mutex gCallbackMutex;
+
} // anonymous namespace
ScopedAStatus ContextHub::getContextHubs(std::vector<ContextHubInfo>* out_contextHubInfos) {
@@ -286,7 +292,7 @@
};
ScopedAStatus ContextHub::requestSessionIdRange(int32_t in_size,
- std::vector<int32_t>* _aidl_return) {
+ std::array<int32_t, 2>* _aidl_return) {
constexpr int32_t kMaxSize = 1024;
if (in_size > kMaxSize || _aidl_return == nullptr) {
return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
@@ -297,8 +303,8 @@
mMaxValidSessionId = in_size;
}
- _aidl_return->push_back(0);
- _aidl_return->push_back(in_size);
+ (*_aidl_return)[0] = 0;
+ (*_aidl_return)[1] = in_size;
return ScopedAStatus::ok();
};
@@ -308,7 +314,7 @@
// We are not calling onCloseEndpointSession on failure because the remote endpoints (our
// mock endpoints) always accept the session.
- std::shared_ptr<IEndpointCallback> callback = nullptr;
+ std::weak_ptr<IEndpointCallback> callback;
{
std::unique_lock<std::mutex> lock(mEndpointMutex);
if (in_sessionId > mMaxValidSessionId) {
@@ -355,23 +361,27 @@
.serviceDescriptor = in_serviceDescriptor,
});
- if (mEndpointCallback != nullptr) {
- callback = mEndpointCallback;
+ if (mEndpointCallback == nullptr) {
+ return ScopedAStatus::ok();
}
+ callback = mEndpointCallback;
}
- if (callback != nullptr) {
- callback->onEndpointSessionOpenComplete(in_sessionId);
- }
+ std::unique_lock<std::mutex> lock(gCallbackMutex);
+ std::thread{[callback, in_sessionId]() {
+ std::unique_lock<std::mutex> lock(gCallbackMutex);
+ if (auto cb = callback.lock(); cb != nullptr) {
+ cb->onEndpointSessionOpenComplete(in_sessionId);
+ }
+ }}.detach();
return ScopedAStatus::ok();
};
ScopedAStatus ContextHub::sendMessageToEndpoint(int32_t in_sessionId, const Message& in_msg) {
- bool foundSession = false;
- std::shared_ptr<IEndpointCallback> callback = nullptr;
+ std::weak_ptr<IEndpointCallback> callback;
{
std::unique_lock<std::mutex> lock(mEndpointMutex);
-
+ bool foundSession = false;
for (const EndpointSession& session : mEndpointSessions) {
if (session.sessionId == in_sessionId) {
foundSession = true;
@@ -379,27 +389,38 @@
}
}
- if (mEndpointCallback != nullptr) {
- callback = mEndpointCallback;
- }
- }
-
- if (!foundSession) {
- ALOGE("sendMessageToEndpoint: session ID %" PRId32 " is invalid", in_sessionId);
- return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
- }
-
- if (callback != nullptr) {
- if (in_msg.flags & Message::FLAG_REQUIRES_DELIVERY_STATUS) {
- MessageDeliveryStatus msgStatus = {};
- msgStatus.messageSequenceNumber = in_msg.sequenceNumber;
- msgStatus.errorCode = ErrorCode::OK;
- callback->onMessageDeliveryStatusReceived(in_sessionId, msgStatus);
+ if (!foundSession) {
+ ALOGE("sendMessageToEndpoint: session ID %" PRId32 " is invalid", in_sessionId);
+ return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
- // Echo the message back
- callback->onMessageReceived(in_sessionId, in_msg);
+ if (mEndpointCallback == nullptr) {
+ return ScopedAStatus::ok();
+ }
+ callback = mEndpointCallback;
}
+
+ std::unique_lock<std::mutex> lock(gCallbackMutex);
+ if ((in_msg.flags & Message::FLAG_REQUIRES_DELIVERY_STATUS) != 0) {
+ MessageDeliveryStatus msgStatus = {};
+ msgStatus.messageSequenceNumber = in_msg.sequenceNumber;
+ msgStatus.errorCode = ErrorCode::OK;
+
+ std::thread{[callback, in_sessionId, msgStatus]() {
+ std::unique_lock<std::mutex> lock(gCallbackMutex);
+ if (auto cb = callback.lock(); cb != nullptr) {
+ cb->onMessageDeliveryStatusReceived(in_sessionId, msgStatus);
+ }
+ }}.detach();
+ }
+
+ // Echo the message back
+ std::thread{[callback, in_sessionId, in_msg]() {
+ std::unique_lock<std::mutex> lock(gCallbackMutex);
+ if (auto cb = callback.lock(); cb != nullptr) {
+ cb->onMessageReceived(in_sessionId, in_msg);
+ }
+ }}.detach();
return ScopedAStatus::ok();
};
diff --git a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
index 4968878..6da8bf2 100644
--- a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
+++ b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
@@ -61,7 +61,7 @@
::ndk::ScopedAStatus registerEndpointCallback(
const std::shared_ptr<IEndpointCallback>& in_callback) override;
::ndk::ScopedAStatus requestSessionIdRange(int32_t in_size,
- std::vector<int32_t>* _aidl_return) override;
+ std::array<int32_t, 2>* _aidl_return) override;
::ndk::ScopedAStatus openEndpointSession(
int32_t in_sessionId, const EndpointId& in_destination, const EndpointId& in_initiator,
const std::optional<std::string>& in_serviceDescriptor) override;
diff --git a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
index 95a96cd..02f0653 100644
--- a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
+++ b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
@@ -492,7 +492,11 @@
}
Status onMessageReceived(int32_t /* sessionId */, const Message& message) override {
- mMessages.push_back(message);
+ {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mMessages.push_back(message);
+ }
+ mCondVar.notify_one();
return Status::ok();
}
@@ -513,21 +517,30 @@
}
Status onEndpointSessionOpenComplete(int32_t /* sessionId */) override {
- mWasOnEndpointSessionOpenCompleteCalled = true;
+ {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mWasOnEndpointSessionOpenCompleteCalled = true;
+ }
+ mCondVar.notify_one();
return Status::ok();
}
- std::vector<Message> getMessages() { return mMessages; }
-
bool wasOnEndpointSessionOpenCompleteCalled() {
return mWasOnEndpointSessionOpenCompleteCalled;
}
+
void resetWasOnEndpointSessionOpenCompleteCalled() {
mWasOnEndpointSessionOpenCompleteCalled = false;
}
+ std::mutex& getMutex() { return mMutex; }
+ std::condition_variable& getCondVar() { return mCondVar; }
+ std::vector<Message> getMessages() { return mMessages; }
+
private:
std::vector<Message> mMessages;
+ std::mutex mMutex;
+ std::condition_variable mCondVar;
bool mWasOnEndpointSessionOpenCompleteCalled = false;
};
@@ -684,20 +697,18 @@
// Request the range
constexpr int32_t requestedRange = 100;
- std::vector<int32_t> range;
+ std::array<int32_t, 2> range;
ASSERT_TRUE(contextHub->requestSessionIdRange(requestedRange, &range).isOk());
EXPECT_EQ(range.size(), 2);
EXPECT_GE(range[1] - range[0] + 1, requestedRange);
// Open the session
- cb->resetWasOnEndpointSessionOpenCompleteCalled();
int32_t sessionId = range[1] + 10; // invalid
EXPECT_FALSE(contextHub
->openEndpointSession(sessionId, destinationEndpoint->id,
initiatorEndpoint.id,
/* in_serviceDescriptor= */ String16("ECHO"))
.isOk());
- EXPECT_FALSE(cb->wasOnEndpointSessionOpenCompleteCalled());
}
TEST_P(ContextHubAidl, OpenEndpointSessionAndSendMessageEchoesBack) {
@@ -710,6 +721,8 @@
EXPECT_TRUE(status.isOk());
}
+ std::unique_lock<std::mutex> lock(cb->getMutex());
+
// Register the endpoint
EndpointInfo initiatorEndpoint;
initiatorEndpoint.id.id = 8;
@@ -737,7 +750,7 @@
// Request the range
constexpr int32_t requestedRange = 100;
- std::vector<int32_t> range;
+ std::array<int32_t, 2> range;
ASSERT_TRUE(contextHub->requestSessionIdRange(requestedRange, &range).isOk());
EXPECT_EQ(range.size(), 2);
EXPECT_GE(range[1] - range[0] + 1, requestedRange);
@@ -750,6 +763,7 @@
initiatorEndpoint.id,
/* in_serviceDescriptor= */ String16("ECHO"))
.isOk());
+ cb->getCondVar().wait(lock);
EXPECT_TRUE(cb->wasOnEndpointSessionOpenCompleteCalled());
// Send the message
@@ -760,6 +774,7 @@
ASSERT_TRUE(contextHub->sendMessageToEndpoint(sessionId, message).isOk());
// Check for echo
+ cb->getCondVar().wait(lock);
EXPECT_FALSE(cb->getMessages().empty());
EXPECT_EQ(cb->getMessages().back().content.back(), 42);
}
diff --git a/drm/Android.bp b/drm/Android.bp
new file mode 100644
index 0000000..35c1b03
--- /dev/null
+++ b/drm/Android.bp
@@ -0,0 +1,5 @@
+dirgroup {
+ name: "trusty_dirgroup_hardware_interfaces_drm",
+ dirs: ["."],
+ visibility: ["//trusty/vendor/google/aosp/scripts"],
+}
diff --git a/drm/aidl/Android.bp b/drm/aidl/Android.bp
index 827621c..7ee8c34 100644
--- a/drm/aidl/Android.bp
+++ b/drm/aidl/Android.bp
@@ -27,6 +27,9 @@
ndk: {
min_sdk_version: "34",
},
+ rust: {
+ enabled: true,
+ },
},
double_loadable: true,
versions_with_info: [
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
index 5f8fee7..1df2123 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
@@ -43,7 +43,7 @@
@VintfStability
parcelable GnssSatelliteCorrections {
int svid;
- android.hardware.gnss.gnss_assistance.IonosphericCorrection[] inonosphericCorrections;
+ android.hardware.gnss.gnss_assistance.IonosphericCorrection[] ionosphericCorrections;
}
@VintfStability
parcelable GpsAssistance {
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl
index e02d97f..6e8434a 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl
@@ -36,5 +36,5 @@
@VintfStability
parcelable IonosphericCorrection {
long carrierFrequencyHz;
- android.hardware.gnss.gnss_assistance.GnssCorrectionComponent ionosphericCorrection;
+ android.hardware.gnss.gnss_assistance.GnssCorrectionComponent ionosphericCorrectionComponent;
}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
index ddff848..4bf6154 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
@@ -46,7 +46,7 @@
* OSN number for Glonass. The distinction is made by looking at the constellation field.
* Values must be in the range of:
*
- * - GNSS: 1-32
+ * - GPS: 1-32
* - GLONASS: 1-25
* - QZSS: 183-206
* - Galileo: 1-36
@@ -55,7 +55,7 @@
int svid;
/** Ionospheric corrections */
- IonosphericCorrection[] inonosphericCorrections;
+ IonosphericCorrection[] ionosphericCorrections;
}
/** Contains GPS assistance. */
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl
index e8e50bd..fe6b63d 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl
@@ -31,6 +31,6 @@
*/
long carrierFrequencyHz;
- /** Ionospheric correction. */
- GnssCorrectionComponent ionosphericCorrection;
+ /** Ionospheric correction component. */
+ GnssCorrectionComponent ionosphericCorrectionComponent;
}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
index 4a4122c..10a511f 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
@@ -29,7 +29,7 @@
* OSN number for Glonass. The distinction is made by looking at the constellation field.
* Values must be in the range of:
*
- * - GNSS: 1-32
+ * - GPS: 1-32
* - GLONASS: 1-25
* - QZSS: 183-206
* - Galileo: 1-36
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
index adbc344..1e568b9 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -89,6 +89,7 @@
oneway void notifyExpectedPresent(long display, in android.hardware.graphics.composer3.ClockMonotonicTimestamp expectedPresentTime, int frameIntervalNs);
int getMaxLayerPictureProfiles(long display);
oneway void startHdcpNegotiation(long display, in android.hardware.drm.HdcpLevels levels);
+ android.hardware.graphics.composer3.Luts[] getLuts(long display, in android.hardware.graphics.composer3.Buffer[] buffers);
const int EX_BAD_CONFIG = 1;
const int EX_BAD_DISPLAY = 2;
const int EX_BAD_LAYER = 3;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index b4d2e7f..7556962 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -22,6 +22,7 @@
import android.hardware.graphics.common.HdrConversionCapability;
import android.hardware.graphics.common.HdrConversionStrategy;
import android.hardware.graphics.common.Transform;
+import android.hardware.graphics.composer3.Buffer;
import android.hardware.graphics.composer3.ClientTargetProperty;
import android.hardware.graphics.composer3.ClockMonotonicTimestamp;
import android.hardware.graphics.composer3.ColorMode;
@@ -38,6 +39,7 @@
import android.hardware.graphics.composer3.FormatColorComponent;
import android.hardware.graphics.composer3.HdrCapabilities;
import android.hardware.graphics.composer3.IComposerCallback;
+import android.hardware.graphics.composer3.Luts;
import android.hardware.graphics.composer3.OverlayProperties;
import android.hardware.graphics.composer3.PerFrameMetadataKey;
import android.hardware.graphics.composer3.PowerMode;
@@ -956,4 +958,12 @@
*
*/
oneway void startHdcpNegotiation(long display, in HdcpLevels levels);
+
+ /*
+ * Returns the Luts based on the buffers.
+ *
+ * @param display is the display for which the luts are requested.
+ * @param buffers is the buffer where the luts can be computed from
+ */
+ Luts[] getLuts(long display, in Buffer[] buffers);
}
diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerServiceWriter.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerServiceWriter.h
index b50b84b..9dce140 100644
--- a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerServiceWriter.h
+++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerServiceWriter.h
@@ -116,6 +116,13 @@
mCommandsResults.emplace_back(std::move(clientTargetPropertyWithBrightness));
}
+ void setDisplayLuts(int64_t display, std::vector<DisplayLuts::LayerLut> layerLuts) {
+ DisplayLuts displayLuts;
+ displayLuts.display = display;
+ displayLuts.layerLuts = std::move(layerLuts);
+ mCommandsResults.emplace_back(std::move(displayLuts));
+ }
+
std::vector<CommandResultPayload> getPendingCommandResults() {
return std::move(mCommandsResults);
}
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 2c53377..c1900d7 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -3362,15 +3362,11 @@
mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount, &writer);
EXPECT_TRUE(layerStatus.isOk());
const auto& [status, properties] = mComposerClient->getOverlaySupport();
- if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
- status.getServiceSpecificError() == IComposerClient::EX_UNSUPPORTED) {
- GTEST_SUCCEED() << "getOverlaySupport is not supported";
- return;
- }
- ASSERT_TRUE(status.isOk());
// TODO (b/362319189): add Lut VTS enforcement
- if (!properties.lutProperties) {
+ if ((!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
+ status.getServiceSpecificError() == IComposerClient::EX_UNSUPPORTED) ||
+ (status.isOk() && !properties.lutProperties)) {
int32_t size = 7;
size_t bufferSize = static_cast<size_t>(size) * sizeof(float);
int32_t fd = ashmem_create_region("lut_shared_mem", bufferSize);
@@ -3384,13 +3380,22 @@
{LutProperties::Dimension::ONE_D, size, {LutProperties::SamplingKey::RGB}}};
luts.pfd = ndk::ScopedFileDescriptor(fd);
+ const auto layer = createOnScreenLayer(getPrimaryDisplayId());
+ const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer->handle);
+ writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, buffer->handle,
+ /*acquireFence*/ -1);
writer.setLayerLuts(getPrimaryDisplayId(), layer, luts);
writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
VtsComposerClient::kNoFrameIntervalNs);
execute();
+ const auto errors = mReader.takeErrors();
+ if (errors.size() == 1 && errors[0].errorCode == IComposerClient::EX_UNSUPPORTED) {
+ GTEST_SUCCEED() << "setLayerLuts is not supported";
+ return;
+ }
// change to client composition
ASSERT_FALSE(mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty());
- ASSERT_TRUE(mReader.takeErrors().empty());
}
}
diff --git a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
index 548a793..d993040 100644
--- a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
+++ b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
@@ -60,6 +60,6 @@
android.hardware.health.BatteryChargingState chargingState;
android.hardware.health.BatteryChargingPolicy chargingPolicy;
@nullable android.hardware.health.BatteryHealthData batteryHealthData;
- @nullable android.hardware.health.HingeInfo[] foldInfos;
+ @nullable android.hardware.health.HingeInfo[] hingeInfos;
const int BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED = (-1) /* -1 */;
}
diff --git a/health/aidl/android/hardware/health/HealthInfo.aidl b/health/aidl/android/hardware/health/HealthInfo.aidl
index 12a397a..1c953ee 100644
--- a/health/aidl/android/hardware/health/HealthInfo.aidl
+++ b/health/aidl/android/hardware/health/HealthInfo.aidl
@@ -151,5 +151,5 @@
/**
* Information about foldable hinge health. Will be an empty vector if no hinges present
*/
- @nullable HingeInfo[] foldInfos;
+ @nullable HingeInfo[] hingeInfos;
}
diff --git a/health/aidl/android/hardware/health/HingeInfo.aidl b/health/aidl/android/hardware/health/HingeInfo.aidl
index 19b46df..ad38821 100644
--- a/health/aidl/android/hardware/health/HingeInfo.aidl
+++ b/health/aidl/android/hardware/health/HingeInfo.aidl
@@ -27,7 +27,9 @@
/**
* returns count of times a given hinge has been folded.
*
- * opening fully counts as 1 fold and closing fully counts as another
+ * opening fully counts as 1 fold and closing fully counts as another.
+ * The hinge has to engage in its full range of motion to be considered
+ * a fold. Partial folds must not be counted.
*/
int numTimesFolded;
/**
diff --git a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
index c47ddca..a44cd5e 100644
--- a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
+++ b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
@@ -368,7 +368,8 @@
ASSERT_THAT(status, AnyOf(IsOk(), ExceptionIs(EX_UNSUPPORTED_OPERATION)));
if (!status.isOk()) return;
for (auto& hinge : value) {
- ASSERT_TRUE(hinge.expectedHingeLifespan > 0);
+ ASSERT_TRUE(hinge.expectedHingeLifespan >= 0);
+ ASSERT_TRUE(hinge.numTimesFolded >= 0);
}
}
diff --git a/neuralnetworks/1.2/utils/test/DeviceTest.cpp b/neuralnetworks/1.2/utils/test/DeviceTest.cpp
index 0e855c4..0d8c141 100644
--- a/neuralnetworks/1.2/utils/test/DeviceTest.cpp
+++ b/neuralnetworks/1.2/utils/test/DeviceTest.cpp
@@ -54,10 +54,6 @@
.execTime = std::numeric_limits<float>::max(),
.powerUsage = std::numeric_limits<float>::max()};
-// FIXME: This function causes Clang to hang indefinitely when building with
-// -O1. Turn off optimization as a temporary workaround.
-// http://b/296850773
-#pragma clang optimize off
template <typename... Args>
auto makeCallbackReturn(Args&&... args) {
return [argPack = std::make_tuple(std::forward<Args>(args)...)](const auto& cb) {
@@ -65,7 +61,6 @@
return Void();
};
}
-#pragma clang optimize on
sp<MockDevice> createMockDevice() {
const auto mockDevice = MockDevice::create();
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl
index df31618..f6b32d0 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl
@@ -42,4 +42,6 @@
GPU_LOAD_UP = 5,
GPU_LOAD_DOWN = 6,
GPU_LOAD_RESET = 7,
+ CPU_LOAD_SPIKE = 8,
+ GPU_LOAD_SPIKE = 9,
}
diff --git a/power/aidl/android/hardware/power/SessionHint.aidl b/power/aidl/android/hardware/power/SessionHint.aidl
index 1a8c505..1b8a3dd 100644
--- a/power/aidl/android/hardware/power/SessionHint.aidl
+++ b/power/aidl/android/hardware/power/SessionHint.aidl
@@ -72,4 +72,18 @@
* baseline to prepare for an arbitrary load, and must wake up if inactive.
*/
GPU_LOAD_RESET = 7,
+
+ /**
+ * This hint indicates an upcoming CPU workload that is abnormally large and
+ * not representative of the workload. This should be used for rare, one-time
+ * operations and should be ignored by any load tracking or session hysteresis.
+ */
+ CPU_LOAD_SPIKE = 8,
+
+ /**
+ * This hint indicates an upcoming GPU workload that is abnormally large and
+ * not representative of the workload. This should be used for rare, one-time
+ * operations and should be ignored by any load tracking or session hysteresis.
+ */
+ GPU_LOAD_SPIKE = 9,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
index bba6bdd..ded4835 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
@@ -53,4 +53,6 @@
oneway void setResponseFunctions(in android.hardware.radio.config.IRadioConfigResponse radioConfigResponse, in android.hardware.radio.config.IRadioConfigIndication radioConfigIndication);
oneway void setSimSlotsMapping(in int serial, in android.hardware.radio.config.SlotPortMapping[] slotMap);
oneway void getSimultaneousCallingSupport(in int serial);
+ oneway void getSimTypeInfo(in int serial);
+ oneway void setSimType(in int serial, in android.hardware.radio.config.SimType[] simTypes);
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
index 6ff7bd0..4e0e133 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
@@ -43,4 +43,6 @@
oneway void setPreferredDataModemResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setSimSlotsMappingResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void getSimultaneousCallingSupportResponse(in android.hardware.radio.RadioResponseInfo info, in int[] enabledLogicalSlots);
+ oneway void getSimTypeInfoResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.config.SimTypeInfo[] simTypeInfo);
+ oneway void setSimTypeResponse(in android.hardware.radio.RadioResponseInfo info);
}
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimType.aidl
similarity index 81%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimType.aidl
index 077652b..b27c86f 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimType.aidl
@@ -31,10 +31,11 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.radio.config;
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum SimType {
+ UNKNOWN = 0,
+ PHYSICAL = (1 << 0) /* 1 */,
+ ESIM = (1 << 1) /* 2 */,
}
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimTypeInfo.aidl
similarity index 81%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimTypeInfo.aidl
index 077652b..cba5dd9 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimTypeInfo.aidl
@@ -31,10 +31,10 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.radio.config;
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
+parcelable SimTypeInfo {
+ android.hardware.radio.config.SimType currentSimType = android.hardware.radio.config.SimType.UNKNOWN;
+ int supportedSimTypes;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
index 17d3fda..1f8cbdc 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
@@ -169,6 +169,9 @@
MAX_PPP_INACTIVITY_TIMER_EXPIRED = 0x7FE,
IPV6_ADDRESS_TRANSFER_FAILED = 0x7FF,
TRAT_SWAP_FAILED = 0x800,
+ /**
+ * @deprecated Legacy CDMA is unsupported.
+ */
EHRPD_TO_HRPD_FALLBACK = 0x801,
MIP_CONFIG_FAILURE = 0x802,
PDN_INACTIVITY_TIMER_EXPIRED = 0x803,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
index e9937f0..33c0d70 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
@@ -36,6 +36,12 @@
@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ResetNvType {
RELOAD,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
ERASE,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
FACTORY_RESET,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
index a6fd27a..ad7473b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
@@ -36,6 +36,9 @@
@VintfStability
interface IRadioNetwork {
oneway void getAllowedNetworkTypesBitmap(in int serial);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void getAvailableBandModes(in int serial);
oneway void getAvailableNetworks(in int serial);
oneway void getBarringInfo(in int serial);
@@ -58,6 +61,9 @@
oneway void isNrDualConnectivityEnabled(in int serial);
oneway void responseAcknowledgement();
oneway void setAllowedNetworkTypesBitmap(in int serial, in int networkTypeBitmap);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setBandMode(in int serial, in android.hardware.radio.network.RadioBandMode mode);
oneway void setBarringPassword(in int serial, in String facility, in String oldPassword, in String newPassword);
/**
@@ -67,12 +73,18 @@
oneway void setCellInfoListRate(in int serial, in int rate);
oneway void setIndicationFilter(in int serial, in int indicationFilter);
oneway void setLinkCapacityReportingCriteria(in int serial, in int hysteresisMs, in int hysteresisDlKbps, in int hysteresisUlKbps, in int[] thresholdsDownlinkKbps, in int[] thresholdsUplinkKbps, in android.hardware.radio.AccessNetwork accessNetwork);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setLocationUpdates(in int serial, in boolean enable);
oneway void setNetworkSelectionModeAutomatic(in int serial);
oneway void setNetworkSelectionModeManual(in int serial, in String operatorNumeric, in android.hardware.radio.AccessNetwork ran);
oneway void setNrDualConnectivityState(in int serial, in android.hardware.radio.network.NrDualConnectivityState nrDualConnectivityState);
oneway void setResponseFunctions(in android.hardware.radio.network.IRadioNetworkResponse radioNetworkResponse, in android.hardware.radio.network.IRadioNetworkIndication radioNetworkIndication);
oneway void setSignalStrengthReportingCriteria(in int serial, in android.hardware.radio.network.SignalThresholdInfo[] signalThresholdInfos);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setSuppServiceNotifications(in int serial, in boolean enable);
oneway void setSystemSelectionChannels(in int serial, in boolean specifyChannels, in android.hardware.radio.network.RadioAccessSpecifier[] specifiers);
oneway void startNetworkScan(in int serial, in android.hardware.radio.network.NetworkScanRequest request);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 080b4aa..3c220ab 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -37,6 +37,9 @@
interface IRadioNetworkResponse {
oneway void acknowledgeRequest(in int serial);
oneway void getAllowedNetworkTypesBitmapResponse(in android.hardware.radio.RadioResponseInfo info, in int networkTypeBitmap);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void getAvailableBandModesResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.RadioBandMode[] bandModes);
oneway void getAvailableNetworksResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.OperatorInfo[] networkInfos);
oneway void getBarringInfoResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.CellIdentity cellIdentity, in android.hardware.radio.network.BarringInfo[] barringInfos);
@@ -58,6 +61,9 @@
oneway void getVoiceRegistrationStateResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.RegStateResult voiceRegResponse);
oneway void isNrDualConnectivityEnabledResponse(in android.hardware.radio.RadioResponseInfo info, in boolean isEnabled);
oneway void setAllowedNetworkTypesBitmapResponse(in android.hardware.radio.RadioResponseInfo info);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setBandModeResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setBarringPasswordResponse(in android.hardware.radio.RadioResponseInfo info);
/**
@@ -67,11 +73,17 @@
oneway void setCellInfoListRateResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setIndicationFilterResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setLinkCapacityReportingCriteriaResponse(in android.hardware.radio.RadioResponseInfo info);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setLocationUpdatesResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setNetworkSelectionModeAutomaticResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setNetworkSelectionModeManualResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setNrDualConnectivityStateResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setSignalStrengthReportingCriteriaResponse(in android.hardware.radio.RadioResponseInfo info);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setSuppServiceNotificationsResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setSystemSelectionChannelsResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void startNetworkScanResponse(in android.hardware.radio.RadioResponseInfo info);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl
index 5a4c5c1..c868f81 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl
@@ -76,6 +76,9 @@
oneway void setFacilityLockForApp(in int serial, in String facility, in boolean lockState, in String password, in int serviceClass, in String appId);
oneway void setResponseFunctions(in android.hardware.radio.sim.IRadioSimResponse radioSimResponse, in android.hardware.radio.sim.IRadioSimIndication radioSimIndication);
oneway void setSimCardPower(in int serial, in android.hardware.radio.sim.CardPowerState powerUp);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setUiccSubscription(in int serial, in android.hardware.radio.sim.SelectUiccSub uiccSub);
oneway void supplyIccPin2ForApp(in int serial, in String pin2, in String aid);
oneway void supplyIccPinForApp(in int serial, in String pin, in String aid);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl
index a512bae..6526d8b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl
@@ -75,6 +75,9 @@
oneway void setCdmaSubscriptionSourceResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setFacilityLockForAppResponse(in android.hardware.radio.RadioResponseInfo info, in int retry);
oneway void setSimCardPowerResponse(in android.hardware.radio.RadioResponseInfo info);
+ /**
+ * @deprecated Android Telephony framework doesn't use this.
+ */
oneway void setUiccSubscriptionResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void supplyIccPin2ForAppResponse(in android.hardware.radio.RadioResponseInfo info, in int remainingRetries);
oneway void supplyIccPinForAppResponse(in android.hardware.radio.RadioResponseInfo info, in int remainingRetries);
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
index b400bbe..471916f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
@@ -39,7 +39,13 @@
GPRS = (1 << android.hardware.radio.RadioTechnology.GPRS) /* 2 */,
EDGE = (1 << android.hardware.radio.RadioTechnology.EDGE) /* 4 */,
UMTS = (1 << android.hardware.radio.RadioTechnology.UMTS) /* 8 */,
+ /**
+ * @deprecated Legacy CDMA is unsupported.
+ */
IS95A = (1 << android.hardware.radio.RadioTechnology.IS95A) /* 16 */,
+ /**
+ * @deprecated Legacy CDMA is unsupported.
+ */
IS95B = (1 << android.hardware.radio.RadioTechnology.IS95B) /* 32 */,
/**
* @deprecated Legacy CDMA is unsupported.
@@ -60,6 +66,9 @@
* @deprecated Legacy CDMA is unsupported.
*/
EVDO_B = (1 << android.hardware.radio.RadioTechnology.EVDO_B) /* 4096 */,
+ /**
+ * @deprecated Legacy CDMA is unsupported.
+ */
EHRPD = (1 << android.hardware.radio.RadioTechnology.EHRPD) /* 8192 */,
LTE = (1 << android.hardware.radio.RadioTechnology.LTE) /* 16384 */,
HSPAP = (1 << android.hardware.radio.RadioTechnology.HSPAP) /* 32768 */,
@@ -71,4 +80,5 @@
*/
LTE_CA = (1 << android.hardware.radio.RadioTechnology.LTE_CA) /* 524288 */,
NR = (1 << android.hardware.radio.RadioTechnology.NR) /* 1048576 */,
+ NB_IOT_NTN = (1 << android.hardware.radio.RadioTechnology.NB_IOT_NTN) /* 2097152 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
index 7d2d08c..201e694 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
@@ -39,7 +39,13 @@
GPRS,
EDGE,
UMTS,
+ /**
+ * @deprecated Legacy CDMA is unsupported.
+ */
IS95A,
+ /**
+ * @deprecated Legacy CDMA is unsupported.
+ */
IS95B,
/**
* @deprecated Legacy CDMA is unsupported.
@@ -60,6 +66,9 @@
* @deprecated Legacy CDMA is unsupported.
*/
EVDO_B,
+ /**
+ * @deprecated Legacy CDMA is unsupported.
+ */
EHRPD,
LTE,
HSPAP,
@@ -71,4 +80,5 @@
*/
LTE_CA,
NR,
+ NB_IOT_NTN,
}
diff --git a/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
index 6d38d59..8c10bb9 100644
--- a/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
+++ b/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
@@ -27,7 +27,9 @@
GPRS = 1 << RadioTechnology.GPRS,
EDGE = 1 << RadioTechnology.EDGE,
UMTS = 1 << RadioTechnology.UMTS,
+ /** @deprecated Legacy CDMA is unsupported. */
IS95A = 1 << RadioTechnology.IS95A,
+ /** @deprecated Legacy CDMA is unsupported. */
IS95B = 1 << RadioTechnology.IS95B,
/** @deprecated Legacy CDMA is unsupported. */
ONE_X_RTT = 1 << RadioTechnology.ONE_X_RTT,
@@ -40,6 +42,7 @@
HSPA = 1 << RadioTechnology.HSPA,
/** @deprecated Legacy CDMA is unsupported. */
EVDO_B = 1 << RadioTechnology.EVDO_B,
+ /** @deprecated Legacy CDMA is unsupported. */
EHRPD = 1 << RadioTechnology.EHRPD,
LTE = 1 << RadioTechnology.LTE,
HSPAP = 1 << RadioTechnology.HSPAP,
@@ -52,4 +55,8 @@
* 5G NR. This is only use in 5G Standalone mode.
*/
NR = 1 << RadioTechnology.NR,
+ /**
+ * 3GPP NB-IOT (Narrowband Internet of Things) over Non-Terrestrial-Networks technology.
+ */
+ NB_IOT_NTN = 1 << RadioTechnology.NB_IOT_NTN,
}
diff --git a/radio/aidl/android/hardware/radio/RadioTechnology.aidl b/radio/aidl/android/hardware/radio/RadioTechnology.aidl
index cd82ef5..843bfd0 100644
--- a/radio/aidl/android/hardware/radio/RadioTechnology.aidl
+++ b/radio/aidl/android/hardware/radio/RadioTechnology.aidl
@@ -25,7 +25,9 @@
GPRS,
EDGE,
UMTS,
+ /** @deprecated Legacy CDMA is unsupported. */
IS95A,
+ /** @deprecated Legacy CDMA is unsupported. */
IS95B,
/** @deprecated Legacy CDMA is unsupported. */
ONE_X_RTT,
@@ -38,6 +40,7 @@
HSPA,
/** @deprecated Legacy CDMA is unsupported. */
EVDO_B,
+ /** @deprecated Legacy CDMA is unsupported. */
EHRPD,
LTE,
/**
@@ -59,4 +62,8 @@
* 5G NR. This is only used in 5G Standalone mode.
*/
NR,
+ /**
+ * 3GPP NB-IOT (Narrowband Internet of Things) over Non-Terrestrial-Networks technology.
+ */
+ NB_IOT_NTN,
}
diff --git a/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
index 936315c..e819fe0 100644
--- a/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
@@ -27,6 +27,7 @@
import android.hardware.radio.config.IRadioConfigIndication;
import android.hardware.radio.config.IRadioConfigResponse;
+import android.hardware.radio.config.SimType;
import android.hardware.radio.config.SlotPortMapping;
/** @hide */
@@ -208,4 +209,39 @@
* This is available when android.hardware.telephony is defined.
*/
void getSimultaneousCallingSupport(in int serial);
+
+ /**
+ * Get the sim type information.
+ *
+ * Response provides the current active sim type and supported sim types associated with each
+ * active physical slot ids.
+ *
+ * @param serial Serial number of request.
+ *
+ * Response callback is IRadioConfigResponse.getSimTypeInfoResponse()
+ *
+ * This is available when android.hardware.telephony.subscription is defined.
+ */
+ void getSimTypeInfo(in int serial);
+
+ /**
+ * Set the sim type associated with the physical slot id and activate if the sim type is
+ * currently inactive.
+ *
+ * Example: There are 2 active physical slot ids and 3 physical sims(2 pSIM and 1 eSIM). First
+ * physical slot id is always linked pSIM and 2nd physical slot id supports either pSIM/eSIM one
+ * at a time. In order to activate eSIM on 2nd physical slot id, caller should pass
+ * corresponding sim type.
+ *
+ * simTypes[0] = pSIM
+ * simTypes[1] = eSIM
+ *
+ * @param serial Serial number of request.
+ * @param simTypes SimType to be activated on each logical slot
+ *
+ * Response callback is IRadioConfigResponse.setSimTypeResponse()
+ *
+ * This is available when android.hardware.telephony.subscription is defined.
+ */
+ void setSimType(in int serial, in SimType[] simTypes);
}
diff --git a/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl b/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
index 8182cd1..d526c51 100644
--- a/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
+++ b/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.config.PhoneCapability;
import android.hardware.radio.config.SimSlotStatus;
+import android.hardware.radio.config.SimTypeInfo;
/**
* Interface declaring response functions to solicited radio config requests.
@@ -152,4 +153,40 @@
*/
void getSimultaneousCallingSupportResponse(
in android.hardware.radio.RadioResponseInfo info, in int[] enabledLogicalSlots);
+
+ /**
+ * Response to the asynchronous {@link IRadioConfig#getSimTypeInfo} request.
+ *
+ * @param info Response info struct containing response type, serial number and error
+ * @param simTypeInfos Currently active and supported sim types associated with active
+ * physical slot ids.
+ *
+ * Valid errors returned:
+ * RadioError:REQUEST_NOT_SUPPORTED when android.hardware.telephony.subscription is not
+ * defined
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:NO_MEMORY
+ * RadioError:INTERNAL_ERR
+ * RadioError:MODEM_ERR
+ */
+ void getSimTypeInfoResponse(
+ in android.hardware.radio.RadioResponseInfo info, in SimTypeInfo[] simTypeInfo);
+
+ /**
+ * Response to the asynchronous {@link IRadioConfig#setSimType} request.
+ *
+ * @param info Response info struct containing response type, serial number and error
+ *
+ * Valid errors returned:
+ * RadioError:REQUEST_NOT_SUPPORTED when android.hardware.telephony.subscription is not
+ * defined
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:NO_MEMORY
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:MODEM_ERR
+ */
+ void setSimTypeResponse(in android.hardware.radio.RadioResponseInfo info);
}
diff --git a/radio/aidl/android/hardware/radio/config/SimType.aidl b/radio/aidl/android/hardware/radio/config/SimType.aidl
new file mode 100644
index 0000000..fc9915e
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/config/SimType.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.radio.config;
+
+/** @hide */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum SimType {
+ /**
+ * Unknown
+ **/
+ UNKNOWN = 0,
+ /**
+ * Physical SIM (can be eUICC capable)
+ **/
+ PHYSICAL = 1 << 0,
+ /**
+ * Embedded SIM
+ **/
+ ESIM = 1 << 1,
+}
diff --git a/radio/aidl/android/hardware/radio/config/SimTypeInfo.aidl b/radio/aidl/android/hardware/radio/config/SimTypeInfo.aidl
new file mode 100644
index 0000000..0534626
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/config/SimTypeInfo.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2024 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.radio.config;
+
+import android.hardware.radio.config.SimType;
+
+/** @hide */
+@VintfStability
+@JavaDerive(toString=true)
+parcelable SimTypeInfo {
+ /**
+ * Current SimType on the physical slot id.
+ **/
+ SimType currentSimType = SimType.UNKNOWN;
+ /**
+ * Bitmask of the sim types supported by the physical slot id. Physical slot can support more
+ * than one SimType.
+ * Example:
+ * if the physical slot id supports either pSIM/eSIM and currently pSIM is active,
+ * currentSimType will be SimType::PHYSICAL and supportedSimTypes will be
+ * SimType::PHYSICAL | SimType::ESIM.
+ **/
+ int supportedSimTypes;
+}
diff --git a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
index 5ae057a..592fde6 100644
--- a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
@@ -421,6 +421,7 @@
TRAT_SWAP_FAILED = 0x800,
/**
* Device falls back from eHRPD to HRPD.
+ * @deprecated Legacy CDMA is unsupported.
*/
EHRPD_TO_HRPD_FALLBACK = 0x801,
/**
diff --git a/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl b/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
index 4818c9e..0389170 100644
--- a/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
@@ -32,9 +32,12 @@
*/
int rilModel;
/**
- * Bitset value, based on RadioTechnology.
+ * All supported radio technologies.
+ *
+ * Despite the stated type, this is an int bitset: a mask where each bit position represents a
+ * radio technology.
*/
- RadioTechnology rat = RadioTechnology.UNKNOWN;
+ RadioTechnology rat = RadioTechnology.UNKNOWN; // it's really an empty bitmask
/**
* Maximum number of concurrent active voice calls.
*/
diff --git a/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl b/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
index 491657c..15a833e 100644
--- a/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
@@ -139,12 +139,13 @@
void nvReadItem(in int serial, in NvItem itemId);
/**
- * Reset the radio NV configuration.
+ * Reboots modem.
*
- * This is also used to reboot the modem with ResetNvType.RELOAD.
+ * This was historically used to reset NV configuration, but starting from Android U, NV APIs
+ * are deprecated.
*
* @param serial Serial number of request.
- * @param resetType Type of reset operation
+ * @param resetType Always ResetNvType.RELOAD.
*
* Response function is IRadioModemResponse.nvResetConfigResponse()
*/
diff --git a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
index 71736d8..95fa0d7 100644
--- a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
@@ -25,15 +25,21 @@
@SuppressWarnings(value={"redundant-name"})
enum ResetNvType {
/**
- * Reload all NV items. This may reboot modem.
+ * Reboot modem.
+ *
+ * Historically, this has been also reloading all NV items.
*/
RELOAD,
/**
* Erase NV reset (SCRTN)
+ *
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
ERASE,
/**
* Factory reset (RTN)
+ *
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
FACTORY_RESET,
}
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 68e4829..2509b6d 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -61,6 +61,8 @@
* Response function is IRadioNetworkResponse.getAvailableBandModesResponse()
*
* This is available when android.hardware.telephony.radio.access is defined.
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void getAvailableBandModes(in int serial);
@@ -247,6 +249,8 @@
* Response function is IRadioNetworkResponse.setBandModeResponse()
*
* This is available when android.hardware.telephony.radio.access is defined.
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setBandMode(in int serial, in RadioBandMode mode);
@@ -348,6 +352,8 @@
* Response function is IRadioNetworkResponse.setLocationUpdatesResponse()
*
* This is available when android.hardware.telephony.radio.access is defined.
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setLocationUpdates(in int serial, in boolean enable);
@@ -441,6 +447,8 @@
* Response function is IRadioNetworkResponse.setSuppServiceNotificationsResponse()
*
* This is available when android.hardware.telephony.calling is defined.
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setSuppServiceNotifications(in int serial, in boolean enable);
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 4c1a394..fd332fc 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -80,6 +80,8 @@
* RadioError:MODEM_ERR
* RadioError:NO_RESOURCES
* RadioError:CANCELLED
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void getAvailableBandModesResponse(in RadioResponseInfo info, in RadioBandMode[] bandModes);
@@ -332,6 +334,8 @@
* RadioError:MODEM_ERR
* RadioError:NO_RESOURCES
* RadioError:CANCELLED
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setBandModeResponse(in RadioResponseInfo info);
@@ -437,6 +441,8 @@
* RadioError:NO_RESOURCES
* RadioError:CANCELLED
* RadioError:SIM_ABSENT
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setLocationUpdatesResponse(in RadioResponseInfo info);
@@ -528,6 +534,8 @@
* RadioError:NO_RESOURCES
* RadioError:CANCELLED
* RadioError:SIM_ABSENT
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setSuppServiceNotificationsResponse(in RadioResponseInfo info);
diff --git a/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl b/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
index 24c7320..16573f4 100644
--- a/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
@@ -485,6 +485,8 @@
* Response function is IRadioSimResponse.setUiccSubscriptionResponse()
*
* This is available when android.hardware.telephony.subscription is defined.
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setUiccSubscription(in int serial, in SelectUiccSub uiccSub);
diff --git a/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl b/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
index 92815d2..62fa674 100644
--- a/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
@@ -544,6 +544,8 @@
* RadioError:INVALID_ARGUMENTS
* RadioError:NO_RESOURCES
* RadioError:CANCELLED
+ *
+ * @deprecated Android Telephony framework doesn't use this.
*/
void setUiccSubscriptionResponse(in RadioResponseInfo info);
diff --git a/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp b/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp
index 837c626..3834ecc 100644
--- a/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp
+++ b/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp
@@ -109,4 +109,19 @@
return ok();
}
+ScopedAStatus RadioConfig::getSimTypeInfo(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " getSimTypeInfo is unsupported by HIDL HALs";
+ respond()->getSimTypeInfoResponse(notSupported(serial), {});
+ return ok();
+}
+
+ScopedAStatus RadioConfig::setSimType(
+ int32_t serial, const std::vector<aidl::SimType>& /*simTypes*/) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " setSimType is unsupported by HIDL HALs";
+ respond()->setSimTypeResponse(notSupported(serial));
+ return ok();
+}
+
} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h
index 17d5985..a1e48dc 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h
@@ -55,7 +55,11 @@
int32_t serial,
const std::vector<aidl::android::hardware::radio::config::SlotPortMapping>& slotMap)
override;
-
+ ::ndk::ScopedAStatus getSimTypeInfo(int32_t serial) override;
+ ::ndk::ScopedAStatus setSimType(
+ int32_t serial,
+ const std::vector<aidl::android::hardware::radio::config::SimType>& simTypes)
+ override;
protected:
std::shared_ptr<::aidl::android::hardware::radio::config::IRadioConfigResponse> respond();
diff --git a/radio/aidl/vts/radio_config_response.cpp b/radio/aidl/vts/radio_config_response.cpp
index c532440..49439fa 100644
--- a/radio/aidl/vts/radio_config_response.cpp
+++ b/radio/aidl/vts/radio_config_response.cpp
@@ -75,3 +75,17 @@
parent_config.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
+
+ndk::ScopedAStatus RadioConfigResponse::getSimTypeInfoResponse(const RadioResponseInfo& info,
+ const std::vector<SimTypeInfo>& /* simTypeInfo */) {
+ rspInfo = info;
+ parent_config.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioConfigResponse::setSimTypeResponse(const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_config.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
diff --git a/radio/aidl/vts/radio_config_utils.h b/radio/aidl/vts/radio_config_utils.h
index 84c74fc..cdcc1bc 100644
--- a/radio/aidl/vts/radio_config_utils.h
+++ b/radio/aidl/vts/radio_config_utils.h
@@ -62,6 +62,11 @@
virtual ndk::ScopedAStatus getHalDeviceCapabilitiesResponse(
const RadioResponseInfo& info, bool modemReducedFeatureSet1) override;
+
+ virtual ndk::ScopedAStatus getSimTypeInfoResponse(
+ const RadioResponseInfo& info, const std::vector<SimTypeInfo>& simTypeInfo) override;
+
+ virtual ndk::ScopedAStatus setSimTypeResponse(const RadioResponseInfo& info) override;
};
/* Callback class for radio config indication */
diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
index e8eed71..b57dd8a 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -548,10 +548,8 @@
void deleteKey(in byte[] keyBlob);
/**
- * Deletes all keys in the hardware keystore. Used when keystore is reset completely. After
- * this function is called all keys with Tag::ROLLBACK_RESISTANCE in their hardware-enforced
- * authorization lists must be rendered permanently unusable. Keys without
- * Tag::ROLLBACK_RESISTANCE may or may not be rendered unusable.
+ * Deletes all keys in the hardware keystore. Used when keystore is reset completely. After
+ * this function is called all keys created previously must be rendered permanently unusable.
*/
void deleteAllKeys();
diff --git a/security/keymint/aidl/default/hal/lib.rs b/security/keymint/aidl/default/hal/lib.rs
index 621f077..fad807f 100644
--- a/security/keymint/aidl/default/hal/lib.rs
+++ b/security/keymint/aidl/default/hal/lib.rs
@@ -47,11 +47,9 @@
/// Get boot information based on system properties.
pub fn get_boot_info() -> kmr_wire::SetBootInfoRequest {
- // No access to a verified boot key.
- let verified_boot_key = vec![0; 32];
let vbmeta_digest = get_property("ro.boot.vbmeta.digest").unwrap_or_else(|_| "00".repeat(32));
let verified_boot_hash = hex::decode(&vbmeta_digest).unwrap_or_else(|_e| {
- error!("failed to parse hex data in '{}'", vbmeta_digest);
+ error!("failed to parse VBMeta digest hex data in '{vbmeta_digest}': {_e:?}");
vec![0; 32]
});
let device_boot_locked = match get_property("ro.boot.vbmeta.device_state")
@@ -65,6 +63,18 @@
false
}
};
+ let verified_boot_key_digest =
+ get_property("ro.boot.vbmeta.public_key_digest").unwrap_or_else(|_| "00".repeat(32));
+ let verified_boot_key = match device_boot_locked {
+ true => hex::decode(&verified_boot_key_digest).unwrap_or_else(|_e| {
+ error!("Failed to parse Verified Boot key hex data in '{verified_boot_key_digest}': {_e:?}");
+ vec![0; 32]
+ }),
+ // VTS-16+ requires the attested Verified Boot key to be 32 bytes of zeroes when the
+ // bootloader is unlocked, so we ignore the property's value in that case. Behaviour
+ // prior to VTS-16 is unspecified, so it's fine to return the same.
+ false => vec![0; 32],
+ };
let verified_boot_state = match get_property("ro.boot.verifiedbootstate")
.unwrap_or_else(|_| "no-prop".to_string())
.as_str()
diff --git a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
index 083a9aa..b41da3f 100644
--- a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
+++ b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
@@ -95,6 +95,18 @@
<< "Verified boot state must be \"UNVERIFIED\" aka \"orange\".";
}
+// Check that the attested Verified Boot key is 32 bytes of zeroes since the bootloader is unlocked.
+TEST_P(BootloaderStateTest, VerifiedBootKeyAllZeroes) {
+ // Gate this test to avoid waiver issues.
+ if (get_vsr_api_level() <= __ANDROID_API_V__) {
+ return;
+ }
+
+ std::vector<uint8_t> expectedVbKey(32, 0);
+ ASSERT_EQ(attestedVbKey_, expectedVbKey) << "Verified Boot key digest must be 32 bytes of "
+ "zeroes since the bootloader is unlocked.";
+}
+
// Following error codes from avb_slot_data() mean that slot data was loaded
// (even if verification failed).
static inline bool avb_slot_data_loaded(AvbSlotVerifyResult result) {
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 0ce6a15..09446ce 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -1908,16 +1908,29 @@
}
}
+ if (get_vsr_api_level() > __ANDROID_API_V__) {
+ // The Verified Boot key field should be exactly 32 bytes since it
+ // contains the SHA-256 hash of the key on locked devices or 32 bytes
+ // of zeroes on unlocked devices. This wasn't checked for earlier
+ // versions of the KeyMint HAL, so only only be strict for VSR-16+.
+ EXPECT_EQ(verified_boot_key.size(), 32);
+ } else if (get_vsr_api_level() == __ANDROID_API_V__) {
+ // The Verified Boot key field should be:
+ // - Exactly 32 bytes on locked devices since it should contain
+ // the SHA-256 hash of the key, or
+ // - Up to 32 bytes of zeroes on unlocked devices (behaviour on
+ // unlocked devices isn't specified in the HAL interface
+ // specification).
+ // Thus, we can't check for strict equality in case unlocked devices
+ // report values with less than 32 bytes. This wasn't checked for
+ // earlier versions of the KeyMint HAL, so only check on VSR-15.
+ EXPECT_LE(verified_boot_key.size(), 32);
+ }
+
// Verified Boot key should be all zeroes if the boot state is "orange".
std::string empty_boot_key(32, '\0');
std::string verified_boot_key_str((const char*)verified_boot_key.data(),
verified_boot_key.size());
- if (get_vsr_api_level() >= __ANDROID_API_V__) {
- // The attestation should contain the SHA-256 hash of the verified boot
- // key. However, this was not checked for earlier versions of the KeyMint
- // HAL so only be strict for VSR-V and above.
- EXPECT_LE(verified_boot_key.size(), 32);
- }
EXPECT_NE(property_get("ro.boot.verifiedbootstate", property_value, ""), 0);
if (!strcmp(property_value, "green")) {
EXPECT_EQ(verified_boot_state, VerifiedBoot::VERIFIED);
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index 067db78..416e6c0 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -8305,21 +8305,15 @@
GTEST_SKIP() << "Option --arm_deleteAllKeys not set";
return;
}
+ // This test was introduced in API level 36, but is not version guarded because it requires a
+ // manual opt-in anyway. This makes it easier to run on older devices.
auto error = GenerateKey(AuthorizationSetBuilder()
.RsaSigningKey(2048, 65537)
.Digest(Digest::NONE)
.Padding(PaddingMode::NONE)
.Authorization(TAG_NO_AUTH_REQUIRED)
- .Authorization(TAG_ROLLBACK_RESISTANCE)
.SetDefaultValidity());
- if (error == ErrorCode::ROLLBACK_RESISTANCE_UNAVAILABLE) {
- GTEST_SKIP() << "Rollback resistance not supported";
- }
-
- // Delete must work if rollback protection is implemented
ASSERT_EQ(ErrorCode::OK, error);
- AuthorizationSet hardwareEnforced(SecLevelAuthorizations());
- ASSERT_TRUE(hardwareEnforced.Contains(TAG_ROLLBACK_RESISTANCE));
ASSERT_EQ(ErrorCode::OK, DeleteAllKeys());
diff --git a/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp b/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp
index 9f7322a..f7639bf 100644
--- a/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp
+++ b/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp
@@ -114,10 +114,22 @@
const auto& vbKey = rot->asArray()->get(pos++);
ASSERT_TRUE(vbKey);
ASSERT_TRUE(vbKey->asBstr());
- if (get_vsr_api_level() >= __ANDROID_API_V__) {
- // The attestation should contain the SHA-256 hash of the verified boot
- // key. However, this not was checked for earlier versions of the KeyMint
- // HAL so only be strict for VSR-V and above.
+ if (get_vsr_api_level() > __ANDROID_API_V__) {
+ // The Verified Boot key field should be exactly 32 bytes since it
+ // contains the SHA-256 hash of the key on locked devices or 32 bytes
+ // of zeroes on unlocked devices. This wasn't checked for earlier
+ // versions of the KeyMint HAL, so only only be strict for VSR-16+.
+ ASSERT_EQ(vbKey->asBstr()->value().size(), 32);
+ } else if (get_vsr_api_level() == __ANDROID_API_V__) {
+ // The Verified Boot key field should be:
+ // - Exactly 32 bytes on locked devices since it should contain
+ // the SHA-256 hash of the key, or
+ // - Up to 32 bytes of zeroes on unlocked devices (behaviour on
+ // unlocked devices isn't specified in the HAL interface
+ // specification).
+ // Thus, we can't check for strict equality in case unlocked devices
+ // report values with less than 32 bytes. This wasn't checked for
+ // earlier versions of the KeyMint HAL, so only check on VSR-15.
ASSERT_LE(vbKey->asBstr()->value().size(), 32);
}
diff --git a/security/keymint/support/include/remote_prov/remote_prov_utils.h b/security/keymint/support/include/remote_prov/remote_prov_utils.h
index 6cb00f2..cfc31b3 100644
--- a/security/keymint/support/include/remote_prov/remote_prov_utils.h
+++ b/security/keymint/support/include/remote_prov/remote_prov_utils.h
@@ -29,6 +29,11 @@
using bytevec = std::vector<uint8_t>;
using namespace cppcose;
+constexpr std::string_view kErrorChallengeMismatch = "challenges do not match";
+constexpr std::string_view kErrorUdsCertsAreRequired = "UdsCerts are required";
+constexpr std::string_view kErrorKeysToSignMismatch = "KeysToSign do not match";
+constexpr std::string_view kErrorDiceChainIsDegenerate = "DICE chain is degenerate";
+
extern bytevec kTestMacKey;
// The Google root key for the Endpoint Encryption Key chain, encoded as COSE_Sign1
@@ -209,6 +214,19 @@
ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& csr,
const std::string& instanceName);
+/** Checks whether the CSRs contain DICE certificate chains that have root certificates
+ * with the same public key.
+ */
+ErrMsgOr<bool> compareRootPublicKeysInDiceChains(const std::vector<uint8_t>& csr1,
+ std::string_view instanceName1,
+ const std::vector<uint8_t>& csr2,
+ std::string_view instanceName2);
+
+/** Checks whether the component name in the configuration descriptor in the leaf certificate
+ * of the primary KeyMint instance's DICE certificate chain contains "keymint"
+ */
+ErrMsgOr<bool> verifyComponentNameInKeyMintDiceChain(const std::vector<uint8_t>& csr);
+
/** Verify the DICE chain. */
ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
hwtrust::DiceChain::Kind kind, bool allowAnyMode,
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index e11f021..0f7cda6 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -45,6 +45,7 @@
constexpr int32_t kBccPayloadKeyUsage = -4670553;
constexpr int kP256AffinePointSize = 32;
constexpr uint32_t kNumTeeDeviceInfoEntries = 14;
+constexpr std::string_view kKeyMintComponentName = "keymint";
using EC_KEY_Ptr = bssl::UniquePtr<EC_KEY>;
using EVP_PKEY_Ptr = bssl::UniquePtr<EVP_PKEY>;
@@ -123,37 +124,6 @@
return std::make_tuple(std::move(pubX), std::move(pubY));
}
-ErrMsgOr<bytevec> getRawPublicKey(const EVP_PKEY_Ptr& pubKey) {
- if (pubKey.get() == nullptr) {
- return "pkey is null.";
- }
- int keyType = EVP_PKEY_base_id(pubKey.get());
- switch (keyType) {
- case EVP_PKEY_EC: {
- int nid = EVP_PKEY_bits(pubKey.get()) == 384 ? NID_secp384r1 : NID_X9_62_prime256v1;
- auto ecKey = EC_KEY_Ptr(EVP_PKEY_get1_EC_KEY(pubKey.get()));
- if (ecKey.get() == nullptr) {
- return "Failed to get ec key";
- }
- return ecKeyGetPublicKey(ecKey.get(), nid);
- }
- case EVP_PKEY_ED25519: {
- bytevec rawPubKey;
- size_t rawKeySize = 0;
- if (!EVP_PKEY_get_raw_public_key(pubKey.get(), NULL, &rawKeySize)) {
- return "Failed to get raw public key.";
- }
- rawPubKey.resize(rawKeySize);
- if (!EVP_PKEY_get_raw_public_key(pubKey.get(), rawPubKey.data(), &rawKeySize)) {
- return "Failed to get raw public key.";
- }
- return rawPubKey;
- }
- default:
- return "Unknown key type.";
- }
-}
-
ErrMsgOr<std::tuple<bytevec, bytevec>> generateEc256KeyPair() {
auto ec_key = EC_KEY_Ptr(EC_KEY_new());
if (ec_key.get() == nullptr) {
@@ -166,7 +136,7 @@
}
if (EC_KEY_set_group(ec_key.get(), group.get()) != 1 ||
- EC_KEY_generate_key(ec_key.get()) != 1 || EC_KEY_check_key(ec_key.get()) < 0) {
+ EC_KEY_generate_key(ec_key.get()) != 1 || EC_KEY_check_key(ec_key.get()) != 1) {
return "Error generating key";
}
@@ -331,17 +301,22 @@
return chain.encode();
}
+bool maybeOverrideAllowAnyMode(bool allowAnyMode) {
+ // Use ro.build.type instead of ro.debuggable because ro.debuggable=1 for VTS testing
+ std::string build_type = ::android::base::GetProperty("ro.build.type", "");
+ if (!build_type.empty() && build_type != "user") {
+ return true;
+ }
+ return allowAnyMode;
+}
+
ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
hwtrust::DiceChain::Kind kind, bool allowAnyMode,
bool allowDegenerate,
const std::string& instanceName) {
auto encodedBcc = bcc->encode();
- // Use ro.build.type instead of ro.debuggable because ro.debuggable=1 for VTS testing
- std::string build_type = ::android::base::GetProperty("ro.build.type", "");
- if (!build_type.empty() && build_type != "user") {
- allowAnyMode = true;
- }
+ allowAnyMode = maybeOverrideAllowAnyMode(allowAnyMode);
auto chain =
hwtrust::DiceChain::Verify(encodedBcc, kind, allowAnyMode, deviceSuffix(instanceName));
@@ -779,233 +754,9 @@
/*isFactory=*/false, allowAnyMode);
}
-ErrMsgOr<X509_Ptr> parseX509Cert(const std::vector<uint8_t>& cert) {
- CRYPTO_BUFFER_Ptr certBuf(CRYPTO_BUFFER_new(cert.data(), cert.size(), nullptr));
- if (!certBuf.get()) {
- return "Failed to create crypto buffer.";
- }
- X509_Ptr result(X509_parse_from_buffer(certBuf.get()));
- if (!result.get()) {
- return "Failed to parse certificate.";
- }
- return result;
-}
-
-std::string getX509IssuerName(const X509_Ptr& cert) {
- char* name = X509_NAME_oneline(X509_get_issuer_name(cert.get()), nullptr, 0);
- std::string result(name);
- OPENSSL_free(name);
- return result;
-}
-
-std::string getX509SubjectName(const X509_Ptr& cert) {
- char* name = X509_NAME_oneline(X509_get_subject_name(cert.get()), nullptr, 0);
- std::string result(name);
- OPENSSL_free(name);
- return result;
-}
-
-// Validates the certificate chain and returns the leaf public key.
-ErrMsgOr<bytevec> validateCertChain(const cppbor::Array& chain) {
- bytevec rawPubKey;
- for (size_t i = 0; i < chain.size(); ++i) {
- // Root must be self-signed.
- size_t signingCertIndex = (i > 0) ? i - 1 : i;
- auto& keyCertItem = chain[i];
- auto& signingCertItem = chain[signingCertIndex];
- if (!keyCertItem || !keyCertItem->asBstr()) {
- return "Key certificate must be a Bstr.";
- }
- if (!signingCertItem || !signingCertItem->asBstr()) {
- return "Signing certificate must be a Bstr.";
- }
-
- auto keyCert = parseX509Cert(keyCertItem->asBstr()->value());
- if (!keyCert) {
- return keyCert.message();
- }
- auto signingCert = parseX509Cert(signingCertItem->asBstr()->value());
- if (!signingCert) {
- return signingCert.message();
- }
-
- EVP_PKEY_Ptr pubKey(X509_get_pubkey(keyCert->get()));
- if (!pubKey.get()) {
- return "Failed to get public key.";
- }
- EVP_PKEY_Ptr signingPubKey(X509_get_pubkey(signingCert->get()));
- if (!signingPubKey.get()) {
- return "Failed to get signing public key.";
- }
-
- if (!X509_verify(keyCert->get(), signingPubKey.get())) {
- return "Verification of certificate " + std::to_string(i) +
- " faile. OpenSSL error string: " + ERR_error_string(ERR_get_error(), NULL);
- }
-
- auto certIssuer = getX509IssuerName(*keyCert);
- auto signerSubj = getX509SubjectName(*signingCert);
- if (certIssuer != signerSubj) {
- return "Certificate " + std::to_string(i) + " has wrong issuer. Signer subject is " +
- signerSubj + " Issuer subject is " + certIssuer;
- }
- if (i == chain.size() - 1) {
- auto key = getRawPublicKey(pubKey);
- if (!key) return key.moveMessage();
- rawPubKey = key.moveValue();
- }
- }
- return rawPubKey;
-}
-
-std::optional<std::string> validateUdsCerts(const cppbor::Map& udsCerts,
- const bytevec& udsCoseKeyBytes) {
- for (const auto& [signerName, udsCertChain] : udsCerts) {
- if (!signerName || !signerName->asTstr()) {
- return "Signer Name must be a Tstr.";
- }
- if (!udsCertChain || !udsCertChain->asArray()) {
- return "UDS certificate chain must be an Array.";
- }
- if (udsCertChain->asArray()->size() < 2) {
- return "UDS certificate chain must have at least two entries: root and leaf.";
- }
-
- auto leafPubKey = validateCertChain(*udsCertChain->asArray());
- if (!leafPubKey) {
- return leafPubKey.message();
- }
- auto coseKey = CoseKey::parse(udsCoseKeyBytes);
- if (!coseKey) {
- return coseKey.moveMessage();
- }
- auto curve = coseKey->getIntValue(CoseKey::CURVE);
- if (!curve) {
- return "CoseKey must contain curve.";
- }
- bytevec udsPub;
- if (curve == CoseKeyCurve::P256 || curve == CoseKeyCurve::P384) {
- auto pubKey = coseKey->getEcPublicKey();
- if (!pubKey) {
- return pubKey.moveMessage();
- }
- // convert public key to uncompressed form by prepending 0x04 at begin.
- pubKey->insert(pubKey->begin(), 0x04);
- udsPub = pubKey.moveValue();
- } else if (curve == CoseKeyCurve::ED25519) {
- auto& pubkey = coseKey->getMap().get(cppcose::CoseKey::PUBKEY_X);
- if (!pubkey || !pubkey->asBstr()) {
- return "Invalid public key.";
- }
- udsPub = pubkey->asBstr()->value();
- } else {
- return "Unknown curve.";
- }
- if (*leafPubKey != udsPub) {
- return "Leaf public key in UDS certificate chain doesn't match UDS public key.";
- }
- }
- return std::nullopt;
-}
-
-ErrMsgOr<std::unique_ptr<cppbor::Array>> parseAndValidateCsrPayload(
- const cppbor::Array& keysToSign, const std::vector<uint8_t>& csrPayload,
- const RpcHardwareInfo& rpcHardwareInfo, bool isFactory) {
- auto [parsedCsrPayload, _, errMsg] = cppbor::parse(csrPayload);
- if (!parsedCsrPayload) {
- return errMsg;
- }
-
- std::unique_ptr<cppbor::Array> parsed(parsedCsrPayload.release()->asArray());
- if (!parsed) {
- return "CSR payload is not a CBOR array.";
- }
-
- if (parsed->size() != 4U) {
- return "CSR payload must contain version, certificate type, device info, keys. "
- "However, the parsed CSR payload has " +
- std::to_string(parsed->size()) + " entries.";
- }
-
- auto signedVersion = parsed->get(0)->asUint();
- auto signedCertificateType = parsed->get(1)->asTstr();
- auto signedDeviceInfo = parsed->get(2)->asMap();
- auto signedKeys = parsed->get(3)->asArray();
-
- if (!signedVersion || signedVersion->value() != 3U) {
- return "CSR payload version must be an unsigned integer and must be equal to 3.";
- }
- if (!signedCertificateType) {
- // Certificate type is allowed to be extendend by vendor, i.e. we can't
- // enforce its value.
- return "Certificate type must be a Tstr.";
- }
- if (!signedDeviceInfo) {
- return "Device info must be an Map.";
- }
- if (!signedKeys) {
- return "Keys must be an Array.";
- }
-
- auto result =
- parseAndValidateDeviceInfo(signedDeviceInfo->encode(), rpcHardwareInfo, isFactory);
- if (!result) {
- return result.message();
- }
-
- if (signedKeys->encode() != keysToSign.encode()) {
- return "Signed keys do not match.";
- }
-
- return std::move(parsed);
-}
-
-ErrMsgOr<bytevec> parseAndValidateAuthenticatedRequestSignedPayload(
- const std::vector<uint8_t>& signedPayload, const std::vector<uint8_t>& challenge) {
- auto [parsedSignedPayload, _, errMsg] = cppbor::parse(signedPayload);
- if (!parsedSignedPayload) {
- return errMsg;
- }
- if (!parsedSignedPayload->asArray()) {
- return "SignedData payload is not a CBOR array.";
- }
- if (parsedSignedPayload->asArray()->size() != 2U) {
- return "SignedData payload must contain the challenge and request. However, the parsed "
- "SignedData payload has " +
- std::to_string(parsedSignedPayload->asArray()->size()) + " entries.";
- }
-
- auto signedChallenge = parsedSignedPayload->asArray()->get(0)->asBstr();
- auto signedRequest = parsedSignedPayload->asArray()->get(1)->asBstr();
-
- if (!signedChallenge) {
- return "Challenge must be a Bstr.";
- }
-
- if (challenge.size() > 64) {
- return "Challenge size must be between 0 and 64 bytes inclusive. "
- "However, challenge is " +
- std::to_string(challenge.size()) + " bytes long.";
- }
-
- auto challengeBstr = cppbor::Bstr(challenge);
- if (*signedChallenge != challengeBstr) {
- return "Signed challenge does not match."
- "\n Actual: " +
- cppbor::prettyPrint(signedChallenge->asBstr(), 64 /* maxBStrSize */) +
- "\nExpected: " + cppbor::prettyPrint(&challengeBstr, 64 /* maxBStrSize */);
- }
-
- if (!signedRequest) {
- return "Request must be a Bstr.";
- }
-
- return signedRequest->value();
-}
-
ErrMsgOr<hwtrust::DiceChain::Kind> getDiceChainKind() {
int vendor_api_level = ::android::base::GetIntProperty("ro.vendor.api_level", -1);
- if (vendor_api_level == __ANDROID_API_T__) {
+ if (vendor_api_level <= __ANDROID_API_T__) {
return hwtrust::DiceChain::Kind::kVsr13;
} else if (vendor_api_level == __ANDROID_API_U__) {
return hwtrust::DiceChain::Kind::kVsr14;
@@ -1018,87 +769,8 @@
}
}
-ErrMsgOr<bytevec> parseAndValidateAuthenticatedRequest(const std::vector<uint8_t>& request,
- const std::vector<uint8_t>& challenge,
- const std::string& instanceName,
- bool allowAnyMode = false,
- bool allowDegenerate = true,
- bool requireUdsCerts = false) {
- auto [parsedRequest, _, csrErrMsg] = cppbor::parse(request);
- if (!parsedRequest) {
- return csrErrMsg;
- }
- if (!parsedRequest->asArray()) {
- return "AuthenticatedRequest is not a CBOR array.";
- }
- if (parsedRequest->asArray()->size() != 4U) {
- return "AuthenticatedRequest must contain version, UDS certificates, DICE chain, and "
- "signed data. However, the parsed AuthenticatedRequest has " +
- std::to_string(parsedRequest->asArray()->size()) + " entries.";
- }
-
- auto version = parsedRequest->asArray()->get(0)->asUint();
- auto udsCerts = parsedRequest->asArray()->get(1)->asMap();
- auto diceCertChain = parsedRequest->asArray()->get(2)->asArray();
- auto signedData = parsedRequest->asArray()->get(3)->asArray();
-
- if (!version || version->value() != 1U) {
- return "AuthenticatedRequest version must be an unsigned integer and must be equal to 1.";
- }
-
- if (!udsCerts) {
- return "AuthenticatedRequest UdsCerts must be a Map.";
- }
- if (requireUdsCerts && udsCerts->size() == 0) {
- return "AuthenticatedRequest UdsCerts must not be empty.";
- }
- if (!diceCertChain) {
- return "AuthenticatedRequest DiceCertChain must be an Array.";
- }
- if (!signedData) {
- return "AuthenticatedRequest SignedData must be an Array.";
- }
-
- // DICE chain is [ pubkey, + DiceChainEntry ].
- auto diceChainKind = getDiceChainKind();
- if (!diceChainKind) {
- return diceChainKind.message();
- }
-
- auto diceContents =
- validateBcc(diceCertChain, *diceChainKind, allowAnyMode, allowDegenerate, instanceName);
- if (!diceContents) {
- return diceContents.message() + "\n" + prettyPrint(diceCertChain);
- }
-
- if (!diceCertChain->get(0)->asMap()) {
- return "AuthenticatedRequest The first entry in DiceCertChain must be a Map.";
- }
- auto udsPub = diceCertChain->get(0)->asMap()->encode();
- auto error = validateUdsCerts(*udsCerts, udsPub);
- if (error) {
- return *error;
- }
-
- if (diceContents->empty()) {
- return "AuthenticatedRequest DiceContents must not be empty.";
- }
- auto& kmDiceKey = diceContents->back().pubKey;
- auto signedPayload = verifyAndParseCoseSign1(signedData, kmDiceKey, /*aad=*/{});
- if (!signedPayload) {
- return signedPayload.message();
- }
-
- auto payload = parseAndValidateAuthenticatedRequestSignedPayload(*signedPayload, challenge);
- if (!payload) {
- return payload.message();
- }
-
- return payload;
-}
-
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyCsr(
- const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
+ const cppbor::Array& keysToSign, const std::vector<uint8_t>& encodedCsr,
const RpcHardwareInfo& rpcHardwareInfo, const std::string& instanceName,
const std::vector<uint8_t>& challenge, bool isFactory, bool allowAnyMode = false,
bool allowDegenerate = true, bool requireUdsCerts = false) {
@@ -1108,14 +780,68 @@
") does not match expected version (3).";
}
- auto csrPayload = parseAndValidateAuthenticatedRequest(
- csr, challenge, instanceName, allowAnyMode, allowDegenerate, requireUdsCerts);
-
- if (!csrPayload) {
- return csrPayload.message();
+ auto diceChainKind = getDiceChainKind();
+ if (!diceChainKind) {
+ return diceChainKind.message();
}
- return parseAndValidateCsrPayload(keysToSign, *csrPayload, rpcHardwareInfo, isFactory);
+ allowAnyMode = maybeOverrideAllowAnyMode(allowAnyMode);
+
+ auto csr = hwtrust::Csr::validate(encodedCsr, *diceChainKind, isFactory, allowAnyMode,
+ deviceSuffix(instanceName));
+
+ if (!csr.ok()) {
+ return csr.error().message();
+ }
+
+ if (!allowDegenerate) {
+ auto diceChain = csr->getDiceChain();
+ if (!diceChain.ok()) {
+ return diceChain.error().message();
+ }
+
+ if (!diceChain->IsProper()) {
+ return kErrorDiceChainIsDegenerate;
+ }
+ }
+
+ if (requireUdsCerts && !csr->hasUdsCerts()) {
+ return kErrorUdsCertsAreRequired;
+ }
+
+ auto equalChallenges = csr->compareChallenge(challenge);
+ if (!equalChallenges.ok()) {
+ return equalChallenges.error().message();
+ }
+
+ if (!*equalChallenges) {
+ return kErrorChallengeMismatch;
+ }
+
+ auto equalKeysToSign = csr->compareKeysToSign(keysToSign.encode());
+ if (!equalKeysToSign.ok()) {
+ return equalKeysToSign.error().message();
+ }
+
+ if (!*equalKeysToSign) {
+ return kErrorKeysToSignMismatch;
+ }
+
+ auto csrPayload = csr->getCsrPayload();
+ if (!csrPayload) {
+ return csrPayload.error().message();
+ }
+
+ auto [csrPayloadDecoded, _, errMsg] = cppbor::parse(*csrPayload);
+ if (!csrPayloadDecoded) {
+ return errMsg;
+ }
+
+ if (!csrPayloadDecoded->asArray()) {
+ return "CSR payload is not an array.";
+ }
+
+ return std::unique_ptr<cppbor::Array>(csrPayloadDecoded.release()->asArray());
}
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(
@@ -1143,8 +869,8 @@
return diceChainKind.message();
}
- auto csr = hwtrust::Csr::validate(encodedCsr, *diceChainKind, false /*allowAnyMode*/,
- deviceSuffix(instanceName));
+ auto csr = hwtrust::Csr::validate(encodedCsr, *diceChainKind, false /*isFactory*/,
+ false /*allowAnyMode*/, deviceSuffix(instanceName));
if (!csr.ok()) {
return csr.error().message();
}
@@ -1157,4 +883,91 @@
return diceChain->IsProper();
}
+std::string hexlify(const std::vector<uint8_t>& bytes) {
+ std::stringstream ss;
+ ss << std::hex << std::setfill('0');
+
+ for (const auto& byte : bytes) {
+ ss << std::setw(2) << static_cast<int>(byte);
+ }
+
+ return ss.str();
+}
+
+ErrMsgOr<bool> compareRootPublicKeysInDiceChains(const std::vector<uint8_t>& encodedCsr1,
+ std::string_view instanceName1,
+ const std::vector<uint8_t>& encodedCsr2,
+ std::string_view instanceName2) {
+ auto diceChainKind = getDiceChainKind();
+ if (!diceChainKind) {
+ return diceChainKind.message();
+ }
+
+ auto csr1 = hwtrust::Csr::validate(encodedCsr1, *diceChainKind, false /*isFactory*/,
+ false /*allowAnyMode*/, deviceSuffix(instanceName1));
+ if (!csr1.ok()) {
+ return csr1.error().message();
+ }
+
+ auto diceChain1 = csr1->getDiceChain();
+ if (!diceChain1.ok()) {
+ return diceChain1.error().message();
+ }
+
+ auto proper1 = diceChain1->IsProper();
+ if (!proper1) {
+ return std::string(instanceName1) + " has a degenerate DICE chain:\n" +
+ hexlify(encodedCsr1);
+ }
+
+ auto csr2 = hwtrust::Csr::validate(encodedCsr2, *diceChainKind, false /*isFactory*/,
+ false /*allowAnyMode*/, deviceSuffix(instanceName2));
+ if (!csr2.ok()) {
+ return csr2.error().message();
+ }
+
+ auto diceChain2 = csr2->getDiceChain();
+ if (!diceChain2.ok()) {
+ return diceChain2.error().message();
+ }
+
+ auto proper2 = diceChain2->IsProper();
+ if (!proper2) {
+ return std::string(instanceName2) + " has a degenerate DICE chain:\n" +
+ hexlify(encodedCsr2);
+ }
+
+ auto result = diceChain1->compareRootPublicKey(*diceChain2);
+ if (!result.ok()) {
+ return result.error().message();
+ }
+
+ return *result;
+}
+
+ErrMsgOr<bool> verifyComponentNameInKeyMintDiceChain(const std::vector<uint8_t>& encodedCsr) {
+ auto diceChainKind = getDiceChainKind();
+ if (!diceChainKind) {
+ return diceChainKind.message();
+ }
+
+ auto csr = hwtrust::Csr::validate(encodedCsr, *diceChainKind, false /*isFactory*/,
+ false /*allowAnyMode*/, deviceSuffix(DEFAULT_INSTANCE_NAME));
+ if (!csr.ok()) {
+ return csr.error().message();
+ }
+
+ auto diceChain = csr->getDiceChain();
+ if (!diceChain.ok()) {
+ return diceChain.error().message();
+ }
+
+ auto satisfied = diceChain->componentNameContains(kKeyMintComponentName);
+ if (!satisfied.ok()) {
+ return satisfied.error().message();
+ }
+
+ return *satisfied;
+}
+
} // namespace aidl::android::hardware::security::keymint::remote_prov
diff --git a/security/keymint/support/remote_prov_utils_test.cpp b/security/keymint/support/remote_prov_utils_test.cpp
index 6f6a2d6..8e3600c 100644
--- a/security/keymint/support/remote_prov_utils_test.cpp
+++ b/security/keymint/support/remote_prov_utils_test.cpp
@@ -81,30 +81,438 @@
0x50, 0x12, 0x82, 0x37, 0xfe, 0xa4, 0x07, 0xc3, 0xd5, 0xc3, 0x78, 0xcc, 0xf9, 0xef, 0xe1,
0x95, 0x38, 0x9f, 0xb0, 0x79, 0x16, 0x4c, 0x4a, 0x23, 0xc4, 0xdc, 0x35, 0x4e, 0x0f};
+inline const std::vector<uint8_t> kKeysToSignForCsrWithDegenerateDiceChain{
+ 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x1d, 0x94, 0xf2, 0x27,
+ 0xc3, 0x70, 0x01, 0xde, 0x3c, 0xaf, 0x6f, 0xfd, 0x78, 0x08, 0x37, 0x39, 0x21, 0xdd, 0x46,
+ 0x6f, 0x08, 0x4f, 0x77, 0xf7, 0x80, 0x34, 0x30, 0x74, 0x78, 0x69, 0xeb, 0xb1, 0x22, 0x58,
+ 0x20, 0x6b, 0x71, 0xd7, 0x7f, 0x0e, 0x51, 0xb2, 0xc9, 0x3d, 0x1a, 0xa0, 0xe8, 0x7a, 0x0d,
+ 0x57, 0xfc, 0x91, 0xd0, 0x68, 0xf9, 0x33, 0x5f, 0x80, 0x29, 0x00, 0x80, 0x98, 0x78, 0x63,
+ 0x5b, 0x30, 0x24, 0x23, 0x58, 0x20, 0x09, 0x83, 0xa6, 0x5a, 0xbb, 0x3a, 0xf8, 0x90, 0x88,
+ 0x87, 0x16, 0x37, 0xb4, 0xe7, 0x11, 0x9b, 0xcc, 0xbb, 0x15, 0x82, 0xa9, 0x97, 0xa5, 0xad,
+ 0xa9, 0x85, 0x39, 0x30, 0x55, 0x46, 0x99, 0xc6, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01,
+ 0x21, 0x58, 0x20, 0xa8, 0xaa, 0x4b, 0x63, 0x86, 0xf6, 0x5c, 0xe4, 0x28, 0xda, 0x26, 0x3f,
+ 0x9a, 0x42, 0x6e, 0xb9, 0x2b, 0x4d, 0x5a, 0x49, 0x4c, 0x5f, 0x1a, 0xa2, 0x5f, 0xd4, 0x8f,
+ 0x84, 0xd7, 0x25, 0xe4, 0x6c, 0x22, 0x58, 0x20, 0x6b, 0xef, 0xde, 0xd6, 0x04, 0x58, 0x12,
+ 0xdb, 0xf8, 0x90, 0x2c, 0x9c, 0xe0, 0x5e, 0x43, 0xbc, 0xcf, 0x22, 0x01, 0x4d, 0x5c, 0x0c,
+ 0x86, 0x7b, 0x66, 0xd2, 0xa1, 0xfc, 0x69, 0x8a, 0x91, 0xfc, 0x23, 0x58, 0x20, 0x31, 0xaf,
+ 0x30, 0x85, 0x1f, 0x2a, 0x82, 0xe1, 0x9c, 0xda, 0xe5, 0x68, 0xed, 0x79, 0xc1, 0x35, 0x1a,
+ 0x02, 0xb4, 0x8a, 0xd2, 0x4c, 0xc4, 0x70, 0x6b, 0x88, 0x98, 0x23, 0x9e, 0xb3, 0x52, 0xb1};
+
inline const std::vector<uint8_t> kCsrWithDegenerateDiceChain{
- 0x85, 0x01, 0xa0, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x65,
- 0xe0, 0x51, 0x62, 0x45, 0x17, 0xcc, 0xa8, 0x40, 0x41, 0x6d, 0xc0, 0x86, 0x7a, 0x15, 0x6e,
- 0xee, 0x04, 0xae, 0xbd, 0x05, 0x13, 0x36, 0xcb, 0xd2, 0x8d, 0xd8, 0x80, 0x16, 0xc1, 0x69,
- 0x0d, 0x22, 0x58, 0x20, 0xea, 0xa1, 0x37, 0xd5, 0x01, 0xbd, 0xe0, 0x25, 0x6a, 0x3d, 0x4c,
- 0xcd, 0x31, 0xa1, 0x4d, 0xa6, 0x80, 0x82, 0x03, 0x40, 0xe2, 0x88, 0x81, 0x53, 0xc3, 0xb3,
- 0x6d, 0xf7, 0xf4, 0x10, 0xde, 0x96, 0x23, 0x58, 0x20, 0x24, 0x69, 0x44, 0x6e, 0xf5, 0xcc,
- 0x18, 0xfe, 0x63, 0xac, 0x5e, 0x85, 0x9c, 0xfc, 0x9d, 0xfa, 0x90, 0xee, 0x6c, 0xc2, 0x22,
- 0x49, 0x02, 0xc7, 0x93, 0xf4, 0x30, 0xf1, 0x51, 0x11, 0x20, 0x33, 0x84, 0x43, 0xa1, 0x01,
- 0x26, 0xa0, 0x58, 0x97, 0xa5, 0x01, 0x66, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x02, 0x67,
- 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01, 0x3a,
- 0x00, 0x47, 0x44, 0x57, 0x58, 0x70, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58,
- 0x20, 0x65, 0xe0, 0x51, 0x62, 0x45, 0x17, 0xcc, 0xa8, 0x40, 0x41, 0x6d, 0xc0, 0x86, 0x7a,
- 0x15, 0x6e, 0xee, 0x04, 0xae, 0xbd, 0x05, 0x13, 0x36, 0xcb, 0xd2, 0x8d, 0xd8, 0x80, 0x16,
- 0xc1, 0x69, 0x0d, 0x22, 0x58, 0x20, 0xea, 0xa1, 0x37, 0xd5, 0x01, 0xbd, 0xe0, 0x25, 0x6a,
- 0x3d, 0x4c, 0xcd, 0x31, 0xa1, 0x4d, 0xa6, 0x80, 0x82, 0x03, 0x40, 0xe2, 0x88, 0x81, 0x53,
- 0xc3, 0xb3, 0x6d, 0xf7, 0xf4, 0x10, 0xde, 0x96, 0x23, 0x58, 0x20, 0x24, 0x69, 0x44, 0x6e,
- 0xf5, 0xcc, 0x18, 0xfe, 0x63, 0xac, 0x5e, 0x85, 0x9c, 0xfc, 0x9d, 0xfa, 0x90, 0xee, 0x6c,
- 0xc2, 0x22, 0x49, 0x02, 0xc7, 0x93, 0xf4, 0x30, 0xf1, 0x51, 0x11, 0x20, 0x33, 0x3a, 0x00,
- 0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x40, 0x16, 0xb9, 0x51, 0xdf, 0x31, 0xad, 0xa0, 0x3d,
- 0x98, 0x40, 0x85, 0xdf, 0xd9, 0xbe, 0xf6, 0x79, 0x62, 0x36, 0x8b, 0x60, 0xaa, 0x79, 0x8e,
- 0x52, 0x04, 0xdd, 0xba, 0x39, 0xa2, 0x58, 0x9c, 0x60, 0xd5, 0x96, 0x51, 0x42, 0xe2, 0xa5,
- 0x57, 0x58, 0xb4, 0x89, 0x2c, 0x94, 0xb9, 0xda, 0xe7, 0x93, 0x85, 0xda, 0x64, 0xa0, 0x52,
- 0xfc, 0x6b, 0xb1, 0x0a, 0xa8, 0x13, 0xd9, 0x84, 0xfb, 0x34, 0x77, 0x84, 0x43, 0xa1, 0x01,
+ 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xf2,
+ 0xc6, 0x50, 0xd2, 0x42, 0x59, 0xe0, 0x4e, 0x7b, 0xc0, 0x75, 0x41, 0xa2, 0xe9, 0xd0, 0xe8,
+ 0x18, 0xd7, 0xd7, 0x63, 0x7e, 0x41, 0x04, 0x7e, 0x52, 0x1a, 0xb1, 0xb7, 0xdc, 0x13, 0xb3,
+ 0x0f, 0x22, 0x58, 0x20, 0x1a, 0xf3, 0x8b, 0x0f, 0x7a, 0xc6, 0xf2, 0xb8, 0x31, 0x0b, 0x40,
+ 0x9b, 0x7e, 0xb6, 0xd6, 0xec, 0x9c, 0x21, 0xad, 0xde, 0xd1, 0x6c, 0x52, 0xfc, 0x06, 0xf1,
+ 0x39, 0x31, 0xa0, 0x22, 0x65, 0x86, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x58, 0x74, 0xa5,
+ 0x01, 0x66, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01, 0x3a, 0x00, 0x47, 0x44, 0x57, 0x58,
+ 0x4d, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xf2, 0xc6, 0x50, 0xd2,
+ 0x42, 0x59, 0xe0, 0x4e, 0x7b, 0xc0, 0x75, 0x41, 0xa2, 0xe9, 0xd0, 0xe8, 0x18, 0xd7, 0xd7,
+ 0x63, 0x7e, 0x41, 0x04, 0x7e, 0x52, 0x1a, 0xb1, 0xb7, 0xdc, 0x13, 0xb3, 0x0f, 0x22, 0x58,
+ 0x20, 0x1a, 0xf3, 0x8b, 0x0f, 0x7a, 0xc6, 0xf2, 0xb8, 0x31, 0x0b, 0x40, 0x9b, 0x7e, 0xb6,
+ 0xd6, 0xec, 0x9c, 0x21, 0xad, 0xde, 0xd1, 0x6c, 0x52, 0xfc, 0x06, 0xf1, 0x39, 0x31, 0xa0,
+ 0x22, 0x65, 0x86, 0x3a, 0x00, 0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x40, 0x1e, 0xdf, 0xe0,
+ 0x1c, 0xca, 0xbb, 0xb2, 0x13, 0xae, 0xe2, 0x49, 0x32, 0x3c, 0x6e, 0x9c, 0x6e, 0xf4, 0x23,
+ 0x87, 0x41, 0x60, 0x04, 0x34, 0xe6, 0x32, 0xe2, 0xf1, 0x22, 0x55, 0xcc, 0x89, 0x4b, 0x4f,
+ 0xdb, 0x05, 0x89, 0x8a, 0x3c, 0x2f, 0x8a, 0x52, 0x84, 0x43, 0xdc, 0x43, 0x62, 0x7e, 0x85,
+ 0xb3, 0xea, 0x49, 0x3b, 0x0b, 0x4a, 0xf0, 0x64, 0xfe, 0x8f, 0x41, 0xb6, 0xd1, 0xcc, 0xe3,
+ 0xf6, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x02, 0x0e, 0x82, 0x58, 0x20, 0x01, 0x02,
+ 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
+ 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
+ 0x59, 0x01, 0xe8, 0x84, 0x03, 0x67, 0x6b, 0x65, 0x79, 0x6d, 0x69, 0x6e, 0x74, 0xae, 0x65,
+ 0x62, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x65, 0x66, 0x75,
+ 0x73, 0x65, 0x64, 0x01, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x65, 0x6d, 0x6f, 0x64, 0x65,
+ 0x6c, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x67, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x65, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x68,
+ 0x76, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x65, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x6a,
+ 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x31, 0x32, 0x6c, 0x6d,
+ 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x66, 0x47, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x6d, 0x76, 0x62, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x67, 0x65,
+ 0x73, 0x74, 0x4f, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc,
+ 0xdd, 0xee, 0xff, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x65,
+ 0x76, 0x65, 0x6c, 0x63, 0x74, 0x65, 0x65, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x61,
+ 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x62, 0x70,
+ 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74,
+ 0x65, 0x66, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x72, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34,
+ 0x8c, 0x61, 0x72, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68,
+ 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x63, 0x82, 0xa6, 0x01, 0x02,
+ 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x1d, 0x94, 0xf2, 0x27, 0xc3, 0x70, 0x01, 0xde,
+ 0x3c, 0xaf, 0x6f, 0xfd, 0x78, 0x08, 0x37, 0x39, 0x21, 0xdd, 0x46, 0x6f, 0x08, 0x4f, 0x77,
+ 0xf7, 0x80, 0x34, 0x30, 0x74, 0x78, 0x69, 0xeb, 0xb1, 0x22, 0x58, 0x20, 0x6b, 0x71, 0xd7,
+ 0x7f, 0x0e, 0x51, 0xb2, 0xc9, 0x3d, 0x1a, 0xa0, 0xe8, 0x7a, 0x0d, 0x57, 0xfc, 0x91, 0xd0,
+ 0x68, 0xf9, 0x33, 0x5f, 0x80, 0x29, 0x00, 0x80, 0x98, 0x78, 0x63, 0x5b, 0x30, 0x24, 0x23,
+ 0x58, 0x20, 0x09, 0x83, 0xa6, 0x5a, 0xbb, 0x3a, 0xf8, 0x90, 0x88, 0x87, 0x16, 0x37, 0xb4,
+ 0xe7, 0x11, 0x9b, 0xcc, 0xbb, 0x15, 0x82, 0xa9, 0x97, 0xa5, 0xad, 0xa9, 0x85, 0x39, 0x30,
+ 0x55, 0x46, 0x99, 0xc6, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xa8,
+ 0xaa, 0x4b, 0x63, 0x86, 0xf6, 0x5c, 0xe4, 0x28, 0xda, 0x26, 0x3f, 0x9a, 0x42, 0x6e, 0xb9,
+ 0x2b, 0x4d, 0x5a, 0x49, 0x4c, 0x5f, 0x1a, 0xa2, 0x5f, 0xd4, 0x8f, 0x84, 0xd7, 0x25, 0xe4,
+ 0x6c, 0x22, 0x58, 0x20, 0x6b, 0xef, 0xde, 0xd6, 0x04, 0x58, 0x12, 0xdb, 0xf8, 0x90, 0x2c,
+ 0x9c, 0xe0, 0x5e, 0x43, 0xbc, 0xcf, 0x22, 0x01, 0x4d, 0x5c, 0x0c, 0x86, 0x7b, 0x66, 0xd2,
+ 0xa1, 0xfc, 0x69, 0x8a, 0x91, 0xfc, 0x23, 0x58, 0x20, 0x31, 0xaf, 0x30, 0x85, 0x1f, 0x2a,
+ 0x82, 0xe1, 0x9c, 0xda, 0xe5, 0x68, 0xed, 0x79, 0xc1, 0x35, 0x1a, 0x02, 0xb4, 0x8a, 0xd2,
+ 0x4c, 0xc4, 0x70, 0x6b, 0x88, 0x98, 0x23, 0x9e, 0xb3, 0x52, 0xb1, 0x58, 0x40, 0x8e, 0x7e,
+ 0xdf, 0x77, 0x13, 0xdb, 0x51, 0xf6, 0xc1, 0x67, 0x52, 0x48, 0x48, 0x79, 0xe6, 0xbc, 0x89,
+ 0xe2, 0xfe, 0x7c, 0x0d, 0x2c, 0x88, 0x3b, 0x23, 0x66, 0x93, 0x7b, 0x94, 0x59, 0xc4, 0x87,
+ 0x16, 0xc4, 0x3a, 0x85, 0x60, 0xe3, 0x62, 0x45, 0x53, 0xa8, 0x1d, 0x4e, 0xa4, 0x2b, 0x61,
+ 0x33, 0x17, 0x71, 0xb6, 0x40, 0x11, 0x7d, 0x23, 0x64, 0xe6, 0x49, 0xbe, 0xa6, 0x85, 0x32,
+ 0x1a, 0x89, 0xa1, 0x6b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74,
+ 0x78, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
+ 0x74, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69,
+ 0x64, 0x2f, 0x32, 0x30, 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75,
+ 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79,
+ 0x73};
+
+// The challenge that is in kKeysToSignForCsrWithUdsCerts and kCsrWithUdsCerts
+inline const std::vector<uint8_t> kChallenge{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
+ 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20};
+
+inline const std::vector<uint8_t> kKeysToSignForCsrWithUdsCerts{
+ 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xd5, 0x0b, 0x27, 0x39,
+ 0xa3, 0xd5, 0xfd, 0xd9, 0x4f, 0x87, 0x4a, 0x97, 0x17, 0x60, 0x6c, 0x63, 0x55, 0x13, 0xa0,
+ 0xf5, 0x1c, 0x2b, 0xe7, 0x0e, 0x8e, 0xdb, 0x76, 0x82, 0x69, 0x5a, 0x46, 0xec, 0x22, 0x58,
+ 0x20, 0xa6, 0x08, 0xb3, 0x57, 0xaa, 0x5f, 0x72, 0x2b, 0xb1, 0xf0, 0x43, 0x52, 0xf4, 0xcb,
+ 0x97, 0x39, 0xfd, 0x54, 0x79, 0xa3, 0xaf, 0x07, 0xb7, 0xbe, 0xbc, 0x93, 0xc1, 0xb6, 0x9b,
+ 0x2f, 0x75, 0x1b, 0x23, 0x58, 0x21, 0x00, 0xb4, 0x59, 0xe3, 0x78, 0x6f, 0x3f, 0xbd, 0xdc,
+ 0x38, 0x8a, 0xa5, 0x7d, 0xbe, 0xe0, 0xce, 0xf9, 0x2e, 0x9a, 0x5b, 0xfc, 0xbd, 0x4d, 0x27,
+ 0x7b, 0xa7, 0xc8, 0xda, 0xaa, 0xe4, 0xcd, 0xf3, 0xd2, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20,
+ 0x01, 0x21, 0x58, 0x20, 0x10, 0x6c, 0xe8, 0x71, 0xa8, 0x78, 0x9d, 0x29, 0xbe, 0xf8, 0x84,
+ 0x39, 0xd4, 0xa2, 0xf5, 0x3e, 0x09, 0xf1, 0xd4, 0x81, 0x59, 0x24, 0x63, 0x07, 0xae, 0x25,
+ 0xad, 0x24, 0x72, 0x0f, 0x8b, 0xd0, 0x22, 0x58, 0x20, 0xe8, 0xba, 0x76, 0x49, 0x7b, 0x97,
+ 0x98, 0xcf, 0xbb, 0x90, 0xfa, 0x30, 0x3a, 0x2d, 0x88, 0xfe, 0x3f, 0xc6, 0x75, 0x05, 0x7b,
+ 0x59, 0xdf, 0x14, 0xd8, 0xde, 0x4d, 0x51, 0x8b, 0x2f, 0x5a, 0xc7, 0x23, 0x58, 0x20, 0x76,
+ 0x11, 0x2f, 0x31, 0xe5, 0xc2, 0xbb, 0xa7, 0x2c, 0x2b, 0x2f, 0x73, 0x16, 0x29, 0xf8, 0x67,
+ 0x66, 0x44, 0x7f, 0x3f, 0x22, 0xa2, 0x40, 0x45, 0x12, 0xac, 0x97, 0x06, 0xc8, 0x66, 0x08,
+ 0xc9, 0x0a};
+
+inline const std::vector<uint8_t> kCsrWithUdsCerts{
+ 0x85, 0x01, 0xa1, 0x70, 0x74, 0x65, 0x73, 0x74, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72,
+ 0x2d, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0x59, 0x01, 0x6c, 0x30, 0x82, 0x01, 0x68, 0x30, 0x82,
+ 0x01, 0x1a, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x01, 0x7b, 0x30, 0x05, 0x06, 0x03, 0x2b,
+ 0x65, 0x70, 0x30, 0x2b, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c,
+ 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31, 0x12, 0x30,
+ 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x09, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x52, 0x6f,
+ 0x6f, 0x74, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x34, 0x31, 0x31, 0x31, 0x34, 0x30, 0x39, 0x35,
+ 0x32, 0x30, 0x37, 0x5a, 0x17, 0x0d, 0x34, 0x39, 0x31, 0x31, 0x30, 0x38, 0x30, 0x39, 0x35,
+ 0x32, 0x30, 0x37, 0x5a, 0x30, 0x2b, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a,
+ 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31,
+ 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x09, 0x46, 0x61, 0x6b, 0x65, 0x20,
+ 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x21,
+ 0x00, 0x54, 0x40, 0x8c, 0x1b, 0x60, 0x39, 0x81, 0xe7, 0x38, 0x87, 0xb9, 0x75, 0x10, 0x30,
+ 0x6a, 0x1b, 0x9b, 0x38, 0x61, 0xa0, 0x94, 0x49, 0xb0, 0xf3, 0xae, 0x39, 0x53, 0x2d, 0x61,
+ 0x8d, 0x6e, 0x59, 0xa3, 0x63, 0x30, 0x61, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04,
+ 0x16, 0x04, 0x14, 0x6d, 0xd5, 0xea, 0x8c, 0xe0, 0x5a, 0x50, 0xd9, 0x36, 0xf3, 0x28, 0xc2,
+ 0x54, 0x1d, 0xfa, 0x9d, 0x94, 0x19, 0x98, 0x76, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23,
+ 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x6d, 0xd5, 0xea, 0x8c, 0xe0, 0x5a, 0x50, 0xd9, 0x36,
+ 0xf3, 0x28, 0xc2, 0x54, 0x1d, 0xfa, 0x9d, 0x94, 0x19, 0x98, 0x76, 0x30, 0x0f, 0x06, 0x03,
+ 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x0e,
+ 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x02, 0x04, 0x30,
+ 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x41, 0x00, 0x1e, 0x27, 0x99, 0xd3, 0x05, 0xa7,
+ 0xd2, 0xc6, 0xad, 0x1f, 0x2c, 0xbd, 0xef, 0x34, 0x18, 0xbd, 0x37, 0xb9, 0x96, 0x57, 0x63,
+ 0x72, 0x7e, 0xf8, 0xe5, 0xa2, 0xb5, 0x9a, 0x20, 0x42, 0x1d, 0x9c, 0x8e, 0xdc, 0x97, 0xd4,
+ 0x3b, 0x65, 0xe0, 0x52, 0xb4, 0x0d, 0x95, 0x59, 0x94, 0x94, 0x7a, 0x31, 0x9e, 0x45, 0x4b,
+ 0x93, 0x3d, 0x5d, 0x88, 0x98, 0xb1, 0x52, 0xf5, 0x46, 0x1c, 0x2a, 0x0b, 0x05, 0x59, 0x01,
+ 0x9f, 0x30, 0x82, 0x01, 0x9b, 0x30, 0x82, 0x01, 0x4d, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02,
+ 0x02, 0x01, 0xc8, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x30, 0x2b, 0x31, 0x15, 0x30,
+ 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x6f,
+ 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
+ 0x09, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x1e, 0x17, 0x0d, 0x32,
+ 0x34, 0x31, 0x31, 0x31, 0x34, 0x30, 0x39, 0x35, 0x32, 0x30, 0x37, 0x5a, 0x17, 0x0d, 0x34,
+ 0x39, 0x31, 0x31, 0x30, 0x38, 0x30, 0x39, 0x35, 0x32, 0x30, 0x37, 0x5a, 0x30, 0x2e, 0x31,
+ 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20,
+ 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04,
+ 0x03, 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x68, 0x69, 0x70, 0x73, 0x65, 0x74,
+ 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08,
+ 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xc9, 0x35, 0xf7,
+ 0x7e, 0x71, 0xc9, 0xa4, 0xd2, 0x13, 0x58, 0x5a, 0xc1, 0x0c, 0x17, 0xa8, 0x2c, 0x28, 0x99,
+ 0x32, 0x8e, 0x01, 0x45, 0xb8, 0xf1, 0xf4, 0xf8, 0x37, 0x25, 0x4a, 0x25, 0x1f, 0xbf, 0x8f,
+ 0xd8, 0xdf, 0x53, 0xdd, 0x95, 0x7a, 0x90, 0xff, 0xe3, 0x40, 0xbf, 0xda, 0x19, 0x0c, 0x14,
+ 0x41, 0x1c, 0x76, 0x73, 0x4e, 0x86, 0x94, 0x7d, 0x2c, 0x21, 0x5f, 0x5e, 0x05, 0x26, 0x15,
+ 0x4f, 0xa3, 0x63, 0x30, 0x61, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04,
+ 0x14, 0x12, 0x84, 0xe1, 0x31, 0xef, 0xa8, 0xfd, 0xcc, 0xbb, 0x35, 0x22, 0xb9, 0x99, 0xd1,
+ 0xca, 0x64, 0x19, 0x09, 0x54, 0x4c, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18,
+ 0x30, 0x16, 0x80, 0x14, 0x6d, 0xd5, 0xea, 0x8c, 0xe0, 0x5a, 0x50, 0xd9, 0x36, 0xf3, 0x28,
+ 0xc2, 0x54, 0x1d, 0xfa, 0x9d, 0x94, 0x19, 0x98, 0x76, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d,
+ 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x0e, 0x06, 0x03,
+ 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x02, 0x04, 0x30, 0x05, 0x06,
+ 0x03, 0x2b, 0x65, 0x70, 0x03, 0x41, 0x00, 0xc7, 0x93, 0x86, 0x58, 0xb2, 0x31, 0x30, 0x4f,
+ 0x1a, 0x53, 0x06, 0x87, 0x0e, 0xdf, 0xc4, 0xd8, 0x03, 0xf4, 0xaf, 0xa3, 0x2d, 0xfb, 0x7d,
+ 0xab, 0x08, 0x70, 0x47, 0x38, 0x10, 0xc5, 0xa8, 0x5e, 0x67, 0x64, 0xc7, 0xdc, 0x28, 0xe8,
+ 0x63, 0x3c, 0xa7, 0xb8, 0xf9, 0xbe, 0x3e, 0x75, 0xa7, 0x1c, 0xac, 0xc4, 0x81, 0x82, 0x4a,
+ 0x21, 0xf0, 0x89, 0x8e, 0x99, 0xf4, 0x52, 0x23, 0x30, 0x6d, 0x04, 0x82, 0xa5, 0x01, 0x02,
+ 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xc9, 0x35, 0xf7, 0x7e, 0x71, 0xc9, 0xa4, 0xd2,
+ 0x13, 0x58, 0x5a, 0xc1, 0x0c, 0x17, 0xa8, 0x2c, 0x28, 0x99, 0x32, 0x8e, 0x01, 0x45, 0xb8,
+ 0xf1, 0xf4, 0xf8, 0x37, 0x25, 0x4a, 0x25, 0x1f, 0xbf, 0x22, 0x58, 0x20, 0x8f, 0xd8, 0xdf,
+ 0x53, 0xdd, 0x95, 0x7a, 0x90, 0xff, 0xe3, 0x40, 0xbf, 0xda, 0x19, 0x0c, 0x14, 0x41, 0x1c,
+ 0x76, 0x73, 0x4e, 0x86, 0x94, 0x7d, 0x2c, 0x21, 0x5f, 0x5e, 0x05, 0x26, 0x15, 0x4f, 0x84,
+ 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x01, 0x04, 0xa9, 0x01, 0x66, 0x69, 0x73, 0x73, 0x75,
+ 0x65, 0x72, 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44,
+ 0x50, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x52, 0x58, 0x20, 0xb8, 0x96, 0x54,
+ 0xe2, 0x2c, 0xa4, 0xd2, 0x4a, 0x9c, 0x0e, 0x45, 0x11, 0xc8, 0xf2, 0x63, 0xf0, 0x66, 0x0d,
+ 0x2e, 0x20, 0x48, 0x96, 0x90, 0x14, 0xf4, 0x54, 0x63, 0xc4, 0xf4, 0x39, 0x30, 0x38, 0x3a,
+ 0x00, 0x47, 0x44, 0x53, 0x55, 0xa1, 0x3a, 0x00, 0x01, 0x11, 0x71, 0x6e, 0x63, 0x6f, 0x6d,
+ 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x00, 0x47, 0x44,
+ 0x54, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01, 0x3a, 0x00, 0x47,
+ 0x44, 0x57, 0x58, 0x4d, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xb8,
+ 0x42, 0x01, 0xd7, 0xf0, 0xb7, 0x57, 0x98, 0xe3, 0x05, 0xf5, 0xcf, 0xef, 0x7b, 0x38, 0x39,
+ 0x6d, 0x55, 0x68, 0x72, 0xa6, 0x46, 0xd3, 0x16, 0x89, 0x1a, 0x3a, 0x9b, 0xc8, 0xce, 0xc0,
+ 0x1c, 0x22, 0x58, 0x20, 0xd1, 0xd5, 0x0e, 0xb8, 0xd0, 0x99, 0x09, 0x41, 0x63, 0x93, 0x33,
+ 0x20, 0xef, 0x84, 0xbb, 0xf5, 0xc9, 0x27, 0x4b, 0x52, 0x33, 0xa9, 0x07, 0xcc, 0x5d, 0x22,
+ 0xab, 0xf6, 0x8f, 0x2d, 0x15, 0x41, 0x3a, 0x00, 0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x40,
+ 0xd0, 0x6d, 0xb0, 0xd2, 0x49, 0xc8, 0xd3, 0x81, 0xdd, 0x10, 0x4b, 0xd9, 0x49, 0x45, 0x93,
+ 0x10, 0xd5, 0x1b, 0xc7, 0x59, 0x66, 0x6f, 0x6c, 0x06, 0xb5, 0x72, 0x98, 0x51, 0x2d, 0xed,
+ 0xa0, 0xd9, 0xbb, 0x4a, 0xe6, 0x9b, 0x67, 0x31, 0xd9, 0x27, 0xd0, 0x9c, 0xf8, 0x3d, 0xfc,
+ 0x61, 0x8d, 0x53, 0x13, 0x53, 0x68, 0xb4, 0xb5, 0x41, 0x4c, 0xea, 0x6a, 0x28, 0xbb, 0xcb,
+ 0x63, 0x4d, 0xd0, 0x20, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x02, 0x0f, 0x82, 0x58,
+ 0x20, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
+ 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
+ 0x1e, 0x1f, 0x20, 0x59, 0x01, 0xe9, 0x84, 0x03, 0x67, 0x6b, 0x65, 0x79, 0x6d, 0x69, 0x6e,
+ 0x74, 0xae, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x01, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x65, 0x6d,
+ 0x6f, 0x64, 0x65, 0x6c, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x66, 0x64, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x67, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x65, 0x70, 0x69, 0x78,
+ 0x65, 0x6c, 0x68, 0x76, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x65, 0x67, 0x72, 0x65,
+ 0x65, 0x6e, 0x6a, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x31,
+ 0x32, 0x6c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x66,
+ 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6d, 0x76, 0x62, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64,
+ 0x69, 0x67, 0x65, 0x73, 0x74, 0x4f, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
+ 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
+ 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x63, 0x74, 0x65, 0x65, 0x70, 0x62, 0x6f, 0x6f, 0x74,
+ 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34,
+ 0x8c, 0x62, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73,
+ 0x74, 0x61, 0x74, 0x65, 0x66, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x72, 0x73, 0x79, 0x73,
+ 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c,
+ 0x1a, 0x01, 0x34, 0x8c, 0x61, 0x72, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x70, 0x61,
+ 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x63, 0x82,
+ 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xd5, 0x0b, 0x27, 0x39, 0xa3,
+ 0xd5, 0xfd, 0xd9, 0x4f, 0x87, 0x4a, 0x97, 0x17, 0x60, 0x6c, 0x63, 0x55, 0x13, 0xa0, 0xf5,
+ 0x1c, 0x2b, 0xe7, 0x0e, 0x8e, 0xdb, 0x76, 0x82, 0x69, 0x5a, 0x46, 0xec, 0x22, 0x58, 0x20,
+ 0xa6, 0x08, 0xb3, 0x57, 0xaa, 0x5f, 0x72, 0x2b, 0xb1, 0xf0, 0x43, 0x52, 0xf4, 0xcb, 0x97,
+ 0x39, 0xfd, 0x54, 0x79, 0xa3, 0xaf, 0x07, 0xb7, 0xbe, 0xbc, 0x93, 0xc1, 0xb6, 0x9b, 0x2f,
+ 0x75, 0x1b, 0x23, 0x58, 0x21, 0x00, 0xb4, 0x59, 0xe3, 0x78, 0x6f, 0x3f, 0xbd, 0xdc, 0x38,
+ 0x8a, 0xa5, 0x7d, 0xbe, 0xe0, 0xce, 0xf9, 0x2e, 0x9a, 0x5b, 0xfc, 0xbd, 0x4d, 0x27, 0x7b,
+ 0xa7, 0xc8, 0xda, 0xaa, 0xe4, 0xcd, 0xf3, 0xd2, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01,
+ 0x21, 0x58, 0x20, 0x10, 0x6c, 0xe8, 0x71, 0xa8, 0x78, 0x9d, 0x29, 0xbe, 0xf8, 0x84, 0x39,
+ 0xd4, 0xa2, 0xf5, 0x3e, 0x09, 0xf1, 0xd4, 0x81, 0x59, 0x24, 0x63, 0x07, 0xae, 0x25, 0xad,
+ 0x24, 0x72, 0x0f, 0x8b, 0xd0, 0x22, 0x58, 0x20, 0xe8, 0xba, 0x76, 0x49, 0x7b, 0x97, 0x98,
+ 0xcf, 0xbb, 0x90, 0xfa, 0x30, 0x3a, 0x2d, 0x88, 0xfe, 0x3f, 0xc6, 0x75, 0x05, 0x7b, 0x59,
+ 0xdf, 0x14, 0xd8, 0xde, 0x4d, 0x51, 0x8b, 0x2f, 0x5a, 0xc7, 0x23, 0x58, 0x20, 0x76, 0x11,
+ 0x2f, 0x31, 0xe5, 0xc2, 0xbb, 0xa7, 0x2c, 0x2b, 0x2f, 0x73, 0x16, 0x29, 0xf8, 0x67, 0x66,
+ 0x44, 0x7f, 0x3f, 0x22, 0xa2, 0x40, 0x45, 0x12, 0xac, 0x97, 0x06, 0xc8, 0x66, 0x08, 0xc9,
+ 0x58, 0x40, 0x11, 0x65, 0x46, 0xfa, 0xbd, 0xe3, 0xd3, 0x1b, 0x0d, 0x78, 0x23, 0x2e, 0x5d,
+ 0x48, 0x3c, 0xab, 0xd3, 0x74, 0xf8, 0x41, 0x88, 0x9b, 0x48, 0xf3, 0x93, 0x06, 0x40, 0x1b,
+ 0x5f, 0x60, 0x7b, 0xbe, 0xd8, 0xa6, 0x65, 0xff, 0x6a, 0x89, 0x24, 0x12, 0x1b, 0xac, 0xa3,
+ 0xd5, 0x37, 0x85, 0x6e, 0x53, 0x8d, 0xa5, 0x07, 0xe7, 0xe7, 0x44, 0x2c, 0xba, 0xa0, 0xbe,
+ 0x1a, 0x43, 0xde, 0x28, 0x59, 0x65, 0xa1, 0x6b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70,
+ 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72,
+ 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a,
+ 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30, 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e,
+ 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
+ 0x2d, 0x6b, 0x65, 0x79, 0x73};
+
+inline const std::vector<uint8_t> kKeysToSignForCsrWithoutUdsCerts = {
+ 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x11, 0x29, 0x11, 0x96,
+ 0x98, 0x26, 0xb2, 0x3a, 0xf2, 0xf9, 0x95, 0xb7, 0x46, 0xb9, 0x38, 0x6e, 0x5e, 0x3d, 0x5e,
+ 0xb2, 0x19, 0x90, 0xc7, 0xd3, 0xbd, 0x49, 0x47, 0x55, 0xcb, 0xef, 0xeb, 0x89, 0x22, 0x58,
+ 0x20, 0x42, 0x87, 0xea, 0x75, 0x27, 0x42, 0x34, 0xeb, 0xe8, 0xb5, 0x50, 0xdf, 0xb0, 0xbf,
+ 0xef, 0x6b, 0x62, 0x90, 0x5c, 0xd1, 0xe8, 0x2b, 0x4d, 0x02, 0x58, 0xe6, 0xca, 0xda, 0xe6,
+ 0x33, 0x97, 0xff, 0x23, 0x58, 0x21, 0x00, 0x9b, 0x34, 0xdb, 0x1e, 0xe6, 0x53, 0x72, 0xaf,
+ 0x67, 0xb5, 0x5e, 0x9a, 0xee, 0x07, 0x31, 0x77, 0xa3, 0x8b, 0x6a, 0xe9, 0x58, 0x97, 0x04,
+ 0xe2, 0xa2, 0x48, 0x0f, 0xdf, 0x26, 0x4d, 0xe5, 0xbb, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20,
+ 0x01, 0x21, 0x58, 0x20, 0xf9, 0xd7, 0x37, 0x75, 0x6b, 0x55, 0xc7, 0x64, 0xf9, 0xe2, 0x59,
+ 0x8f, 0x11, 0x48, 0xa1, 0xac, 0x95, 0xb1, 0xe3, 0x60, 0xe5, 0xa8, 0xa4, 0x2f, 0xb5, 0xcb,
+ 0x90, 0x1e, 0x9e, 0xcb, 0x4c, 0xab, 0x22, 0x58, 0x20, 0x20, 0xad, 0x7b, 0xeb, 0xba, 0x5d,
+ 0x3c, 0xd5, 0xa3, 0x6d, 0x86, 0x6e, 0x3f, 0x38, 0xb8, 0x44, 0x32, 0x4b, 0xe7, 0x97, 0xea,
+ 0xf8, 0x3d, 0xc2, 0xc0, 0x7c, 0x1b, 0x49, 0xe4, 0x22, 0x23, 0xc7, 0x23, 0x58, 0x20, 0x5f,
+ 0x1f, 0x80, 0xe2, 0xcf, 0x59, 0x1d, 0x7e, 0x98, 0x51, 0x78, 0xbe, 0xf8, 0x88, 0x0b, 0x64,
+ 0x1b, 0xc8, 0xf2, 0x7b, 0x12, 0x22, 0x53, 0xd9, 0xd5, 0x8d, 0x32, 0xe7, 0x7f, 0x0e, 0x97,
+ 0x09};
+
+inline const std::vector<uint8_t> kCsrWithoutUdsCerts{
+ 0x84, 0x01, 0xa0, 0x82, 0xa4, 0x01, 0x01, 0x03, 0x27, 0x20, 0x06, 0x21, 0x58, 0x20, 0xca,
+ 0x73, 0xd6, 0x09, 0x91, 0xec, 0x92, 0x63, 0xee, 0x9f, 0x7c, 0x79, 0x3e, 0x80, 0xa9, 0xc9,
+ 0x4e, 0xf7, 0x3b, 0x5b, 0x41, 0xa4, 0x56, 0xc1, 0x9e, 0xf3, 0x80, 0x16, 0x6d, 0xfe, 0x14,
+ 0x98, 0x84, 0x43, 0xa1, 0x01, 0x27, 0xa0, 0x59, 0x01, 0x04, 0xa9, 0x01, 0x66, 0x69, 0x73,
+ 0x73, 0x75, 0x65, 0x72, 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x00,
+ 0x47, 0x44, 0x50, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x52, 0x58, 0x20, 0xb8,
+ 0x96, 0x54, 0xe2, 0x2c, 0xa4, 0xd2, 0x4a, 0x9c, 0x0e, 0x45, 0x11, 0xc8, 0xf2, 0x63, 0xf0,
+ 0x66, 0x0d, 0x2e, 0x20, 0x48, 0x96, 0x90, 0x14, 0xf4, 0x54, 0x63, 0xc4, 0xf4, 0x39, 0x30,
+ 0x38, 0x3a, 0x00, 0x47, 0x44, 0x53, 0x55, 0xa1, 0x3a, 0x00, 0x01, 0x11, 0x71, 0x6e, 0x63,
+ 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x00,
+ 0x47, 0x44, 0x54, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01, 0x3a,
+ 0x00, 0x47, 0x44, 0x57, 0x58, 0x4d, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58,
+ 0x20, 0x45, 0x71, 0x10, 0x9a, 0x1b, 0x9c, 0x9f, 0x3c, 0x6e, 0x29, 0xf9, 0x6d, 0xb9, 0x93,
+ 0x4a, 0xf2, 0x88, 0xf1, 0x3a, 0xf7, 0x69, 0xf9, 0xf3, 0x54, 0x91, 0x3a, 0x12, 0x4f, 0xd0,
+ 0xbb, 0xb7, 0x0d, 0x22, 0x58, 0x20, 0x56, 0x8b, 0xb0, 0x0e, 0xd3, 0x8d, 0x12, 0xf5, 0x17,
+ 0xd2, 0x6b, 0x21, 0xdf, 0x4d, 0xb8, 0xaa, 0x17, 0x65, 0x02, 0x4e, 0x5c, 0x0a, 0x77, 0x93,
+ 0x64, 0x1e, 0x8d, 0xbc, 0x6a, 0xa1, 0x26, 0xe7, 0x3a, 0x00, 0x47, 0x44, 0x58, 0x41, 0x20,
+ 0x58, 0x40, 0xb0, 0x7b, 0xdd, 0xa5, 0x8e, 0xcb, 0xce, 0xf9, 0x89, 0xfb, 0x21, 0x4b, 0x29,
+ 0x34, 0xff, 0x6b, 0x0e, 0xc1, 0xff, 0x51, 0xba, 0x12, 0x12, 0xa0, 0x93, 0x2c, 0x09, 0xca,
+ 0x3a, 0x02, 0x81, 0x2a, 0x5b, 0x6f, 0x8d, 0x58, 0x21, 0x94, 0x30, 0xde, 0x99, 0x8b, 0x36,
+ 0x69, 0x45, 0xa1, 0x52, 0x5c, 0x7b, 0x36, 0x4f, 0xec, 0x4f, 0x40, 0x5f, 0x10, 0xdf, 0x26,
+ 0x18, 0xea, 0x4b, 0x72, 0x9f, 0x05, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x02, 0x0f,
+ 0x82, 0x58, 0x20, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
+ 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
+ 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x59, 0x01, 0xe9, 0x84, 0x03, 0x67, 0x6b, 0x65, 0x79, 0x6d,
+ 0x69, 0x6e, 0x74, 0xae, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x47, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x01, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
+ 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x66, 0x64,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x67, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x65, 0x70,
+ 0x69, 0x78, 0x65, 0x6c, 0x68, 0x76, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x65, 0x67,
+ 0x72, 0x65, 0x65, 0x6e, 0x6a, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x62, 0x31, 0x32, 0x6c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65,
+ 0x72, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6d, 0x76, 0x62, 0x6d, 0x65, 0x74, 0x61,
+ 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4f, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+ 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
+ 0x74, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x63, 0x74, 0x65, 0x65, 0x70, 0x62, 0x6f,
+ 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a,
+ 0x01, 0x34, 0x8c, 0x62, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x72, 0x73,
+ 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76,
+ 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x61, 0x72, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f,
+ 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c,
+ 0x63, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x11, 0x29, 0x11,
+ 0x96, 0x98, 0x26, 0xb2, 0x3a, 0xf2, 0xf9, 0x95, 0xb7, 0x46, 0xb9, 0x38, 0x6e, 0x5e, 0x3d,
+ 0x5e, 0xb2, 0x19, 0x90, 0xc7, 0xd3, 0xbd, 0x49, 0x47, 0x55, 0xcb, 0xef, 0xeb, 0x89, 0x22,
+ 0x58, 0x20, 0x42, 0x87, 0xea, 0x75, 0x27, 0x42, 0x34, 0xeb, 0xe8, 0xb5, 0x50, 0xdf, 0xb0,
+ 0xbf, 0xef, 0x6b, 0x62, 0x90, 0x5c, 0xd1, 0xe8, 0x2b, 0x4d, 0x02, 0x58, 0xe6, 0xca, 0xda,
+ 0xe6, 0x33, 0x97, 0xff, 0x23, 0x58, 0x21, 0x00, 0x9b, 0x34, 0xdb, 0x1e, 0xe6, 0x53, 0x72,
+ 0xaf, 0x67, 0xb5, 0x5e, 0x9a, 0xee, 0x07, 0x31, 0x77, 0xa3, 0x8b, 0x6a, 0xe9, 0x58, 0x97,
+ 0x04, 0xe2, 0xa2, 0x48, 0x0f, 0xdf, 0x26, 0x4d, 0xe5, 0xbb, 0xa6, 0x01, 0x02, 0x03, 0x26,
+ 0x20, 0x01, 0x21, 0x58, 0x20, 0xf9, 0xd7, 0x37, 0x75, 0x6b, 0x55, 0xc7, 0x64, 0xf9, 0xe2,
+ 0x59, 0x8f, 0x11, 0x48, 0xa1, 0xac, 0x95, 0xb1, 0xe3, 0x60, 0xe5, 0xa8, 0xa4, 0x2f, 0xb5,
+ 0xcb, 0x90, 0x1e, 0x9e, 0xcb, 0x4c, 0xab, 0x22, 0x58, 0x20, 0x20, 0xad, 0x7b, 0xeb, 0xba,
+ 0x5d, 0x3c, 0xd5, 0xa3, 0x6d, 0x86, 0x6e, 0x3f, 0x38, 0xb8, 0x44, 0x32, 0x4b, 0xe7, 0x97,
+ 0xea, 0xf8, 0x3d, 0xc2, 0xc0, 0x7c, 0x1b, 0x49, 0xe4, 0x22, 0x23, 0xc7, 0x23, 0x58, 0x20,
+ 0x5f, 0x1f, 0x80, 0xe2, 0xcf, 0x59, 0x1d, 0x7e, 0x98, 0x51, 0x78, 0xbe, 0xf8, 0x88, 0x0b,
+ 0x64, 0x1b, 0xc8, 0xf2, 0x7b, 0x12, 0x22, 0x53, 0xd9, 0xd5, 0x8d, 0x32, 0xe7, 0x7f, 0x0e,
+ 0x97, 0x09, 0x58, 0x40, 0xe1, 0x9a, 0x3f, 0x36, 0x65, 0x7a, 0xfe, 0x1b, 0x99, 0xc9, 0x35,
+ 0x8f, 0xb5, 0x5c, 0xfe, 0x12, 0x9c, 0x6f, 0x0e, 0x97, 0x12, 0xbd, 0x26, 0x32, 0x46, 0xd9,
+ 0x08, 0x6b, 0x7c, 0xa1, 0xd3, 0x47, 0xd6, 0xba, 0xf0, 0x9c, 0xe0, 0x12, 0x37, 0x39, 0x75,
+ 0x88, 0xb5, 0xbe, 0xd8, 0x37, 0x33, 0x9b, 0x26, 0xfc, 0x38, 0x14, 0x28, 0xea, 0x47, 0xcc,
+ 0x1f, 0xf3, 0xfe, 0x44, 0x0c, 0x1e, 0x6f, 0x2b, 0xa1, 0x6b, 0x66, 0x69, 0x6e, 0x67, 0x65,
+ 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x31, 0x2f,
+ 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30, 0x32, 0x31, 0x30, 0x38, 0x30,
+ 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61,
+ 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
+
+inline const std::vector<uint8_t> kCsrWithKeyMintInComponentName{
+ 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x44,
+ 0xfd, 0xdd, 0xf1, 0x8a, 0x78, 0xa0, 0xbe, 0x37, 0x49, 0x51, 0x85, 0xfb, 0x7a, 0x16, 0xca,
+ 0xc1, 0x00, 0xb3, 0x78, 0x13, 0x4a, 0x90, 0x4c, 0x5a, 0xa1, 0x3b, 0xfc, 0xea, 0xb6, 0xf3,
+ 0x16, 0x22, 0x58, 0x20, 0x12, 0x7f, 0xf5, 0xe2, 0x14, 0xbd, 0x5d, 0x51, 0xd3, 0x7f, 0x2f,
+ 0x1f, 0x9c, 0xc2, 0x18, 0x31, 0x94, 0x13, 0x52, 0x31, 0x3d, 0x43, 0xc9, 0x39, 0xbc, 0xc9,
+ 0x06, 0xb0, 0xb2, 0xa9, 0x0e, 0x59, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x01, 0x0e,
+ 0xa9, 0x01, 0x66, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44, 0x50, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47,
+ 0x44, 0x52, 0x58, 0x20, 0x88, 0x44, 0x82, 0xb6, 0x6c, 0x9c, 0xcb, 0x2e, 0xe8, 0xdc, 0xb4,
+ 0xe9, 0xd3, 0xf7, 0x87, 0x63, 0x03, 0xaa, 0x90, 0x9d, 0xd9, 0xcb, 0xc3, 0x81, 0x03, 0x5b,
+ 0xa9, 0xa2, 0x75, 0xe8, 0xfa, 0x50, 0x3a, 0x00, 0x47, 0x44, 0x53, 0x58, 0x1e, 0xa1, 0x3a,
+ 0x00, 0x01, 0x11, 0x71, 0x77, 0x4d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20,
+ 0x6a, 0x75, 0x73, 0x74, 0x20, 0x6b, 0x65, 0x79, 0x6d, 0x69, 0x6e, 0x74, 0x3f, 0x3a, 0x00,
+ 0x47, 0x44, 0x54, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01, 0x3a,
+ 0x00, 0x47, 0x44, 0x57, 0x58, 0x4d, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58,
+ 0x20, 0xe7, 0x0e, 0x4b, 0xcb, 0x8d, 0x4a, 0xd0, 0x36, 0x7f, 0xbf, 0x19, 0xdd, 0x9a, 0xd9,
+ 0x43, 0x62, 0xab, 0x29, 0x13, 0x1e, 0x14, 0x98, 0x68, 0xee, 0x5d, 0xae, 0xfa, 0x2f, 0x49,
+ 0x99, 0xfa, 0x0b, 0x22, 0x58, 0x20, 0xfb, 0x9f, 0xd3, 0xd8, 0x67, 0x86, 0x81, 0x5f, 0xb3,
+ 0x84, 0x00, 0x32, 0xc4, 0xe8, 0x7e, 0x9b, 0xb2, 0x4c, 0x1d, 0xd7, 0x71, 0x0d, 0x8f, 0xe0,
+ 0x26, 0xc6, 0x73, 0xb1, 0x8f, 0x2d, 0x02, 0xf8, 0x3a, 0x00, 0x47, 0x44, 0x58, 0x41, 0x20,
+ 0x58, 0x40, 0x8f, 0xb9, 0x41, 0x5f, 0xa7, 0x48, 0xe4, 0xe3, 0xfb, 0x80, 0xbf, 0x2e, 0x30,
+ 0xb8, 0xc9, 0x2c, 0xe4, 0x74, 0x4f, 0x4c, 0xb1, 0x79, 0xfb, 0x42, 0x43, 0x1e, 0xb4, 0x6c,
+ 0x6a, 0x37, 0xaf, 0x3a, 0x76, 0x15, 0x16, 0x1f, 0x25, 0x26, 0x27, 0x1b, 0x9c, 0x5c, 0xcf,
+ 0x9a, 0xfd, 0xb0, 0x82, 0xad, 0xe4, 0xd1, 0xd9, 0x04, 0x80, 0x80, 0x1a, 0x21, 0x12, 0x3e,
+ 0x81, 0xff, 0x0c, 0x23, 0x3d, 0x0a, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x02, 0x10,
+ 0x82, 0x58, 0x20, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
+ 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
+ 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x59, 0x01, 0xea, 0x84, 0x03, 0x67, 0x6b, 0x65, 0x79, 0x6d,
+ 0x69, 0x6e, 0x74, 0xae, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x47, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x01, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
+ 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x66, 0x64,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x67, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x65, 0x70,
+ 0x69, 0x78, 0x65, 0x6c, 0x68, 0x76, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x65, 0x67,
+ 0x72, 0x65, 0x65, 0x6e, 0x6a, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x62, 0x31, 0x32, 0x6c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65,
+ 0x72, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6d, 0x76, 0x62, 0x6d, 0x65, 0x74, 0x61,
+ 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4f, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+ 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
+ 0x74, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x63, 0x74, 0x65, 0x65, 0x70, 0x62, 0x6f,
+ 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a,
+ 0x01, 0x34, 0x8c, 0x62, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x72, 0x73,
+ 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76,
+ 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x61, 0x72, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f,
+ 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c,
+ 0x63, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x40, 0x9a, 0x39,
+ 0x4d, 0xe2, 0xc5, 0x48, 0x58, 0x6e, 0xaa, 0x17, 0x81, 0x8a, 0xba, 0xc4, 0xea, 0x20, 0x23,
+ 0xc4, 0xf3, 0xdc, 0xfa, 0x78, 0x9f, 0x5b, 0x7d, 0x30, 0xd2, 0x3d, 0x6f, 0x42, 0xa8, 0x22,
+ 0x58, 0x20, 0x3e, 0x85, 0x73, 0xe5, 0x86, 0x57, 0x45, 0x72, 0xcd, 0xf2, 0xe8, 0x62, 0x93,
+ 0xf3, 0xea, 0xbf, 0x21, 0x57, 0xa9, 0x25, 0xe7, 0xa8, 0x2a, 0xa0, 0xd0, 0x0a, 0x1d, 0xa5,
+ 0x81, 0x22, 0xd0, 0xe1, 0x23, 0x58, 0x21, 0x00, 0x95, 0x00, 0xea, 0x43, 0x32, 0x8d, 0x2e,
+ 0x1c, 0x18, 0x6d, 0x73, 0x34, 0xa2, 0xe4, 0x53, 0x64, 0x20, 0x95, 0x25, 0x8d, 0x4b, 0x97,
+ 0x71, 0x13, 0xdf, 0xa6, 0x0e, 0xdc, 0x5b, 0x66, 0x66, 0x0b, 0xa6, 0x01, 0x02, 0x03, 0x26,
+ 0x20, 0x01, 0x21, 0x58, 0x20, 0xa4, 0x81, 0xd9, 0xa0, 0x37, 0x89, 0xb1, 0x5d, 0x22, 0xf1,
+ 0x22, 0x7e, 0x19, 0x00, 0xf1, 0x87, 0xdf, 0x10, 0x88, 0x1f, 0x64, 0xc5, 0x46, 0x6d, 0x91,
+ 0x9d, 0x6c, 0x86, 0x3b, 0x67, 0x07, 0x14, 0x22, 0x58, 0x20, 0x3c, 0x42, 0x1f, 0x47, 0x62,
+ 0x2c, 0x4f, 0x08, 0x29, 0xe9, 0xc6, 0x0c, 0x7c, 0xe5, 0x11, 0xc6, 0x39, 0x69, 0xc9, 0x9d,
+ 0xdf, 0x69, 0x18, 0x8e, 0xdb, 0x99, 0x87, 0x52, 0x2f, 0x6b, 0xb4, 0x6a, 0x23, 0x58, 0x21,
+ 0x00, 0x83, 0xa2, 0x6f, 0x5b, 0x3a, 0x71, 0x7c, 0x66, 0x3c, 0x96, 0x3f, 0x4e, 0x42, 0x6f,
+ 0x98, 0x45, 0x1f, 0x59, 0x50, 0x03, 0x48, 0x9b, 0x57, 0xf5, 0x0e, 0x0f, 0x96, 0x30, 0xa4,
+ 0xd6, 0xc3, 0x45, 0x58, 0x40, 0x8b, 0xdf, 0xc8, 0xc7, 0x6d, 0xa4, 0x02, 0xec, 0x3c, 0x5d,
+ 0x90, 0x73, 0x0f, 0x8c, 0x10, 0x0f, 0x99, 0xd2, 0x85, 0x6e, 0x03, 0x45, 0x55, 0x28, 0xf7,
+ 0x64, 0x0b, 0xbd, 0x7c, 0x3a, 0x69, 0xf1, 0x80, 0x1a, 0xf3, 0x93, 0x7e, 0x82, 0xfc, 0xa5,
+ 0x3b, 0x69, 0x98, 0xf1, 0xde, 0x06, 0xb6, 0x72, 0x78, 0x0b, 0xdb, 0xbb, 0x97, 0x20, 0x04,
+ 0x98, 0xb0, 0xd4, 0x07, 0x83, 0x65, 0xfb, 0xf8, 0x9c, 0xa1, 0x6b, 0x66, 0x69, 0x6e, 0x67,
+ 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x31,
+ 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30, 0x32, 0x31, 0x30, 0x38,
+ 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6c, 0x65,
+ 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
+
+inline const std::vector<uint8_t> kCsrWithSharedUdsRoot1{
+ 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x96,
+ 0xf9, 0xf7, 0x16, 0xa7, 0xe2, 0x20, 0xe3, 0x6e, 0x19, 0x8e, 0xc0, 0xc4, 0x82, 0xc5, 0xca,
+ 0x8d, 0x1d, 0xb4, 0xda, 0x94, 0x6d, 0xf8, 0xbc, 0x0b, 0x0e, 0xc7, 0x90, 0x83, 0x5b, 0xc3,
+ 0x4b, 0x22, 0x58, 0x20, 0xed, 0xe0, 0xa1, 0x56, 0x46, 0x5b, 0xe0, 0x67, 0x2d, 0xbc, 0x08,
+ 0x84, 0x6f, 0x43, 0xd0, 0x10, 0xf3, 0x70, 0x90, 0xc2, 0xbf, 0xe3, 0x6b, 0x32, 0x9f, 0xf3,
+ 0xca, 0x57, 0x0f, 0xa8, 0xb9, 0xdd, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x01, 0x04,
+ 0xa9, 0x01, 0x66, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44, 0x50, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47,
+ 0x44, 0x52, 0x58, 0x20, 0xb8, 0x96, 0x54, 0xe2, 0x2c, 0xa4, 0xd2, 0x4a, 0x9c, 0x0e, 0x45,
+ 0x11, 0xc8, 0xf2, 0x63, 0xf0, 0x66, 0x0d, 0x2e, 0x20, 0x48, 0x96, 0x90, 0x14, 0xf4, 0x54,
+ 0x63, 0xc4, 0xf4, 0x39, 0x30, 0x38, 0x3a, 0x00, 0x47, 0x44, 0x53, 0x55, 0xa1, 0x3a, 0x00,
+ 0x01, 0x11, 0x71, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3a, 0x00, 0x47, 0x44, 0x54, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47,
+ 0x44, 0x56, 0x41, 0x01, 0x3a, 0x00, 0x47, 0x44, 0x57, 0x58, 0x4d, 0xa5, 0x01, 0x02, 0x03,
+ 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x04, 0x25, 0x41, 0x6f, 0x6a, 0xdc, 0x88, 0x56, 0x9a,
+ 0xd4, 0x39, 0x82, 0xde, 0xd1, 0xe6, 0x65, 0xd4, 0x09, 0xb8, 0x9f, 0xde, 0xbf, 0x09, 0x03,
+ 0xe3, 0x9a, 0x48, 0xd4, 0x4f, 0x13, 0xaa, 0x5b, 0x22, 0x58, 0x20, 0x3a, 0xfb, 0x46, 0x2d,
+ 0xe1, 0xdf, 0x34, 0x76, 0x03, 0x37, 0x1e, 0xcf, 0xea, 0xd5, 0xf6, 0xd3, 0x99, 0x3e, 0x55,
+ 0x2a, 0xd1, 0x9d, 0x10, 0x21, 0xb1, 0xc8, 0x4f, 0xbd, 0xec, 0xb6, 0x67, 0x82, 0x3a, 0x00,
+ 0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x40, 0x10, 0xda, 0xc8, 0x8d, 0x83, 0x6d, 0xdd, 0x85,
+ 0x48, 0x92, 0xdc, 0xc0, 0xc8, 0xde, 0xe4, 0x61, 0x03, 0x04, 0xfb, 0x77, 0xdf, 0xc1, 0xce,
+ 0xb7, 0x9b, 0x74, 0x9a, 0x31, 0x7a, 0xca, 0xcb, 0x7c, 0x45, 0x65, 0xf5, 0xc1, 0x3b, 0x29,
+ 0x53, 0x22, 0xbc, 0xda, 0xa9, 0xfa, 0x97, 0x84, 0x42, 0xfc, 0xcb, 0x36, 0xae, 0xe9, 0x67,
+ 0x1c, 0xb1, 0x19, 0x42, 0x74, 0x01, 0xb1, 0x11, 0xc9, 0x7b, 0x58, 0x84, 0x43, 0xa1, 0x01,
0x26, 0xa0, 0x59, 0x02, 0x0f, 0x82, 0x58, 0x20, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x59, 0x01, 0xe9, 0x84, 0x03,
@@ -126,276 +534,105 @@
0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x61, 0x72, 0x76, 0x65,
0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65,
0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x63, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21,
- 0x58, 0x20, 0x46, 0xbd, 0xfc, 0xed, 0xa6, 0x94, 0x9a, 0xc4, 0x5e, 0x27, 0xcf, 0x24, 0x25,
- 0xc5, 0x0c, 0x7d, 0xed, 0x8f, 0x21, 0xe0, 0x47, 0x81, 0x5a, 0xdc, 0x3b, 0xd4, 0x9e, 0x13,
- 0xb6, 0x06, 0x36, 0x70, 0x22, 0x58, 0x20, 0x0a, 0xbd, 0xbc, 0x0d, 0x19, 0xba, 0xcc, 0xdc,
- 0x00, 0x64, 0x31, 0x4c, 0x84, 0x66, 0x1d, 0xfb, 0x50, 0xd0, 0xe3, 0xf8, 0x78, 0x9d, 0xf9,
- 0x77, 0x2b, 0x40, 0x6b, 0xb5, 0x8e, 0xd3, 0xf8, 0xa9, 0x23, 0x58, 0x21, 0x00, 0x9c, 0x42,
- 0x3f, 0x79, 0x76, 0xa0, 0xd1, 0x98, 0x58, 0xbb, 0x9b, 0x9e, 0xfb, 0x3b, 0x08, 0xf2, 0xe1,
- 0xa3, 0xfe, 0xf4, 0x21, 0x5b, 0x97, 0x2d, 0xcb, 0x9a, 0x55, 0x1a, 0x7f, 0xa7, 0xc1, 0xa8,
- 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xef, 0xd3, 0x88, 0xc4, 0xbc,
- 0xce, 0x51, 0x4d, 0x4b, 0xd3, 0x81, 0x26, 0xc6, 0xcc, 0x66, 0x3b, 0x12, 0x38, 0xbf, 0x23,
- 0x7a, 0x2e, 0x7f, 0x82, 0xa7, 0x81, 0x74, 0x21, 0xc0, 0x12, 0x79, 0xf4, 0x22, 0x58, 0x20,
- 0xdc, 0x85, 0x6c, 0x1c, 0xcc, 0xf9, 0xf3, 0xe8, 0xff, 0x90, 0xfd, 0x89, 0x03, 0xf5, 0xaf,
- 0x75, 0xa0, 0x79, 0xbb, 0x53, 0x9a, 0x1f, 0x2b, 0x34, 0x86, 0x47, 0x3d, 0x66, 0x2a, 0x07,
- 0x3b, 0x1e, 0x23, 0x58, 0x20, 0x34, 0x7b, 0x15, 0xcc, 0xbf, 0x26, 0xc9, 0x28, 0x0e, 0xee,
- 0xc5, 0x47, 0xac, 0x00, 0xc4, 0x4d, 0x81, 0x2b, 0x1e, 0xac, 0x31, 0xd2, 0x6f, 0x36, 0x85,
- 0xe6, 0xa8, 0xf0, 0x46, 0xfc, 0xd2, 0x83, 0x58, 0x40, 0x55, 0x4c, 0x38, 0xdf, 0xfe, 0x49,
- 0xa8, 0xa0, 0xa5, 0x08, 0xce, 0x2f, 0xe5, 0xf6, 0x6e, 0x2b, 0xc2, 0x95, 0x39, 0xc8, 0xca,
- 0x77, 0xd6, 0xf6, 0x67, 0x24, 0x6b, 0x0e, 0x63, 0x5d, 0x11, 0x97, 0x26, 0x52, 0x30, 0xbc,
- 0x28, 0x1d, 0xbf, 0x2a, 0x3e, 0x8c, 0x90, 0x54, 0xaa, 0xaa, 0xd1, 0x7c, 0x53, 0x7b, 0x48,
- 0x1f, 0x51, 0x50, 0x6c, 0x32, 0xe1, 0x0f, 0x57, 0xea, 0x47, 0x76, 0x85, 0x0c, 0xa1, 0x6b,
+ 0x58, 0x20, 0xf6, 0x86, 0x74, 0x7d, 0x1a, 0x83, 0x75, 0xec, 0x8c, 0xf9, 0x3a, 0xa9, 0x20,
+ 0x88, 0xe5, 0xca, 0x24, 0x34, 0x24, 0xbf, 0x89, 0xe7, 0xdb, 0x44, 0xc3, 0x6e, 0xdd, 0x5d,
+ 0x1a, 0xe1, 0xf0, 0xd8, 0x22, 0x58, 0x20, 0xae, 0xcb, 0x01, 0x2e, 0x73, 0xac, 0xb5, 0x52,
+ 0x0e, 0x73, 0x15, 0xd8, 0x9d, 0x78, 0x64, 0x10, 0x35, 0x41, 0x0e, 0xc9, 0x7d, 0x9a, 0x11,
+ 0xa3, 0xed, 0x7f, 0x53, 0xa6, 0xff, 0xc4, 0xad, 0x61, 0x23, 0x58, 0x20, 0x5a, 0xd2, 0xc5,
+ 0xd0, 0x58, 0x2e, 0x94, 0x93, 0xd7, 0xa4, 0x2d, 0x5b, 0x12, 0x43, 0x52, 0x93, 0xc3, 0x95,
+ 0x91, 0xac, 0x6a, 0xa3, 0x31, 0x08, 0xda, 0x33, 0x6a, 0xce, 0x7e, 0x8e, 0xae, 0xb1, 0xa6,
+ 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x8f, 0xb1, 0x85, 0xa5, 0xf5, 0x68,
+ 0x74, 0xfc, 0x8a, 0x87, 0x2b, 0x13, 0xea, 0xf7, 0xff, 0x82, 0x6d, 0xcf, 0xc3, 0xea, 0x04,
+ 0x80, 0x40, 0xe5, 0xcb, 0x80, 0xdb, 0x07, 0x8b, 0x36, 0x8c, 0x29, 0x22, 0x58, 0x20, 0x6a,
+ 0x8c, 0x52, 0x3f, 0xf7, 0x26, 0xb3, 0xf9, 0xa8, 0x91, 0x08, 0x4e, 0xec, 0x7a, 0x03, 0x16,
+ 0x1c, 0xab, 0x12, 0xcd, 0x8b, 0x05, 0x77, 0x33, 0x16, 0x1c, 0x80, 0x99, 0x79, 0x14, 0x6a,
+ 0x5c, 0x23, 0x58, 0x21, 0x00, 0xd0, 0x0a, 0xa2, 0xaa, 0x27, 0x62, 0x10, 0x24, 0x0c, 0x74,
+ 0x34, 0xe7, 0x06, 0xb3, 0x4d, 0x33, 0x9c, 0x86, 0xa6, 0x62, 0xb9, 0x0f, 0x1a, 0x4b, 0xe2,
+ 0x8b, 0x45, 0x0a, 0xc9, 0xe3, 0x43, 0x28, 0x58, 0x40, 0xea, 0xe3, 0xd3, 0xd9, 0x7f, 0x4e,
+ 0x08, 0x8a, 0x5b, 0xb9, 0xef, 0x28, 0x5a, 0xe0, 0x02, 0x40, 0xf5, 0x68, 0x49, 0x8b, 0xa7,
+ 0xf7, 0x9d, 0xa3, 0xb3, 0x37, 0x72, 0x79, 0xa9, 0x32, 0x47, 0xf6, 0x8d, 0x5d, 0x08, 0xe7,
+ 0xec, 0x00, 0x19, 0x09, 0x6f, 0x0a, 0x4d, 0x7c, 0x62, 0x6c, 0x2b, 0xaa, 0x33, 0x61, 0xe5,
+ 0xa5, 0x3f, 0x2a, 0xfe, 0xcc, 0xdf, 0x8e, 0x62, 0x1c, 0x31, 0xe1, 0x56, 0x6b, 0xa1, 0x6b,
0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72,
0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30,
0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f,
0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
-// The challenge that is in kKeysToSignForCsrWithUdsCerts and kCsrWithUdsCerts
-inline const std::vector<uint8_t> kChallenge{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
- 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
- 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
- 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20};
-
-inline const std::vector<uint8_t> kKeysToSignForCsrWithUdsCerts{
- 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x35, 0xeb, 0x56, 0xed,
- 0x62, 0x13, 0x6a, 0x41, 0x89, 0xf6, 0x72, 0xa6, 0xf1, 0x5c, 0xd1, 0xf6, 0x34, 0xbd, 0x81,
- 0xdb, 0x2e, 0x0b, 0x4d, 0xf6, 0x69, 0x6f, 0xa6, 0xf3, 0xce, 0x27, 0x2c, 0x78, 0x22, 0x58,
- 0x20, 0xac, 0xa9, 0x9f, 0x62, 0x81, 0x58, 0xc7, 0x10, 0xd7, 0xb5, 0xa8, 0xa0, 0x7b, 0x11,
- 0xf5, 0x75, 0xdb, 0xd9, 0xa2, 0x1d, 0x86, 0x34, 0xc6, 0xf4, 0x23, 0x79, 0xcc, 0x8a, 0x87,
- 0x3c, 0xb2, 0xd0, 0x23, 0x58, 0x20, 0x0f, 0x2c, 0x5a, 0xb7, 0xe1, 0x3b, 0x24, 0xa3, 0x4f,
- 0xaa, 0x49, 0x51, 0xfc, 0x8c, 0xd0, 0x35, 0x43, 0x7c, 0x21, 0xfa, 0x7d, 0x56, 0x97, 0x69,
- 0xe1, 0x81, 0xf5, 0x88, 0x15, 0x33, 0xa0, 0x7f, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01,
- 0x21, 0x58, 0x20, 0xb5, 0xcc, 0xd9, 0x4f, 0x7a, 0xe2, 0xca, 0xac, 0xfe, 0xa5, 0x65, 0x0c,
- 0x6a, 0xa8, 0x16, 0x45, 0x40, 0x41, 0x1c, 0xb2, 0x64, 0xcd, 0x34, 0xe8, 0x37, 0x88, 0xb9,
- 0x9a, 0xb3, 0xc3, 0xfd, 0x6a, 0x22, 0x58, 0x20, 0x5e, 0xbe, 0xff, 0x98, 0x60, 0x6e, 0x1d,
- 0x6b, 0x42, 0x60, 0x59, 0xe9, 0x42, 0x95, 0xc8, 0x2e, 0xc5, 0xb6, 0x66, 0x4a, 0x53, 0xf1,
- 0x73, 0x02, 0xcb, 0x89, 0x8a, 0x2a, 0xc9, 0xa5, 0xa3, 0x39, 0x23, 0x58, 0x21, 0x00, 0xdb,
- 0xda, 0x3c, 0x3e, 0x27, 0x71, 0x5e, 0xd0, 0x2b, 0x09, 0xb8, 0x6f, 0xe2, 0x2c, 0xdd, 0x0a,
- 0xbf, 0x1d, 0x94, 0x36, 0xd2, 0x33, 0x88, 0x6e, 0x66, 0x05, 0x21, 0x92, 0x64, 0x79, 0xa9,
- 0x10};
-
-inline const std::vector<uint8_t> kCsrWithUdsCerts{
- 0x84, 0x01, 0xa1, 0x70, 0x74, 0x65, 0x73, 0x74, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72,
- 0x2d, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0x59, 0x01, 0x6c, 0x30, 0x82, 0x01, 0x68, 0x30, 0x82,
- 0x01, 0x1a, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x01, 0x7b, 0x30, 0x05, 0x06, 0x03, 0x2b,
- 0x65, 0x70, 0x30, 0x2b, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c,
- 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31, 0x12, 0x30,
- 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x09, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x52, 0x6f,
- 0x6f, 0x74, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x34, 0x31, 0x30, 0x31, 0x37, 0x31, 0x39, 0x32,
- 0x33, 0x30, 0x39, 0x5a, 0x17, 0x0d, 0x32, 0x34, 0x31, 0x31, 0x31, 0x36, 0x31, 0x39, 0x32,
- 0x33, 0x30, 0x39, 0x5a, 0x30, 0x2b, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a,
- 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31,
- 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x09, 0x46, 0x61, 0x6b, 0x65, 0x20,
- 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x21,
- 0x00, 0x20, 0xc5, 0xfa, 0x42, 0xe9, 0x23, 0xd3, 0x72, 0x83, 0x96, 0xc5, 0x73, 0x1e, 0xec,
- 0x07, 0x39, 0x4f, 0xc8, 0xb7, 0xd1, 0x9f, 0x77, 0xb6, 0x0b, 0x59, 0x9e, 0x62, 0xc0, 0xec,
- 0x06, 0x06, 0xad, 0xa3, 0x63, 0x30, 0x61, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04,
- 0x16, 0x04, 0x14, 0xec, 0x36, 0x07, 0x83, 0xf0, 0xda, 0x23, 0xfc, 0x0f, 0xb1, 0x08, 0xd0,
- 0x60, 0x97, 0xc1, 0x9a, 0x14, 0x54, 0xbf, 0x63, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23,
- 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xec, 0x36, 0x07, 0x83, 0xf0, 0xda, 0x23, 0xfc, 0x0f,
- 0xb1, 0x08, 0xd0, 0x60, 0x97, 0xc1, 0x9a, 0x14, 0x54, 0xbf, 0x63, 0x30, 0x0f, 0x06, 0x03,
- 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x0e,
- 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x02, 0x04, 0x30,
- 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x41, 0x00, 0x41, 0xfa, 0x27, 0xfd, 0xe3, 0x42,
- 0x89, 0x43, 0x68, 0x92, 0x48, 0x39, 0xb1, 0x93, 0x93, 0x8b, 0x69, 0x16, 0x50, 0xbe, 0xc0,
- 0xc5, 0x83, 0xd6, 0x1e, 0x4b, 0x2f, 0x6e, 0x18, 0x32, 0x78, 0xfe, 0x35, 0x78, 0xed, 0x6d,
- 0xc8, 0x36, 0xb2, 0x4e, 0x0d, 0x10, 0x23, 0xab, 0x28, 0x32, 0xa1, 0xfc, 0x83, 0x2a, 0xa3,
- 0xca, 0xe1, 0xca, 0x82, 0xd2, 0x5f, 0xf1, 0x7f, 0xf2, 0xba, 0xbe, 0x86, 0x0b, 0x59, 0x01,
- 0x70, 0x30, 0x82, 0x01, 0x6c, 0x30, 0x82, 0x01, 0x1e, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02,
- 0x02, 0x01, 0xc8, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x30, 0x2b, 0x31, 0x15, 0x30,
- 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x6f,
- 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
- 0x09, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x1e, 0x17, 0x0d, 0x32,
- 0x34, 0x31, 0x30, 0x31, 0x37, 0x31, 0x39, 0x32, 0x33, 0x30, 0x39, 0x5a, 0x17, 0x0d, 0x32,
- 0x34, 0x31, 0x31, 0x31, 0x36, 0x31, 0x39, 0x32, 0x33, 0x30, 0x39, 0x5a, 0x30, 0x2e, 0x31,
- 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20,
- 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04,
- 0x03, 0x13, 0x0c, 0x46, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x68, 0x69, 0x70, 0x73, 0x65, 0x74,
- 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x21, 0x00, 0x14, 0xf4, 0x4a,
- 0x88, 0x56, 0x9f, 0xc0, 0xf5, 0x1f, 0xe5, 0xef, 0xfb, 0xf4, 0x06, 0xbc, 0xb1, 0xe4, 0x4a,
- 0x37, 0xe5, 0x07, 0xf8, 0x65, 0x95, 0x55, 0x54, 0xfd, 0x90, 0xf9, 0x8b, 0xa7, 0xc6, 0xa3,
- 0x63, 0x30, 0x61, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xef,
- 0x05, 0x40, 0x0a, 0x1b, 0x74, 0x3e, 0x4d, 0x2e, 0x22, 0xf5, 0x66, 0x0c, 0xd7, 0xf9, 0xb8,
- 0x8e, 0x81, 0x3d, 0xab, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16,
- 0x80, 0x14, 0xec, 0x36, 0x07, 0x83, 0xf0, 0xda, 0x23, 0xfc, 0x0f, 0xb1, 0x08, 0xd0, 0x60,
- 0x97, 0xc1, 0x9a, 0x14, 0x54, 0xbf, 0x63, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01,
- 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d,
- 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x02, 0x04, 0x30, 0x05, 0x06, 0x03, 0x2b,
- 0x65, 0x70, 0x03, 0x41, 0x00, 0x64, 0x32, 0x42, 0x06, 0xa7, 0x11, 0xb0, 0x67, 0x81, 0x73,
- 0x19, 0x70, 0xb6, 0x60, 0x1c, 0xd2, 0x43, 0xde, 0x42, 0xec, 0x71, 0x4d, 0x6e, 0xa8, 0xed,
- 0x6f, 0xe2, 0x59, 0x3e, 0xa3, 0x45, 0x82, 0x8b, 0x25, 0x25, 0xf9, 0xc6, 0xb3, 0xf5, 0xb5,
- 0x3d, 0x11, 0x7d, 0xcf, 0xf2, 0x50, 0x22, 0xff, 0x2b, 0xc5, 0x14, 0x94, 0x64, 0xbf, 0xbf,
- 0x52, 0x69, 0xb1, 0xfe, 0x07, 0x81, 0x83, 0xb3, 0x0d, 0x82, 0xa5, 0x01, 0x01, 0x03, 0x27,
- 0x20, 0x06, 0x21, 0x58, 0x20, 0x14, 0xf4, 0x4a, 0x88, 0x56, 0x9f, 0xc0, 0xf5, 0x1f, 0xe5,
- 0xef, 0xfb, 0xf4, 0x06, 0xbc, 0xb1, 0xe4, 0x4a, 0x37, 0xe5, 0x07, 0xf8, 0x65, 0x95, 0x55,
- 0x54, 0xfd, 0x90, 0xf9, 0x8b, 0xa7, 0xc6, 0x23, 0x58, 0x20, 0x8d, 0x38, 0x0d, 0x38, 0xcb,
- 0x76, 0x73, 0xef, 0x13, 0xd1, 0x08, 0x02, 0xa5, 0x0e, 0xd2, 0x16, 0xd4, 0x0f, 0x2c, 0x29,
- 0xf8, 0xd0, 0x20, 0xb8, 0x6a, 0x7f, 0xa2, 0xd1, 0x1e, 0xeb, 0xd1, 0x5c, 0x84, 0x43, 0xa1,
- 0x01, 0x27, 0xa0, 0x59, 0x01, 0x27, 0xa9, 0x01, 0x66, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72,
- 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44, 0x50, 0x58,
- 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+inline const std::vector<uint8_t> kCsrWithSharedUdsRoot2{
+ 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x96,
+ 0xf9, 0xf7, 0x16, 0xa7, 0xe2, 0x20, 0xe3, 0x6e, 0x19, 0x8e, 0xc0, 0xc4, 0x82, 0xc5, 0xca,
+ 0x8d, 0x1d, 0xb4, 0xda, 0x94, 0x6d, 0xf8, 0xbc, 0x0b, 0x0e, 0xc7, 0x90, 0x83, 0x5b, 0xc3,
+ 0x4b, 0x22, 0x58, 0x20, 0xed, 0xe0, 0xa1, 0x56, 0x46, 0x5b, 0xe0, 0x67, 0x2d, 0xbc, 0x08,
+ 0x84, 0x6f, 0x43, 0xd0, 0x10, 0xf3, 0x70, 0x90, 0xc2, 0xbf, 0xe3, 0x6b, 0x32, 0x9f, 0xf3,
+ 0xca, 0x57, 0x0f, 0xa8, 0xb9, 0xdd, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x01, 0x04,
+ 0xa9, 0x01, 0x66, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44, 0x50, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x52, 0x58, 0x20, 0xb8, 0x96, 0x54, 0xe2, 0x2c,
- 0xa4, 0xd2, 0x4a, 0x9c, 0x0e, 0x45, 0x11, 0xc8, 0xf2, 0x63, 0xf0, 0x66, 0x0d, 0x2e, 0x20,
- 0x48, 0x96, 0x90, 0x14, 0xf4, 0x54, 0x63, 0xc4, 0xf4, 0x39, 0x30, 0x38, 0x3a, 0x00, 0x47,
- 0x44, 0x53, 0x55, 0xa1, 0x3a, 0x00, 0x01, 0x11, 0x71, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6f,
- 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x00, 0x47, 0x44, 0x54, 0x58,
- 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47,
+ 0x44, 0x52, 0x58, 0x20, 0xb8, 0x96, 0x54, 0xe2, 0x2c, 0xa4, 0xd2, 0x4a, 0x9c, 0x0e, 0x45,
+ 0x11, 0xc8, 0xf2, 0x63, 0xf0, 0x66, 0x0d, 0x2e, 0x20, 0x48, 0x96, 0x90, 0x14, 0xf4, 0x54,
+ 0x63, 0xc4, 0xf4, 0x39, 0x30, 0x38, 0x3a, 0x00, 0x47, 0x44, 0x53, 0x55, 0xa1, 0x3a, 0x00,
+ 0x01, 0x11, 0x71, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3a, 0x00, 0x47, 0x44, 0x54, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01, 0x3a, 0x00, 0x47, 0x44, 0x57,
- 0x58, 0x70, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x76, 0x82, 0x58,
- 0xce, 0x99, 0x1c, 0x29, 0xa1, 0x81, 0x3e, 0x22, 0xe3, 0x02, 0x13, 0xea, 0x2a, 0x25, 0x2e,
- 0x20, 0x14, 0xeb, 0x45, 0x0d, 0xb8, 0xdb, 0x8c, 0x38, 0xef, 0xeb, 0x25, 0xd6, 0x31, 0x22,
- 0x58, 0x20, 0xbe, 0x55, 0xba, 0x87, 0x17, 0xc2, 0x5b, 0xb6, 0x56, 0xff, 0x4b, 0xf0, 0x8a,
- 0x98, 0x57, 0x86, 0xa4, 0x36, 0x0a, 0x90, 0x38, 0xce, 0x66, 0xec, 0xcb, 0x25, 0x30, 0x29,
- 0x83, 0x02, 0x02, 0xc0, 0x23, 0x58, 0x20, 0x73, 0xdf, 0xc3, 0x4a, 0xe4, 0x2e, 0xbd, 0x04,
- 0x09, 0xec, 0x91, 0xc7, 0xe7, 0xf1, 0xec, 0x55, 0x10, 0x7e, 0xd1, 0x36, 0x5e, 0x9d, 0x11,
- 0x71, 0x27, 0xee, 0x30, 0x7b, 0x04, 0x45, 0x5f, 0x95, 0x3a, 0x00, 0x47, 0x44, 0x58, 0x41,
- 0x20, 0x58, 0x40, 0x44, 0x7f, 0x1a, 0x67, 0x16, 0xa0, 0x49, 0xfe, 0x2c, 0xde, 0x87, 0x38,
- 0xef, 0xb9, 0xe0, 0x19, 0x25, 0x7d, 0xcc, 0x39, 0x53, 0x27, 0xbd, 0x2c, 0x04, 0x6c, 0xe3,
- 0x5c, 0x5e, 0xd6, 0x27, 0x09, 0xb9, 0xf7, 0x8c, 0x2b, 0xd2, 0x68, 0xc3, 0xf1, 0x23, 0xcf,
- 0xc6, 0xfc, 0x21, 0xb3, 0x52, 0x48, 0xe6, 0x8a, 0x89, 0x3e, 0x37, 0x24, 0x13, 0x23, 0x80,
- 0xb2, 0xc7, 0xa7, 0xc6, 0xf1, 0xec, 0x04, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x02,
- 0x0f, 0x82, 0x58, 0x20, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
- 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
- 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x59, 0x01, 0xe9, 0x84, 0x03, 0x67, 0x6b, 0x65, 0x79,
- 0x6d, 0x69, 0x6e, 0x74, 0xae, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x47, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x01, 0x65, 0x6d, 0x6f, 0x64, 0x65,
- 0x6c, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x66,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x67, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x65,
- 0x70, 0x69, 0x78, 0x65, 0x6c, 0x68, 0x76, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x65,
- 0x67, 0x72, 0x65, 0x65, 0x6e, 0x6a, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x62, 0x31, 0x32, 0x6c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72,
- 0x65, 0x72, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6d, 0x76, 0x62, 0x6d, 0x65, 0x74,
- 0x61, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4f, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
- 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72,
- 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x63, 0x74, 0x65, 0x65, 0x70, 0x62,
- 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c,
- 0x1a, 0x01, 0x34, 0x8c, 0x62, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65,
- 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x72,
- 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65,
- 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x61, 0x72, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72,
- 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34,
- 0x8c, 0x63, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x35, 0xeb,
- 0x56, 0xed, 0x62, 0x13, 0x6a, 0x41, 0x89, 0xf6, 0x72, 0xa6, 0xf1, 0x5c, 0xd1, 0xf6, 0x34,
- 0xbd, 0x81, 0xdb, 0x2e, 0x0b, 0x4d, 0xf6, 0x69, 0x6f, 0xa6, 0xf3, 0xce, 0x27, 0x2c, 0x78,
- 0x22, 0x58, 0x20, 0xac, 0xa9, 0x9f, 0x62, 0x81, 0x58, 0xc7, 0x10, 0xd7, 0xb5, 0xa8, 0xa0,
- 0x7b, 0x11, 0xf5, 0x75, 0xdb, 0xd9, 0xa2, 0x1d, 0x86, 0x34, 0xc6, 0xf4, 0x23, 0x79, 0xcc,
- 0x8a, 0x87, 0x3c, 0xb2, 0xd0, 0x23, 0x58, 0x20, 0x0f, 0x2c, 0x5a, 0xb7, 0xe1, 0x3b, 0x24,
- 0xa3, 0x4f, 0xaa, 0x49, 0x51, 0xfc, 0x8c, 0xd0, 0x35, 0x43, 0x7c, 0x21, 0xfa, 0x7d, 0x56,
- 0x97, 0x69, 0xe1, 0x81, 0xf5, 0x88, 0x15, 0x33, 0xa0, 0x7f, 0xa6, 0x01, 0x02, 0x03, 0x26,
- 0x20, 0x01, 0x21, 0x58, 0x20, 0xb5, 0xcc, 0xd9, 0x4f, 0x7a, 0xe2, 0xca, 0xac, 0xfe, 0xa5,
- 0x65, 0x0c, 0x6a, 0xa8, 0x16, 0x45, 0x40, 0x41, 0x1c, 0xb2, 0x64, 0xcd, 0x34, 0xe8, 0x37,
- 0x88, 0xb9, 0x9a, 0xb3, 0xc3, 0xfd, 0x6a, 0x22, 0x58, 0x20, 0x5e, 0xbe, 0xff, 0x98, 0x60,
- 0x6e, 0x1d, 0x6b, 0x42, 0x60, 0x59, 0xe9, 0x42, 0x95, 0xc8, 0x2e, 0xc5, 0xb6, 0x66, 0x4a,
- 0x53, 0xf1, 0x73, 0x02, 0xcb, 0x89, 0x8a, 0x2a, 0xc9, 0xa5, 0xa3, 0x39, 0x23, 0x58, 0x21,
- 0x00, 0xdb, 0xda, 0x3c, 0x3e, 0x27, 0x71, 0x5e, 0xd0, 0x2b, 0x09, 0xb8, 0x6f, 0xe2, 0x2c,
- 0xdd, 0x0a, 0xbf, 0x1d, 0x94, 0x36, 0xd2, 0x33, 0x88, 0x6e, 0x66, 0x05, 0x21, 0x92, 0x64,
- 0x79, 0xa9, 0x10, 0x58, 0x40, 0x87, 0xcf, 0xaa, 0x82, 0x6a, 0xba, 0x25, 0x8b, 0x81, 0xd8,
- 0x14, 0xca, 0xbd, 0xf4, 0x67, 0xdf, 0xc8, 0x2c, 0xa1, 0x04, 0x57, 0x99, 0xa0, 0x54, 0xe7,
- 0x9b, 0xb2, 0xd0, 0xaf, 0xdd, 0x07, 0x46, 0x0a, 0xd7, 0xbd, 0xa7, 0xf9, 0xa8, 0x0c, 0x08,
- 0x1e, 0x9c, 0xae, 0x73, 0x4c, 0x22, 0x6e, 0x56, 0x8b, 0xe4, 0x91, 0x54, 0xa4, 0x7a, 0xb0,
- 0xf5, 0xe4, 0x5d, 0xa9, 0x8f, 0xae, 0x43, 0x95, 0x7a};
-
-inline const std::vector<uint8_t> kKeysToSignForCsrWithoutUdsCerts = {
- 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x50, 0x43, 0xb4, 0xf1,
- 0xc1, 0x7f, 0x17, 0xc6, 0x3b, 0x56, 0x27, 0x63, 0x03, 0x18, 0x78, 0x9d, 0x63, 0x93, 0x3b,
- 0x98, 0xed, 0x55, 0x8c, 0x87, 0x1b, 0xd7, 0x89, 0xb6, 0x81, 0x92, 0x5f, 0x24, 0x22, 0x58,
- 0x20, 0xd5, 0x24, 0x93, 0xda, 0x3e, 0x32, 0x17, 0xfa, 0xe8, 0x8d, 0x1e, 0xa9, 0xe0, 0x84,
- 0x4e, 0x1c, 0x6a, 0xef, 0x9a, 0xe3, 0xbe, 0x1d, 0xf1, 0x14, 0xe0, 0x9e, 0x82, 0xc8, 0x92,
- 0x1a, 0x3a, 0x69, 0x23, 0x58, 0x20, 0x29, 0xcb, 0x16, 0x78, 0x61, 0x35, 0x92, 0x3f, 0x71,
- 0xc4, 0x66, 0x61, 0xd4, 0xd4, 0x20, 0x8a, 0x86, 0x1e, 0xb0, 0x2b, 0x2f, 0x4f, 0x13, 0xb4,
- 0x0d, 0x89, 0x60, 0x87, 0x77, 0xac, 0x1a, 0x0f, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01,
- 0x21, 0x58, 0x20, 0x4b, 0xcc, 0x7a, 0x09, 0x99, 0x76, 0xe7, 0xfa, 0x06, 0xb9, 0x19, 0x22,
- 0x15, 0x3b, 0x9f, 0xa8, 0x34, 0x77, 0x24, 0x27, 0x8c, 0x8a, 0x97, 0x61, 0xf3, 0x6f, 0x29,
- 0x74, 0x4e, 0x9a, 0x66, 0x23, 0x22, 0x58, 0x20, 0x8f, 0xa8, 0xaf, 0x2b, 0x02, 0x3a, 0xd4,
- 0x8a, 0xa2, 0x9d, 0x25, 0xa8, 0x01, 0xe7, 0xbd, 0x61, 0x25, 0x88, 0xb4, 0xc9, 0xce, 0x05,
- 0x43, 0xcc, 0x0d, 0x38, 0x7d, 0xe2, 0xda, 0x03, 0xb3, 0x33, 0x23, 0x58, 0x21, 0x00, 0xc8,
- 0x67, 0xb8, 0xbe, 0xc4, 0x1c, 0xca, 0x3c, 0x73, 0x3c, 0xbf, 0x52, 0xb2, 0x5a, 0x64, 0x9e,
- 0x9f, 0xae, 0xc6, 0x9f, 0x02, 0x2f, 0xee, 0x92, 0x1d, 0xdb, 0x01, 0x77, 0x27, 0x12, 0x84,
- 0x14};
-
-inline const std::vector<uint8_t> kCsrWithoutUdsCerts{
- 0x84, 0x01, 0xa0, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x38, 0x22, 0x20, 0x02, 0x21, 0x58, 0x30,
- 0x21, 0x09, 0x81, 0xb2, 0x4c, 0x8e, 0x23, 0x63, 0x46, 0xe5, 0x32, 0x1e, 0x1b, 0xa3, 0x39,
- 0x47, 0xd1, 0x19, 0x91, 0xc5, 0xe1, 0xd0, 0x51, 0xa4, 0x4e, 0x6d, 0xfd, 0x21, 0x46, 0xf3,
- 0x65, 0x6b, 0xd3, 0xec, 0x20, 0x21, 0xf8, 0xef, 0x39, 0x50, 0x0a, 0xfc, 0x6d, 0x18, 0xf8,
- 0x90, 0x1c, 0xc8, 0x22, 0x58, 0x30, 0x80, 0x1f, 0xd8, 0xe3, 0x64, 0x51, 0x48, 0x66, 0xa5,
- 0xad, 0x05, 0xcb, 0xe4, 0xee, 0x0f, 0x20, 0xc1, 0xca, 0x84, 0xc2, 0xe0, 0xcc, 0x22, 0x06,
- 0x7c, 0x5e, 0x2c, 0xb3, 0x3b, 0x52, 0xd4, 0xe7, 0xc1, 0xe2, 0x57, 0x9d, 0x8a, 0xa6, 0x5c,
- 0x08, 0xbb, 0x77, 0x07, 0xa8, 0x39, 0xba, 0x9f, 0x5f, 0x23, 0x58, 0x31, 0x00, 0xff, 0x5f,
- 0xa3, 0x03, 0x87, 0x70, 0xe5, 0xf0, 0x69, 0xcd, 0x0a, 0x32, 0x9e, 0x4a, 0xe8, 0x07, 0x1f,
- 0x26, 0xb9, 0x8a, 0x01, 0x83, 0xfe, 0xb9, 0x21, 0x22, 0x49, 0x9d, 0x9f, 0x78, 0x48, 0xf4,
- 0x24, 0x87, 0xe8, 0x4d, 0xab, 0xd5, 0xe9, 0xd6, 0x90, 0x49, 0x4b, 0x42, 0xb4, 0x68, 0xac,
- 0xf1, 0x84, 0x44, 0xa1, 0x01, 0x38, 0x22, 0xa0, 0x59, 0x01, 0x28, 0xa9, 0x01, 0x66, 0x69,
- 0x73, 0x73, 0x75, 0x65, 0x72, 0x02, 0x67, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a,
- 0x00, 0x47, 0x44, 0x50, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x52, 0x58, 0x20,
- 0xb8, 0x96, 0x54, 0xe2, 0x2c, 0xa4, 0xd2, 0x4a, 0x9c, 0x0e, 0x45, 0x11, 0xc8, 0xf2, 0x63,
- 0xf0, 0x66, 0x0d, 0x2e, 0x20, 0x48, 0x96, 0x90, 0x14, 0xf4, 0x54, 0x63, 0xc4, 0xf4, 0x39,
- 0x30, 0x38, 0x3a, 0x00, 0x47, 0x44, 0x53, 0x55, 0xa1, 0x3a, 0x00, 0x01, 0x11, 0x71, 0x6e,
- 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3a,
- 0x00, 0x47, 0x44, 0x54, 0x58, 0x20, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01,
- 0x3a, 0x00, 0x47, 0x44, 0x57, 0x58, 0x71, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21,
- 0x58, 0x20, 0x2d, 0x41, 0x43, 0x19, 0xf2, 0x91, 0x58, 0x12, 0x65, 0x2e, 0x96, 0xb5, 0x9d,
- 0x12, 0x18, 0x58, 0x54, 0x11, 0xed, 0x41, 0x30, 0xef, 0xa4, 0xee, 0x69, 0x8f, 0x0c, 0x6e,
- 0xe6, 0x27, 0xc5, 0x20, 0x22, 0x58, 0x20, 0x21, 0x0e, 0x8f, 0x83, 0xe5, 0xeb, 0x40, 0x89,
- 0xc2, 0x0a, 0x43, 0x6c, 0x9f, 0xa8, 0x4e, 0xe0, 0xba, 0x9e, 0xba, 0x4f, 0xe3, 0x27, 0xc4,
- 0xbd, 0x41, 0xa0, 0xd6, 0xe9, 0x55, 0x54, 0x17, 0x78, 0x23, 0x58, 0x21, 0x00, 0xb6, 0x33,
- 0x44, 0x98, 0xa7, 0x1c, 0x90, 0x13, 0xcc, 0x42, 0x71, 0x43, 0x29, 0xe5, 0xe1, 0x57, 0x89,
- 0x7a, 0x39, 0x17, 0x7c, 0xcc, 0x03, 0xac, 0xd3, 0x1b, 0xd2, 0xae, 0x29, 0x5f, 0xd6, 0xf8,
- 0x3a, 0x00, 0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x60, 0xc4, 0x54, 0xad, 0x40, 0xa2, 0x07,
- 0xc7, 0x80, 0xbd, 0x41, 0x77, 0x5d, 0xa7, 0xa2, 0xef, 0xef, 0x92, 0x67, 0x24, 0xab, 0xa1,
- 0x4a, 0x5e, 0x4f, 0x73, 0xfb, 0x5c, 0x1f, 0xe6, 0x46, 0x2f, 0xb9, 0x1b, 0x71, 0x86, 0x87,
- 0x29, 0xc4, 0x66, 0xb7, 0x3e, 0x85, 0x13, 0x9a, 0xa3, 0xf8, 0xfc, 0x63, 0x26, 0xe0, 0xba,
- 0x0b, 0xe0, 0x9b, 0x2e, 0x7d, 0x06, 0x06, 0xb8, 0x2f, 0xdd, 0x0c, 0xa5, 0x90, 0x1c, 0x10,
- 0x1c, 0x55, 0xf9, 0x65, 0xf6, 0x26, 0x40, 0x41, 0xaf, 0x5c, 0x16, 0x03, 0xf3, 0xee, 0x8d,
- 0x72, 0x2c, 0x6b, 0x1e, 0xb3, 0x1f, 0x96, 0x97, 0x34, 0x61, 0x0d, 0x5c, 0xe4, 0x94, 0x6a,
- 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa0, 0x59, 0x02, 0x0f, 0x82, 0x58, 0x20, 0x01, 0x02, 0x03,
- 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
- 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x59,
- 0x01, 0xe9, 0x84, 0x03, 0x67, 0x6b, 0x65, 0x79, 0x6d, 0x69, 0x6e, 0x74, 0xae, 0x65, 0x62,
- 0x72, 0x61, 0x6e, 0x64, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x65, 0x66, 0x75, 0x73,
- 0x65, 0x64, 0x01, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
- 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x67,
- 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x65, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x68, 0x76,
- 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x65, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x6a, 0x6f,
- 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x31, 0x32, 0x6c, 0x6d, 0x61,
- 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x66, 0x47, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x6d, 0x76, 0x62, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73,
- 0x74, 0x4f, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd,
- 0xee, 0xff, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x65, 0x76,
- 0x65, 0x6c, 0x63, 0x74, 0x65, 0x65, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74,
- 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x62, 0x70, 0x62,
- 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
- 0x66, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x72, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f,
- 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c,
- 0x61, 0x72, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f,
- 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x63, 0x82, 0xa6, 0x01, 0x02, 0x03,
- 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x50, 0x43, 0xb4, 0xf1, 0xc1, 0x7f, 0x17, 0xc6, 0x3b,
- 0x56, 0x27, 0x63, 0x03, 0x18, 0x78, 0x9d, 0x63, 0x93, 0x3b, 0x98, 0xed, 0x55, 0x8c, 0x87,
- 0x1b, 0xd7, 0x89, 0xb6, 0x81, 0x92, 0x5f, 0x24, 0x22, 0x58, 0x20, 0xd5, 0x24, 0x93, 0xda,
- 0x3e, 0x32, 0x17, 0xfa, 0xe8, 0x8d, 0x1e, 0xa9, 0xe0, 0x84, 0x4e, 0x1c, 0x6a, 0xef, 0x9a,
- 0xe3, 0xbe, 0x1d, 0xf1, 0x14, 0xe0, 0x9e, 0x82, 0xc8, 0x92, 0x1a, 0x3a, 0x69, 0x23, 0x58,
- 0x20, 0x29, 0xcb, 0x16, 0x78, 0x61, 0x35, 0x92, 0x3f, 0x71, 0xc4, 0x66, 0x61, 0xd4, 0xd4,
- 0x20, 0x8a, 0x86, 0x1e, 0xb0, 0x2b, 0x2f, 0x4f, 0x13, 0xb4, 0x0d, 0x89, 0x60, 0x87, 0x77,
- 0xac, 0x1a, 0x0f, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x4b, 0xcc,
- 0x7a, 0x09, 0x99, 0x76, 0xe7, 0xfa, 0x06, 0xb9, 0x19, 0x22, 0x15, 0x3b, 0x9f, 0xa8, 0x34,
- 0x77, 0x24, 0x27, 0x8c, 0x8a, 0x97, 0x61, 0xf3, 0x6f, 0x29, 0x74, 0x4e, 0x9a, 0x66, 0x23,
- 0x22, 0x58, 0x20, 0x8f, 0xa8, 0xaf, 0x2b, 0x02, 0x3a, 0xd4, 0x8a, 0xa2, 0x9d, 0x25, 0xa8,
- 0x01, 0xe7, 0xbd, 0x61, 0x25, 0x88, 0xb4, 0xc9, 0xce, 0x05, 0x43, 0xcc, 0x0d, 0x38, 0x7d,
- 0xe2, 0xda, 0x03, 0xb3, 0x33, 0x23, 0x58, 0x21, 0x00, 0xc8, 0x67, 0xb8, 0xbe, 0xc4, 0x1c,
- 0xca, 0x3c, 0x73, 0x3c, 0xbf, 0x52, 0xb2, 0x5a, 0x64, 0x9e, 0x9f, 0xae, 0xc6, 0x9f, 0x02,
- 0x2f, 0xee, 0x92, 0x1d, 0xdb, 0x01, 0x77, 0x27, 0x12, 0x84, 0x14, 0x58, 0x40, 0x6c, 0xd5,
- 0x66, 0x0a, 0x99, 0xdd, 0x32, 0x47, 0x50, 0x1f, 0x5d, 0x46, 0x40, 0x8a, 0x60, 0x25, 0xa0,
- 0x1b, 0x3c, 0x2a, 0xcf, 0xa1, 0x92, 0x1a, 0xdc, 0x81, 0xaa, 0xb0, 0x0f, 0xf2, 0xe6, 0x94,
- 0xce, 0x3d, 0xff, 0xac, 0x25, 0x44, 0xea, 0xf7, 0x0a, 0x89, 0x9d, 0xc4, 0x7e, 0xe5, 0x02,
- 0xa7, 0xb6, 0xc2, 0x40, 0x06, 0x65, 0xc5, 0xff, 0x19, 0xc5, 0xcd, 0x1c, 0xd5, 0x78, 0x01,
- 0xd4, 0xb8};
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3a, 0x00, 0x47,
+ 0x44, 0x56, 0x41, 0x01, 0x3a, 0x00, 0x47, 0x44, 0x57, 0x58, 0x4d, 0xa5, 0x01, 0x02, 0x03,
+ 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x2d, 0xbd, 0x92, 0x58, 0xc8, 0xcd, 0xc3, 0xc5, 0x14,
+ 0xe3, 0x6e, 0x5f, 0xab, 0x71, 0x41, 0x46, 0x83, 0xb4, 0x3e, 0x82, 0xdb, 0xe7, 0x7d, 0x27,
+ 0xe5, 0x26, 0x36, 0x94, 0xcb, 0x4c, 0x72, 0x8f, 0x22, 0x58, 0x20, 0xbf, 0xa2, 0xa7, 0x15,
+ 0x46, 0x5a, 0xea, 0xa8, 0xc7, 0xad, 0x22, 0x61, 0x9c, 0xba, 0x87, 0x70, 0x65, 0x64, 0x11,
+ 0x05, 0x8a, 0x58, 0x8c, 0x0c, 0x25, 0xc7, 0xf8, 0x5f, 0xfc, 0x4a, 0xee, 0xa1, 0x3a, 0x00,
+ 0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x40, 0x43, 0xba, 0xff, 0xdb, 0xbb, 0xa9, 0x9e, 0x8f,
+ 0x06, 0xdf, 0x33, 0xa0, 0x3f, 0x30, 0xc3, 0x64, 0x84, 0x32, 0xb5, 0x2a, 0x06, 0x53, 0x13,
+ 0x70, 0xbe, 0xa3, 0x0b, 0x4d, 0xbe, 0x8d, 0x8c, 0x90, 0xde, 0x6c, 0x1d, 0xa8, 0xea, 0x40,
+ 0xd5, 0x17, 0xa1, 0xea, 0x62, 0x95, 0x37, 0x64, 0x92, 0xc3, 0xc4, 0xef, 0xd7, 0xcf, 0x87,
+ 0x0c, 0x9a, 0xd2, 0x5c, 0x10, 0x1d, 0x00, 0x2e, 0xe4, 0xe9, 0x1f, 0x84, 0x43, 0xa1, 0x01,
+ 0x26, 0xa0, 0x59, 0x02, 0x10, 0x82, 0x58, 0x20, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
+ 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x59, 0x01, 0xea, 0x84, 0x03,
+ 0x67, 0x6b, 0x65, 0x79, 0x6d, 0x69, 0x6e, 0x74, 0xae, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64,
+ 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x01, 0x65,
+ 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x66, 0x64, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x67, 0x70, 0x72, 0x6f, 0x64,
+ 0x75, 0x63, 0x74, 0x65, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x68, 0x76, 0x62, 0x5f, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x65, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x6a, 0x6f, 0x73, 0x5f, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x31, 0x32, 0x6c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61,
+ 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6d, 0x76,
+ 0x62, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4f, 0x11, 0x22,
+ 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x6e, 0x73,
+ 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x63, 0x74,
+ 0x65, 0x65, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c,
+ 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x62, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x6c,
+ 0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x65, 0x64, 0x72, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x74, 0x63,
+ 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x61, 0x72, 0x76, 0x65,
+ 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65,
+ 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x63, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21,
+ 0x58, 0x20, 0xad, 0xd2, 0x8c, 0xcc, 0xfb, 0x22, 0xd8, 0x5a, 0x3b, 0x9d, 0x22, 0x58, 0xb3,
+ 0x7c, 0xcc, 0xa5, 0x22, 0x46, 0x86, 0x2b, 0x29, 0x87, 0x49, 0xdd, 0xe4, 0x2c, 0xb4, 0x3f,
+ 0xf2, 0x4e, 0x6a, 0xed, 0x22, 0x58, 0x20, 0xe9, 0x34, 0x28, 0x54, 0x21, 0x7e, 0x88, 0x34,
+ 0x82, 0x0d, 0x0f, 0x14, 0x5b, 0xec, 0x61, 0xc4, 0xf2, 0xa4, 0xef, 0xf8, 0x17, 0xeb, 0xeb,
+ 0x05, 0x01, 0x36, 0x14, 0x52, 0xc7, 0xc2, 0xd8, 0xd3, 0x23, 0x58, 0x21, 0x00, 0xd9, 0xb4,
+ 0x13, 0xd0, 0x86, 0x31, 0x5e, 0x97, 0xc2, 0x54, 0x03, 0x72, 0x80, 0x6f, 0x14, 0x53, 0xbe,
+ 0x2e, 0xe5, 0x1b, 0x02, 0x1a, 0x62, 0x1a, 0x88, 0xe8, 0xa2, 0xde, 0xd0, 0x7d, 0xf6, 0x53,
+ 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xca, 0x7d, 0x6e, 0xb5, 0x78,
+ 0x99, 0x9e, 0x66, 0xf4, 0x5d, 0xfe, 0xd5, 0x92, 0xe3, 0x30, 0xf5, 0xd5, 0xc2, 0x82, 0xf2,
+ 0x6d, 0x58, 0x16, 0x26, 0xa5, 0xe7, 0xfc, 0x62, 0x8f, 0xf3, 0x61, 0x56, 0x22, 0x58, 0x20,
+ 0x9f, 0x42, 0x22, 0x11, 0x1c, 0x45, 0x5c, 0x3a, 0x30, 0x95, 0xb4, 0xb3, 0x63, 0x26, 0x09,
+ 0xfc, 0x2e, 0x6e, 0x99, 0xdd, 0x44, 0x37, 0x34, 0xa9, 0x68, 0x42, 0xf5, 0x91, 0x40, 0xae,
+ 0xfa, 0x52, 0x23, 0x58, 0x21, 0x00, 0xe2, 0x3b, 0xaa, 0x88, 0xfc, 0xec, 0x23, 0xe7, 0x93,
+ 0x91, 0x04, 0x8e, 0xae, 0xa7, 0x44, 0xb4, 0x5e, 0x46, 0xe8, 0x91, 0x59, 0x3e, 0x43, 0x13,
+ 0x82, 0x8e, 0xa1, 0xee, 0x47, 0xbd, 0x13, 0x27, 0x58, 0x40, 0x43, 0x1d, 0xc8, 0x35, 0x44,
+ 0xbf, 0xd5, 0x06, 0x2c, 0xac, 0x18, 0x3c, 0xbb, 0xc6, 0x77, 0x99, 0x2f, 0x4e, 0x71, 0xcd,
+ 0x7a, 0x9b, 0x93, 0xc7, 0x08, 0xa3, 0x71, 0x89, 0xb5, 0xb2, 0x04, 0xbe, 0x69, 0x22, 0xf3,
+ 0x66, 0xb8, 0xa9, 0xc6, 0x5e, 0x7c, 0x45, 0xf6, 0x2f, 0x8a, 0xa9, 0x3e, 0xee, 0x6f, 0x92,
+ 0x2a, 0x9c, 0x91, 0xe2, 0x1d, 0x4a, 0x4e, 0x4a, 0xb4, 0xcc, 0x87, 0xd2, 0x85, 0x5f, 0xa1,
+ 0x6b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62,
+ 0x72, 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f,
+ 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32,
+ 0x30, 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72,
+ 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
const RpcHardwareInfo kRpcHardwareInfo = {.versionNumber = 3};
@@ -640,14 +877,87 @@
ASSERT_FALSE(*result) << "DICE Chain is proper";
}
+TEST(RemoteProvUtils, csrHasUdsCerts) {
+ auto csr = hwtrust::Csr::validate(kCsrWithUdsCerts, hwtrust::DiceChain::Kind::kVsr16,
+ false /*isFactory*/, false /*allowAnyMode*/,
+ deviceSuffix(DEFAULT_INSTANCE_NAME));
+ ASSERT_TRUE(csr.ok()) << csr.error().message();
+ ASSERT_TRUE(csr->hasUdsCerts());
+}
+
+TEST(RemoteProvUtils, csrDoesntHaveUdsCerts) {
+ auto csr = hwtrust::Csr::validate(kCsrWithoutUdsCerts, hwtrust::DiceChain::Kind::kVsr16,
+ false /*isFactory*/, false /*allowAnyMode*/,
+ deviceSuffix(DEFAULT_INSTANCE_NAME));
+ ASSERT_TRUE(csr.ok()) << csr.error().message();
+ ASSERT_FALSE(csr->hasUdsCerts());
+}
+
+TEST(RemoteProvUtils, csrHasCorrectChallenge) {
+ auto csr = hwtrust::Csr::validate(kCsrWithoutUdsCerts, hwtrust::DiceChain::Kind::kVsr16,
+ false /*isFactory*/, false /*allowAnyMode*/,
+ deviceSuffix(DEFAULT_INSTANCE_NAME));
+ ASSERT_TRUE(csr.ok()) << csr.error().message();
+
+ auto equal = csr->compareChallenge(kChallenge);
+ ASSERT_TRUE(equal.ok()) << equal.error().message();
+
+ ASSERT_TRUE(*equal) << kErrorChallengeMismatch;
+
+ auto zeroes = std::vector<uint8_t>(32, 0);
+ auto notEqual = csr->compareChallenge(zeroes);
+ ASSERT_TRUE(notEqual.ok()) << notEqual.error().message();
+
+ ASSERT_FALSE(*notEqual) << "ERROR: challenges are not different";
+}
+
+TEST(RemoteProvUtils, csrHasCorrectKeysToSign) {
+ auto csr = hwtrust::Csr::validate(kCsrWithoutUdsCerts, hwtrust::DiceChain::Kind::kVsr16,
+ false /*isFactory*/, false /*allowAnyMode*/,
+ deviceSuffix(DEFAULT_INSTANCE_NAME));
+ ASSERT_TRUE(csr.ok()) << csr.error().message();
+
+ auto equal = csr->compareKeysToSign(kKeysToSignForCsrWithoutUdsCerts);
+ ASSERT_TRUE(equal.ok()) << equal.error().message();
+ ASSERT_TRUE(*equal) << kErrorKeysToSignMismatch;
+
+ auto zeroes = std::vector<uint8_t>(kKeysToSignForCsrWithoutUdsCerts.size(), 0);
+ auto notEqual = csr->compareKeysToSign(zeroes);
+ ASSERT_TRUE(notEqual.ok()) << notEqual.error().message();
+ ASSERT_FALSE(*notEqual) << kErrorKeysToSignMismatch;
+}
+
+TEST(RemoteProvUtilsTest, allowDegenerateDiceChainWhenDegenerate) {
+ auto [keysToSignPtr, _, errMsg] = cppbor::parse(kKeysToSignForCsrWithDegenerateDiceChain);
+ ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
+
+ const auto keysToSign = keysToSignPtr->asArray();
+ auto csr = verifyFactoryCsr(*keysToSign, kCsrWithDegenerateDiceChain, kRpcHardwareInfo,
+ DEFAULT_INSTANCE_NAME, kChallenge,
+ /*allowDegenerate=*/true, /*requireUdsCerts=*/false);
+ ASSERT_TRUE(csr) << csr.message();
+}
+
+TEST(RemoteProvUtilsTest, disallowDegenerateDiceChainWhenDegenerate) {
+ auto [keysToSignPtr, _, errMsg] = cppbor::parse(kKeysToSignForCsrWithDegenerateDiceChain);
+ ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
+
+ const auto keysToSign = keysToSignPtr->asArray();
+ auto csr = verifyFactoryCsr(*keysToSign, kCsrWithDegenerateDiceChain, kRpcHardwareInfo,
+ DEFAULT_INSTANCE_NAME, kChallenge,
+ /*allowDegenerate=*/false, /*requireUdsCerts=*/false);
+ ASSERT_FALSE(csr);
+ ASSERT_THAT(csr.message(), testing::HasSubstr(kErrorDiceChainIsDegenerate));
+}
+
TEST(RemoteProvUtilsTest, requireUdsCertsWhenPresent) {
auto [keysToSignPtr, _, errMsg] = cppbor::parse(kKeysToSignForCsrWithUdsCerts);
ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
const auto keysToSign = keysToSignPtr->asArray();
- auto csr =
- verifyFactoryCsr(*keysToSign, kCsrWithUdsCerts, kRpcHardwareInfo, "default", kChallenge,
- /*allowDegenerate=*/false, /*requireUdsCerts=*/true);
+ auto csr = verifyFactoryCsr(*keysToSign, kCsrWithUdsCerts, kRpcHardwareInfo,
+ DEFAULT_INSTANCE_NAME, kChallenge,
+ /*allowDegenerate=*/false, /*requireUdsCerts=*/true);
ASSERT_TRUE(csr) << csr.message();
}
@@ -667,13 +977,11 @@
DEFAULT_INSTANCE_NAME, kChallenge, /*allowDegenerate=*/false,
/*requireUdsCerts=*/true);
ASSERT_FALSE(csr);
- ASSERT_THAT(csr.message(), testing::HasSubstr("UdsCerts must not be empty"));
+ ASSERT_THAT(csr.message(), testing::HasSubstr(kErrorUdsCertsAreRequired));
}
TEST(RemoteProvUtilsTest, dontRequireUdsCertsWhenNotPresent) {
- auto [keysToSignPtr, _, errMsg] = cppbor::parse(
- kKeysToSignForCsrWithoutUdsCerts.data(),
- kKeysToSignForCsrWithoutUdsCerts.data() + kKeysToSignForCsrWithoutUdsCerts.size());
+ auto [keysToSignPtr, _, errMsg] = cppbor::parse(kKeysToSignForCsrWithoutUdsCerts);
ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
const auto* keysToSign = keysToSignPtr->asArray();
@@ -683,6 +991,31 @@
ASSERT_TRUE(csr) << csr.message();
}
+TEST(RemoteProvUtilsTest, compareRootPublicKeysInDiceChains) {
+ ASSERT_NE(kCsrWithSharedUdsRoot1, kCsrWithSharedUdsRoot2);
+ ASSERT_NE(kCsrWithUdsCerts, kCsrWithSharedUdsRoot1);
+
+ auto equal = compareRootPublicKeysInDiceChains(kCsrWithSharedUdsRoot1, DEFAULT_INSTANCE_NAME,
+ kCsrWithSharedUdsRoot2, DEFAULT_INSTANCE_NAME);
+ ASSERT_TRUE(equal) << equal.message();
+ ASSERT_TRUE(*equal) << "Root public keys in DICE chains do not match.";
+
+ auto notEqual = compareRootPublicKeysInDiceChains(kCsrWithSharedUdsRoot1, DEFAULT_INSTANCE_NAME,
+ kCsrWithUdsCerts, DEFAULT_INSTANCE_NAME);
+ ASSERT_TRUE(notEqual) << notEqual.message();
+ ASSERT_FALSE(*notEqual) << "Root public keys in DICE chains match.";
+}
+
+TEST(RemoteProvUtilsTest, componentNameInLeafCertificateOfDiceChainContainsKeyMint) {
+ auto result = verifyComponentNameInKeyMintDiceChain(kCsrWithKeyMintInComponentName);
+ ASSERT_TRUE(result) << result.message();
+ ASSERT_TRUE(*result) << "Leaf Certificate in CSR does not contain 'keymint' in component name";
+
+ auto result2 = verifyComponentNameInKeyMintDiceChain(kCsrWithUdsCerts);
+ ASSERT_TRUE(result2) << result2.message();
+ ASSERT_FALSE(*result2) << "Leaf Certificate in CSR contains 'keymint' in component name";
+}
+
TEST(RemoteProvUtilsTest, parseFullyQualifiedInstanceNames) {
ASSERT_EQ(deviceSuffix(RKPVM_INSTANCE_NAME), "avf");
ASSERT_EQ(deviceSuffix(DEFAULT_INSTANCE_NAME), "default");
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index b9c742a..11abd45 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -151,20 +151,24 @@
return corruptChain.encode();
}
-bool matching_keymint_device(const string& rp_name, std::shared_ptr<IKeyMintDevice>* keyMint) {
- auto rp_suffix = deviceSuffix(rp_name);
+template <class T>
+auto getHandle(const string& serviceName) {
+ ::ndk::SpAIBinder binder(AServiceManager_waitForService(serviceName.c_str()));
+ return T::fromBinder(binder);
+}
- vector<string> km_names = ::android::getAidlHalInstanceNames(IKeyMintDevice::descriptor);
- for (const string& km_name : km_names) {
+std::shared_ptr<IKeyMintDevice> matchingKeyMintDevice(const string& rpcName) {
+ auto rpcSuffix = deviceSuffix(rpcName);
+
+ vector<string> kmNames = ::android::getAidlHalInstanceNames(IKeyMintDevice::descriptor);
+ for (const string& kmName : kmNames) {
// If the suffix of the KeyMint instance equals the suffix of the
// RemotelyProvisionedComponent instance, assume they match.
- if (deviceSuffix(km_name) == rp_suffix && AServiceManager_isDeclared(km_name.c_str())) {
- ::ndk::SpAIBinder binder(AServiceManager_waitForService(km_name.c_str()));
- *keyMint = IKeyMintDevice::fromBinder(binder);
- return true;
+ if (deviceSuffix(kmName) == rpcSuffix && AServiceManager_isDeclared(kmName.c_str())) {
+ getHandle<IKeyMintDevice>(kmName);
}
}
- return false;
+ return nullptr;
}
} // namespace
@@ -173,8 +177,7 @@
public:
virtual void SetUp() override {
if (AServiceManager_isDeclared(GetParam().c_str())) {
- ::ndk::SpAIBinder binder(AServiceManager_waitForService(GetParam().c_str()));
- provisionable_ = IRemotelyProvisionedComponent::fromBinder(binder);
+ provisionable_ = getHandle<IRemotelyProvisionedComponent>(GetParam());
}
ASSERT_NE(provisionable_, nullptr);
auto status = provisionable_->getHardwareInfo(&rpcHardwareInfo);
@@ -210,9 +213,7 @@
std::set<std::string> uniqueIds;
for (auto hal : ::android::getAidlHalInstanceNames(IRemotelyProvisionedComponent::descriptor)) {
ASSERT_TRUE(AServiceManager_isDeclared(hal.c_str()));
- ::ndk::SpAIBinder binder(AServiceManager_waitForService(hal.c_str()));
- std::shared_ptr<IRemotelyProvisionedComponent> rpc =
- IRemotelyProvisionedComponent::fromBinder(binder);
+ auto rpc = getHandle<IRemotelyProvisionedComponent>(hal);
ASSERT_NE(rpc, nullptr);
RpcHardwareInfo hwInfo;
@@ -237,6 +238,7 @@
* on the device.
*/
// @VsrTest = 3.10-015
+// @VsrTest = 3.10-018.001
TEST(NonParameterizedTests, requireDiceOnDefaultInstanceIfStrongboxPresent) {
int vsr_api_level = get_vsr_api_level();
if (vsr_api_level < 35) {
@@ -248,6 +250,85 @@
GTEST_SKIP() << "Strongbox is not present on this device.";
}
+ auto rpc = getHandle<IRemotelyProvisionedComponent>(DEFAULT_INSTANCE_NAME);
+ ASSERT_NE(rpc, nullptr);
+
+ bytevec challenge = randomBytes(64);
+ bytevec csr;
+ auto status = rpc->generateCertificateRequestV2({} /* keysToSign */, challenge, &csr);
+ EXPECT_TRUE(status.isOk()) << status.getDescription();
+
+ auto result = isCsrWithProperDiceChain(csr, DEFAULT_INSTANCE_NAME);
+ ASSERT_TRUE(result) << result.message();
+ ASSERT_TRUE(*result);
+}
+
+/**
+ * Verify that if a protected VM (also called `avf` or RKP VM) implementation exists, then the
+ * protected VM and the primary KeyMint (also called 'default') implementation's DICE certificate
+ * chain has the same root public key, i.e., the same UDS public key
+ */
+// @VsrTest = 7.1-003.001
+TEST(NonParameterizedTests, equalUdsPubInDiceCertChainForRkpVmAndPrimaryKeyMintInstances) {
+ int apiLevel = get_vsr_api_level();
+ if (apiLevel < 202504 && !AServiceManager_isDeclared(RKPVM_INSTANCE_NAME.c_str())) {
+ GTEST_SKIP() << "The RKP VM (" << RKPVM_INSTANCE_NAME << ") is not present on this device.";
+ }
+ if (apiLevel >= 202504) {
+ ASSERT_TRUE(AServiceManager_isDeclared(RKPVM_INSTANCE_NAME.c_str()));
+ }
+
+ auto rkpVmRpc = getHandle<IRemotelyProvisionedComponent>(RKPVM_INSTANCE_NAME);
+ ASSERT_NE(rkpVmRpc, nullptr) << "The RKP VM (" << RKPVM_INSTANCE_NAME
+ << ") RPC is unavailable.";
+
+ RpcHardwareInfo hardwareInfo;
+ auto status = rkpVmRpc->getHardwareInfo(&hardwareInfo);
+ if (!status.isOk()) {
+ GTEST_SKIP() << "The RKP VM is not supported on this system.";
+ }
+
+ bytevec rkpVmChallenge = randomBytes(MAX_CHALLENGE_SIZE);
+ bytevec rkpVmCsr;
+ auto rkpVmStatus =
+ rkpVmRpc->generateCertificateRequestV2({} /* keysToSign */, rkpVmChallenge, &rkpVmCsr);
+ ASSERT_TRUE(rkpVmStatus.isOk()) << rkpVmStatus.getDescription();
+
+ auto primaryKeyMintRpc = getHandle<IRemotelyProvisionedComponent>(DEFAULT_INSTANCE_NAME);
+ ASSERT_NE(primaryKeyMintRpc, nullptr)
+ << "The Primary KeyMint (" << DEFAULT_INSTANCE_NAME << ") RPC is unavailable.";
+
+ bytevec primaryKeyMintChallenge = randomBytes(MAX_CHALLENGE_SIZE);
+ bytevec primaryKeyMintCsr;
+ auto primaryKeyMintStatus = primaryKeyMintRpc->generateCertificateRequestV2(
+ {} /* keysToSign */, primaryKeyMintChallenge, &primaryKeyMintCsr);
+ ASSERT_TRUE(primaryKeyMintStatus.isOk()) << primaryKeyMintStatus.getDescription();
+
+ auto equal = compareRootPublicKeysInDiceChains(rkpVmCsr, RKPVM_INSTANCE_NAME, primaryKeyMintCsr,
+ DEFAULT_INSTANCE_NAME);
+ ASSERT_TRUE(equal) << equal.message();
+ ASSERT_TRUE(*equal) << "Primary KeyMint and RKP VM RPCs have different UDS public keys";
+}
+
+/**
+ * Suppose that there is a StrongBox KeyMint instance on the device.
+ *
+ * Then, this test verifies that "keymint" is a substring of the component name in the configuration
+ * descriptor in the leaf certificate of the DICE chain for the primary ("default") KeyMint
+ * instance.
+ */
+// @VsrTest = 3.10-018.003
+TEST(NonParameterizedTests, componentNameInConfigurationDescriptorForPrimaryKeyMintInstance) {
+ int vsr_api_level = get_vsr_api_level();
+ if (vsr_api_level < 202504) {
+ GTEST_SKIP() << "Applies only to VSR API level 202504 or newer, this device is: "
+ << vsr_api_level;
+ }
+
+ if (!AServiceManager_isDeclared(KEYMINT_STRONGBOX_INSTANCE_NAME.c_str())) {
+ GTEST_SKIP() << "Strongbox is not present on this device.";
+ }
+
::ndk::SpAIBinder binder(AServiceManager_waitForService(DEFAULT_INSTANCE_NAME.c_str()));
std::shared_ptr<IRemotelyProvisionedComponent> rpc =
IRemotelyProvisionedComponent::fromBinder(binder);
@@ -258,7 +339,7 @@
auto status = rpc->generateCertificateRequestV2({} /* keysToSign */, challenge, &csr);
EXPECT_TRUE(status.isOk()) << status.getDescription();
- auto result = isCsrWithProperDiceChain(csr, DEFAULT_INSTANCE_NAME);
+ auto result = verifyComponentNameInKeyMintDiceChain(csr);
ASSERT_TRUE(result) << result.message();
ASSERT_TRUE(*result);
}
@@ -336,9 +417,8 @@
*/
TEST_P(GenerateKeyTests, generateAndUseEcdsaP256Key_prodMode) {
// See if there is a matching IKeyMintDevice for this IRemotelyProvisionedComponent.
- std::shared_ptr<IKeyMintDevice> keyMint;
- if (!matching_keymint_device(GetParam(), &keyMint)) {
- // No matching IKeyMintDevice.
+ auto keyMint = matchingKeyMintDevice(GetParam());
+ if (!keyMint) {
GTEST_SKIP() << "Skipping key use test as no matching KeyMint device found";
return;
}
@@ -931,9 +1011,8 @@
// @VsrTest = 3.10-015
TEST_P(CertificateRequestV2Test, DeviceInfo) {
// See if there is a matching IKeyMintDevice for this IRemotelyProvisionedComponent.
- std::shared_ptr<IKeyMintDevice> keyMint;
- if (!matching_keymint_device(GetParam(), &keyMint)) {
- // No matching IKeyMintDevice.
+ std::shared_ptr<IKeyMintDevice> keyMint = matchingKeyMintDevice(GetParam());
+ if (!keyMint) {
GTEST_SKIP() << "Skipping key use test as no matching KeyMint device found";
return;
}
@@ -999,6 +1078,7 @@
std::unique_ptr<cppbor::Array> csrPayload = std::move(*result);
ASSERT_TRUE(csrPayload);
+ ASSERT_TRUE(csrPayload->size() > 2);
auto deviceInfo = csrPayload->get(2)->asMap();
ASSERT_TRUE(deviceInfo);
diff --git a/security/secretkeeper/aidl/Android.bp b/security/secretkeeper/aidl/Android.bp
index d282621..f0b7894 100644
--- a/security/secretkeeper/aidl/Android.bp
+++ b/security/secretkeeper/aidl/Android.bp
@@ -25,7 +25,7 @@
"android.hardware.security.authgraph-V1",
],
stability: "vintf",
- frozen: true,
+ frozen: false,
backend: {
java: {
enabled: true,
@@ -88,6 +88,6 @@
rust_defaults {
name: "secretkeeper_use_latest_hal_aidl_rust",
rustlibs: [
- "android.hardware.security.secretkeeper-V1-rust",
+ "android.hardware.security.secretkeeper-V2-rust",
],
}
diff --git a/security/secretkeeper/aidl/aidl_api/android.hardware.security.secretkeeper/current/android/hardware/security/secretkeeper/ISecretkeeper.aidl b/security/secretkeeper/aidl/aidl_api/android.hardware.security.secretkeeper/current/android/hardware/security/secretkeeper/ISecretkeeper.aidl
index 8ce37cd..ed48480 100644
--- a/security/secretkeeper/aidl/aidl_api/android.hardware.security.secretkeeper/current/android/hardware/security/secretkeeper/ISecretkeeper.aidl
+++ b/security/secretkeeper/aidl/aidl_api/android.hardware.security.secretkeeper/current/android/hardware/security/secretkeeper/ISecretkeeper.aidl
@@ -38,6 +38,7 @@
byte[] processSecretManagementRequest(in byte[] request);
void deleteIds(in android.hardware.security.secretkeeper.SecretId[] ids);
void deleteAll();
+ android.hardware.security.secretkeeper.PublicKey getSecretkeeperIdentity();
const int ERROR_UNKNOWN_KEY_ID = 1;
const int ERROR_INTERNAL_ERROR = 2;
const int ERROR_REQUEST_MALFORMED = 3;
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/security/secretkeeper/aidl/aidl_api/android.hardware.security.secretkeeper/current/android/hardware/security/secretkeeper/PublicKey.aidl
similarity index 81%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to security/secretkeeper/aidl/aidl_api/android.hardware.security.secretkeeper/current/android/hardware/security/secretkeeper/PublicKey.aidl
index 077652b..f690abf 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/security/secretkeeper/aidl/aidl_api/android.hardware.security.secretkeeper/current/android/hardware/security/secretkeeper/PublicKey.aidl
@@ -31,10 +31,9 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.security.secretkeeper;
+/* @hide */
+@VintfStability
+parcelable PublicKey {
+ byte[] keyMaterial;
}
diff --git a/security/secretkeeper/aidl/android/hardware/security/secretkeeper/ISecretkeeper.aidl b/security/secretkeeper/aidl/android/hardware/security/secretkeeper/ISecretkeeper.aidl
index b07dba8..91493a1 100644
--- a/security/secretkeeper/aidl/android/hardware/security/secretkeeper/ISecretkeeper.aidl
+++ b/security/secretkeeper/aidl/android/hardware/security/secretkeeper/ISecretkeeper.aidl
@@ -17,6 +17,7 @@
package android.hardware.security.secretkeeper;
import android.hardware.security.authgraph.IAuthGraphKeyExchange;
+import android.hardware.security.secretkeeper.PublicKey;
import android.hardware.security.secretkeeper.SecretId;
@VintfStability
@@ -101,4 +102,12 @@
* Delete data of all clients.
*/
void deleteAll();
+
+ /**
+ * Gets the public key of the secret keeper instance. This should be a CBOR-encoded
+ * COSE_Key, as a PubKeyEd25519 / PubKeyECDSA256 / PubKeyECDSA384, as defined in
+ * generateCertificateRequestV2.cddl. Clients must have a trusted way of ensuring
+ * this key is valid.
+ */
+ PublicKey getSecretkeeperIdentity();
}
diff --git a/security/secretkeeper/aidl/android/hardware/security/secretkeeper/PublicKey.aidl b/security/secretkeeper/aidl/android/hardware/security/secretkeeper/PublicKey.aidl
new file mode 100644
index 0000000..ccc89b3
--- /dev/null
+++ b/security/secretkeeper/aidl/android/hardware/security/secretkeeper/PublicKey.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2024 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.security.secretkeeper;
+
+/**
+ * Contents of a pubkey.
+ * @hide
+ */
+@VintfStability
+parcelable PublicKey {
+ /**
+ * CBOR-encoded COSE_Key
+ */
+ byte[] keyMaterial;
+}
diff --git a/security/secretkeeper/aidl/vts/Android.bp b/security/secretkeeper/aidl/vts/Android.bp
index be07a7b..c84afae 100644
--- a/security/secretkeeper/aidl/vts/Android.bp
+++ b/security/secretkeeper/aidl/vts/Android.bp
@@ -38,6 +38,7 @@
srcs: ["secretkeeper_test_client.rs"],
defaults: [
"rdroidtest.defaults",
+ "secretkeeper_use_latest_hal_aidl_rust",
],
test_suites: [
"general-tests",
@@ -45,7 +46,6 @@
],
test_config: "AndroidTest.xml",
rustlibs: [
- "android.hardware.security.secretkeeper-V1-rust",
"libauthgraph_boringssl",
"libauthgraph_core",
"libauthgraph_wire",
@@ -66,9 +66,10 @@
rust_binary {
name: "secretkeeper_cli",
srcs: ["secretkeeper_cli.rs"],
+ defaults: ["secretkeeper_use_latest_hal_aidl_rust"],
lints: "android",
- rlibs: [
- "android.hardware.security.secretkeeper-V1-rust",
+ prefer_rlib: true,
+ rustlibs: [
"libanyhow",
"libauthgraph_boringssl",
"libauthgraph_core",
diff --git a/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs b/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs
index 449a99a..b944865 100644
--- a/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs
+++ b/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs
@@ -16,6 +16,7 @@
use android_hardware_security_secretkeeper::aidl::android::hardware::security::secretkeeper::ISecretkeeper::ISecretkeeper;
use android_hardware_security_secretkeeper::aidl::android::hardware::security::secretkeeper::SecretId::SecretId;
+use android_hardware_security_secretkeeper::aidl::android::hardware::security::secretkeeper::PublicKey::PublicKey;
use authgraph_vts_test as ag_vts;
use authgraph_boringssl as boring;
use authgraph_core::key;
@@ -70,20 +71,32 @@
0x06, 0xAC, 0x36, 0x8B, 0x3C, 0x95, 0x50, 0x16, 0x67, 0x71, 0x65, 0x26, 0xEB, 0xD0, 0xC3, 0x98,
]);
-// Android expects the public key of Secretkeeper instance to be present in the Linux device tree.
+// Android expects the public key of Secretkeeper instance to be available either
+// a) by being present in the Linux device tree (prior to version 2 of the secretkeeper HAL), or
+// b) via the `getSecretKeeperIdentity` operation from v2 onwards.
// This allows clients to (cryptographically) verify that they are indeed talking to the real
// secretkeeper.
// Note that this is the identity of the `default` instance (and not `nonsecure`)!
-fn get_secretkeeper_identity() -> Option<CoseKey> {
- let path = Path::new(SECRETKEEPER_KEY_HOST_DT);
- if path.exists() {
- let key = fs::read(path).unwrap();
- let mut key = CoseKey::from_slice(&key).unwrap();
- key.canonicalize(CborOrdering::Lexicographic);
- Some(key)
+fn get_secretkeeper_identity(instance: &str) -> Option<CoseKey> {
+ let sk = get_connection(instance);
+ let key_material = if sk.getInterfaceVersion().expect("Error getting sk interface version") >= 2 {
+ let PublicKey { keyMaterial } = sk.getSecretkeeperIdentity().expect("Error calling getSecretkeeperIdentity");
+ Some(keyMaterial)
} else {
- None
- }
+ let path = Path::new(SECRETKEEPER_KEY_HOST_DT);
+ if path.exists() {
+ let key_material = fs::read(path).unwrap();
+ Some(key_material)
+ } else {
+ None
+ }
+ };
+
+ key_material.map(|km| {
+ let mut cose_key = CoseKey::from_slice(&km).expect("Error deserializing CoseKey from key material");
+ cose_key.canonicalize(CborOrdering::Lexicographic);
+ cose_key
+ })
}
fn get_instances() -> Vec<(String, String)> {
@@ -760,12 +773,12 @@
}
// This test checks that the identity of Secretkeeper (in context of AuthGraph key exchange) is
-// same as the one advertized in Linux device tree. This is only expected from `default` instance.
+// same as the one either a) advertized in Linux device tree or b) retrieved from SK itself
+// from (HAL v2 onwards). This is only expected from `default` instance.
#[rdroidtest(get_instances())]
-#[ignore_if(|p| p != "default")]
fn secretkeeper_check_identity(instance: String) {
- let sk_key = get_secretkeeper_identity()
- .expect("Failed to extract identity of default instance from device tree");
+ let sk_key = get_secretkeeper_identity(&instance)
+ .expect("Failed to extract identity of default instance");
// Create a session with this expected identity. This succeeds only if the identity used by
// Secretkeeper is sk_key.
let _ = SkClient::with_expected_sk_identity(&instance, sk_key).unwrap();
diff --git a/security/secretkeeper/default/Android.bp b/security/secretkeeper/default/Android.bp
index 799188f..134afc9 100644
--- a/security/secretkeeper/default/Android.bp
+++ b/security/secretkeeper/default/Android.bp
@@ -28,9 +28,9 @@
vendor_available: true,
defaults: [
"authgraph_use_latest_hal_aidl_rust",
+ "secretkeeper_use_latest_hal_aidl_rust",
],
rustlibs: [
- "android.hardware.security.secretkeeper-V1-rust",
"libauthgraph_boringssl",
"libauthgraph_core",
"libauthgraph_hal",
@@ -50,9 +50,9 @@
prefer_rlib: true,
defaults: [
"authgraph_use_latest_hal_aidl_rust",
+ "secretkeeper_use_latest_hal_aidl_rust",
],
rustlibs: [
- "android.hardware.security.secretkeeper-V1-rust",
"libandroid_logger",
"libbinder_rs",
"liblog_rust",
diff --git a/security/secretkeeper/default/secretkeeper.xml b/security/secretkeeper/default/secretkeeper.xml
index 40aebe0..699fff0 100644
--- a/security/secretkeeper/default/secretkeeper.xml
+++ b/security/secretkeeper/default/secretkeeper.xml
@@ -19,7 +19,7 @@
<hal format="aidl">
<name>android.hardware.security.secretkeeper</name>
- <version>1</version>
+ <version>2</version>
<interface>
<name>ISecretkeeper</name>
<instance>nonsecure</instance>
diff --git a/security/see/hdcp/README.md b/security/see/hdcp/README.md
new file mode 100644
index 0000000..76b8670
--- /dev/null
+++ b/security/see/hdcp/README.md
@@ -0,0 +1,65 @@
+# IHDCPAuthControl as a Trusted HAL service
+
+IHDCPAuthControl is expected to be a service implemented in a TEE.
+We provide a default reference implementation and its integration in Trusty
+as an example.
+
+The VTS test for a Trusted HAL service ought to run in the VM.
+We provide an integration of the VTS test in a Trusty VM,
+and later in a Microdroid VM (b/380632474).
+
+This interface shall not be exposed to the host and thus shall be part of
+the list of excluded interfaces from
+[compatibility_matrices/exclude/fcm_exclude.cpp](../../../compatibility_matrices/exclude/fcm_exclude.cpp)
+
+## 1. Mock Implementation
+
+The mock implementation under default/src/lib.rs is expected to be integrated in a
+TEE. For AOSP testing we offer two virtual device testing options:
+
+- Cuttlefish AVD, where the reference implementation is integrated in an AVF VM, emulating a TEE.
+- Trusty QEMU AVD, where the reference implementation is integrated in a Trusty TEE image (executed in secure world)
+
+### 1.1. Cuttlefish: Integrate in an AVF HAL pVM (Trusty)
+
+In Cuttlefish, we emulate a TEE with an AVF Trusty pVM.
+The VM2TZ IPC is emulated with a vsock port forward utility (b/379582767).
+
+Until vsock port forwarding is supported, the trusty_test_vm is used temporarily.
+(VTS tests and HAL implementation will be in same pVM).
+
+TODO: complete when trusty_hal_vm is created
+
+In order to add the mock HdcpAuthControlService to the trusty_test_vm, make sure
+that `hardware/interfaces/security/see/hdcp/default` is added to the
+trusty_test_vm makefile, by adding it to
+[trusty/device/x86/generic-x86_64/project/generic-x86_64-inc.mk](../../../../../trusty/device/x86/generic-x86_64/project/generic-x86_64-inc.mk)
+
+### 1.2. Trusty QEMU AVD: Integrate as a TA in Trusty TEE
+
+In order to add the mock HdcpAuthControlService to the Trusty TEE, make sure
+that `hardware/interfaces/security/see/hdcp/default` is added to
+[trusty/device/arm/generic-arm64/project/generic-arm-inc.mk](../../../../../trusty/device/arm/generic-arm64/project/generic-arm-inc.mk)
+
+
+## 2. VTS Tests
+
+IHdcpAuthControl service is expected to only be exposed to AVF pVM.
+
+The VTS tests shall verify:
+
+- IHdcpAuthControl cannot be accessed from the Android Host:
+
+ see [aidl/vts/src/host_test.rs](aidl/vts/host_test.rs)
+
+- IHdcpAuthControl can be accessed from an AVF pVM:
+
+ see [aidl/vts/src/vm_test.rs](aidl/vts/src/vm_test.rs)
+ see [aidl/vts/AndroidTest.xml](aidl/vts/AndroidTest.xml)
+
+
+To integrate the VTS test in the trusty_test_vm:
+
+1.
+1. add the test to [hardware/interfaces/security/see/usertests-rust-inc.mk](../usertests-rust-inc.mk)
+
diff --git a/security/see/hdcp/aidl/Android.bp b/security/see/hdcp/aidl/Android.bp
new file mode 100644
index 0000000..ad1db37
--- /dev/null
+++ b/security/see/hdcp/aidl/Android.bp
@@ -0,0 +1,57 @@
+// Copyright (C) 2024 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 {
+ default_team: "trendy_team_trusty",
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aidl_interface {
+ name: "android.hardware.security.see.hdcp",
+ vendor_available: true,
+ srcs: ["android/hardware/security/see/hdcp/*.aidl"],
+ imports: [
+ "android.hardware.drm.common-V1",
+ ],
+ stability: "vintf",
+ frozen: false,
+ backend: {
+ java: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ ndk: {
+ min_sdk_version: "34",
+ },
+ rust: {
+ enabled: true,
+ gen_mockall: true,
+ additional_rustlibs: [
+ "libmockall",
+ ],
+ },
+ },
+}
+
+// A rust_defaults that includes the latest hdcp AIDL library.
+// Modules that depend on hdcp directly can include this rust_defaults to avoid
+// managing dependency versions explicitly.
+rust_defaults {
+ name: "hdcp_use_latest_hal_aidl_rust",
+ rustlibs: [
+ "android.hardware.security.see.hdcp-V1-rust",
+ ],
+}
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/security/see/hdcp/aidl/aidl_api/android.hardware.security.see.hdcp/current/android/hardware/security/see/hdcp/IHdcpAuthControl.aidl
similarity index 63%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to security/see/hdcp/aidl/aidl_api/android.hardware.security.see.hdcp/current/android/hardware/security/see/hdcp/IHdcpAuthControl.aidl
index 077652b..b73d554 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/security/see/hdcp/aidl/aidl_api/android.hardware.security.see.hdcp/current/android/hardware/security/see/hdcp/IHdcpAuthControl.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2024 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.
@@ -31,10 +31,28 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.security.see.hdcp;
+@VintfStability
+interface IHdcpAuthControl {
+ android.hardware.drm.HdcpLevels getHdcpLevels();
+ void trySetHdcpLevel(in android.hardware.drm.HdcpLevel level);
+ android.hardware.security.see.hdcp.IHdcpAuthControl.PendingHdcpLevelResult getPendingHdcpLevel();
+ parcelable HalErrorCode {
+ const int NO_ERROR = 0;
+ const int GENERIC_ERROR = (-1) /* -1 */;
+ const int BAD_STATE = (-2) /* -2 */;
+ const int UNSUPPORTED = (-3) /* -3 */;
+ const int SERIALIZATION_ERROR = (-4) /* -4 */;
+ const int ALLOCATION_ERROR = (-5) /* -5 */;
+ const int BAD_PARAMETER = (-7) /* -7 */;
+ const int UNAUTHORIZED = (-8) /* -8 */;
+ }
+ parcelable PendingHdcpLevelResult {
+ android.hardware.security.see.hdcp.IHdcpAuthControl.PendingHdcpLevelResult.Status status;
+ android.hardware.drm.HdcpLevel level;
+ enum Status {
+ NONE,
+ PENDING,
+ }
+ }
}
diff --git a/security/see/hdcp/aidl/android/hardware/security/see/hdcp/IHdcpAuthControl.aidl b/security/see/hdcp/aidl/android/hardware/security/see/hdcp/IHdcpAuthControl.aidl
new file mode 100644
index 0000000..b9a1fe5
--- /dev/null
+++ b/security/see/hdcp/aidl/android/hardware/security/see/hdcp/IHdcpAuthControl.aidl
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2024 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.security.see.hdcp;
+
+/**
+ * IHdcpAuthControl is used by the OEMCrypto Trusted Application to interact
+ * with a HDCP Encryption Trusted Application in order to control the
+ * HDCP Authentication Levels.
+ */
+@VintfStability
+interface IHdcpAuthControl {
+ /*
+ * Service error codes. Will be returned as service specific errors.
+ */
+ parcelable HalErrorCode {
+ /* Success */
+ const int NO_ERROR = 0;
+
+ /* Generic error */
+ const int GENERIC_ERROR = -1;
+
+ /* Desired operation cannot be performed because of the server current state */
+ const int BAD_STATE = -2;
+
+ /* Operation or parameters are not supported by the server */
+ const int UNSUPPORTED = -3;
+
+ /* Error encountered when parsing parameters */
+ const int SERIALIZATION_ERROR = -4;
+
+ /* Server ran out of memory when performing operation */
+ const int ALLOCATION_ERROR = -5;
+
+ /* Bad parameter supplied for the desired operation */
+ const int BAD_PARAMETER = -7;
+
+ /* Caller is not authorized to make this call */
+ const int UNAUTHORIZED = -8;
+ }
+ /**
+ * Result returned from the getPendingHdcpLevelResult API.
+ */
+ parcelable PendingHdcpLevelResult {
+ enum Status {
+ /**
+ * No pending HdcpLevel request
+ */
+ NONE,
+ /**
+ * a HdcpLevel request is pending, its level is provided in the
+ * |level| attribute
+ */
+ PENDING,
+ }
+ Status status;
+ android.hardware.drm.HdcpLevel level;
+ }
+
+ /**
+ * Return the currently negotiated and max supported HDCP levels.
+ *
+ * The current level is based on the display(s) the device is connected to.
+ * If multiple HDCP-capable displays are simultaneously connected to
+ * separate interfaces, this method returns the lowest negotiated HDCP level
+ * of all interfaces.
+ *
+ * The maximum HDCP level is the highest level that can potentially be
+ * negotiated. It is a constant for any device, i.e. it does not depend on
+ * downstream receiving devices that could be connected. For example, if
+ * the device has HDCP 1.x keys and is capable of negotiating HDCP 1.x, but
+ * does not have HDCP 2.x keys, then the maximum HDCP capability would be
+ * reported as 1.x. If multiple HDCP-capable interfaces are present, it
+ * indicates the highest of the maximum HDCP levels of all interfaces.
+ *
+ * This method should only be used for informational purposes, not for
+ * enforcing compliance with HDCP requirements. Trusted enforcement of HDCP
+ * policies must be handled by the DRM system.
+ *
+ * @return HdcpLevels parcelable
+ */
+ android.hardware.drm.HdcpLevels getHdcpLevels();
+
+ /**
+ * Attempts to set the device's HDCP auth level to |level|.
+ *
+ * @param level: desired HDCP level
+ *
+ * @return:
+ * a service specific error based on <code>HalErrorCode</code>,
+ * specifically:
+ * + BAD_PARAMETER: when HDCP_UNKNOWN is requested
+ * + UNSUPPORTED: when |level| is greater than the MaxLevel supported
+ * + BAD_STATE: when the HDCP's service currentLevel is HDCP_NO_OUTPUT
+ *
+ */
+ void trySetHdcpLevel(in android.hardware.drm.HdcpLevel level);
+
+ /**
+ * Retrieve the pending level currently being processed by the HDCP service.
+ * The pending HDCP protection level might be higher than the level initially
+ * requested. This can occur when multiple applications or services are
+ * using HDCP concurrently, and a higher level is needed to satisfy
+ * all requirements.
+ *
+ * @return:
+ * PendingHdcpLevelResult on success, which contains a status
+ * and an optional level; on error a service specific error based on
+ * <code>HalErrorCode</code> otherwise.
+ *
+ */
+ PendingHdcpLevelResult getPendingHdcpLevel();
+}
diff --git a/security/see/hdcp/aidl/trusty/drm/rust/rules.mk b/security/see/hdcp/aidl/trusty/drm/rust/rules.mk
new file mode 100644
index 0000000..742b6ab
--- /dev/null
+++ b/security/see/hdcp/aidl/trusty/drm/rust/rules.mk
@@ -0,0 +1,39 @@
+# Copyright (C) 2024 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.
+#
+
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+MODULE := $(LOCAL_DIR)
+
+AIDL_DIR := hardware/interfaces/drm/aidl
+
+MODULE_AIDL_FLAGS := \
+ --stability=vintf \
+ --version=1 \
+
+MODULE_CRATE_NAME := android_hardware_drm
+
+MODULE_AIDL_LANGUAGE := rust
+
+MODULE_AIDL_PACKAGE := android/hardware/drm
+
+MODULE_AIDL_INCLUDES := \
+ -I $(AIDL_DIR) \
+
+MODULE_AIDLS := \
+ $(AIDL_DIR)/$(MODULE_AIDL_PACKAGE)/HdcpLevel.aidl \
+ $(AIDL_DIR)/$(MODULE_AIDL_PACKAGE)/HdcpLevels.aidl \
+
+include make/aidl.mk
diff --git a/security/see/hdcp/aidl/trusty/hdcp/rust/rules.mk b/security/see/hdcp/aidl/trusty/hdcp/rust/rules.mk
new file mode 100644
index 0000000..beab655
--- /dev/null
+++ b/security/see/hdcp/aidl/trusty/hdcp/rust/rules.mk
@@ -0,0 +1,47 @@
+# Copyright (C) 2024 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.
+#
+
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+MODULE := $(LOCAL_DIR)
+
+AIDL_DIR := hardware/interfaces/security/see/hdcp/aidl
+DRM_AIDL_DIR := hardware/interfaces/drm/aidl
+
+MODULE_AIDL_FLAGS := \
+ --mockall \
+ --version=1 \
+
+MODULE_CRATE_NAME := android_hardware_security_see_hdcp
+
+MODULE_AIDL_LANGUAGE := rust
+
+MODULE_AIDL_PACKAGE := android/hardware/security/see/hdcp
+
+MODULE_AIDL_INCLUDES := \
+ -I $(AIDL_DIR) \
+ -I $(DRM_AIDL_DIR) \
+
+MODULE_AIDLS := \
+ $(AIDL_DIR)/$(MODULE_AIDL_PACKAGE)/IHdcpAuthControl.aidl \
+
+MODULE_AIDL_RUST_DEPS := \
+ android_hardware_drm
+
+MODULE_LIBRARY_DEPS := \
+ hardware/interfaces/security/see/hdcp/aidl/trusty/drm/rust \
+ $(call FIND_CRATE,mockall) \
+
+include make/aidl.mk
diff --git a/security/see/hdcp/aidl/vts/Android.bp b/security/see/hdcp/aidl/vts/Android.bp
new file mode 100644
index 0000000..eadb9cd
--- /dev/null
+++ b/security/see/hdcp/aidl/vts/Android.bp
@@ -0,0 +1,36 @@
+// Copyright (C) 2024 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 {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["Android-Apache-2.0"],
+ default_team: "trendy_team_trusty",
+}
+
+rust_test {
+ name: "VtsAidlHdcpNonExistentTest",
+ srcs: ["src/host_test.rs"],
+ require_root: true,
+ test_suites: [
+ "general-tests",
+ "vts",
+ ],
+ rustlibs: [
+ "libbinder_rs",
+ ],
+}
diff --git a/security/see/hdcp/aidl/vts/src/host_test.rs b/security/see/hdcp/aidl/vts/src/host_test.rs
new file mode 100644
index 0000000..f64de20
--- /dev/null
+++ b/security/see/hdcp/aidl/vts/src/host_test.rs
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+//! Test for asserting the non-existence of an IHdcpAuthControl.aidl
+
+#![cfg(test)]
+
+use binder;
+
+const HDCP_INTERFACE_NAME: &str = "android.hardware.security.see.hdcp.IHdcpAuthControl";
+
+#[test]
+fn test_hdcp_auth_control_non_existence() {
+ let hdcp_instances = match binder::get_declared_instances(HDCP_INTERFACE_NAME) {
+ Ok(vec) => vec,
+ Err(e) => {
+ panic!("failed to retrieve the declared interfaces for HdcpAuthControl: {:?}", e);
+ }
+ };
+ assert!(hdcp_instances.is_empty());
+}
diff --git a/sensors/aidl/Android.bp b/sensors/aidl/Android.bp
index 8877e6e..63ace90 100644
--- a/sensors/aidl/Android.bp
+++ b/sensors/aidl/Android.bp
@@ -43,6 +43,6 @@
},
],
- frozen: true,
+ frozen: false,
}
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl
index 5184723..a35b54c 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl
@@ -54,23 +54,23 @@
enum AdditionalInfoType {
AINFO_BEGIN = 0,
AINFO_END = 1,
- AINFO_UNTRACKED_DELAY = 65536,
- AINFO_INTERNAL_TEMPERATURE = 65537,
- AINFO_VEC3_CALIBRATION = 65538,
- AINFO_SENSOR_PLACEMENT = 65539,
- AINFO_SAMPLING = 65540,
- AINFO_CHANNEL_NOISE = 131072,
- AINFO_CHANNEL_SAMPLER = 131073,
- AINFO_CHANNEL_FILTER = 131074,
- AINFO_CHANNEL_LINEAR_TRANSFORM = 131075,
- AINFO_CHANNEL_NONLINEAR_MAP = 131076,
- AINFO_CHANNEL_RESAMPLER = 131077,
- AINFO_LOCAL_GEOMAGNETIC_FIELD = 196608,
- AINFO_LOCAL_GRAVITY = 196609,
- AINFO_DOCK_STATE = 196610,
- AINFO_HIGH_PERFORMANCE_MODE = 196611,
- AINFO_MAGNETIC_FIELD_CALIBRATION = 196612,
- AINFO_CUSTOM_START = 268435456,
- AINFO_DEBUGGING_START = 1073741824,
+ AINFO_UNTRACKED_DELAY = 0x10000,
+ AINFO_INTERNAL_TEMPERATURE,
+ AINFO_VEC3_CALIBRATION,
+ AINFO_SENSOR_PLACEMENT,
+ AINFO_SAMPLING,
+ AINFO_CHANNEL_NOISE = 0x20000,
+ AINFO_CHANNEL_SAMPLER,
+ AINFO_CHANNEL_FILTER,
+ AINFO_CHANNEL_LINEAR_TRANSFORM,
+ AINFO_CHANNEL_NONLINEAR_MAP,
+ AINFO_CHANNEL_RESAMPLER,
+ AINFO_LOCAL_GEOMAGNETIC_FIELD = 0x30000,
+ AINFO_LOCAL_GRAVITY,
+ AINFO_DOCK_STATE,
+ AINFO_HIGH_PERFORMANCE_MODE,
+ AINFO_MAGNETIC_FIELD_CALIBRATION,
+ AINFO_CUSTOM_START = 0x10000000,
+ AINFO_DEBUGGING_START = 0x40000000,
}
}
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl
index b26040b..0566a64 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl
@@ -44,28 +44,28 @@
int registerDirectChannel(in android.hardware.sensors.ISensors.SharedMemInfo mem);
void setOperationMode(in android.hardware.sensors.ISensors.OperationMode mode);
void unregisterDirectChannel(in int channelHandle);
- const int ERROR_NO_MEMORY = -12;
- const int ERROR_BAD_VALUE = -22;
+ const int ERROR_NO_MEMORY = (-12) /* -12 */;
+ const int ERROR_BAD_VALUE = (-22) /* -22 */;
const int WAKE_LOCK_TIMEOUT_SECONDS = 1;
- const int EVENT_QUEUE_FLAG_BITS_READ_AND_PROCESS = 1;
- const int EVENT_QUEUE_FLAG_BITS_EVENTS_READ = 2;
- const int WAKE_LOCK_QUEUE_FLAG_BITS_DATA_WRITTEN = 1;
- const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_FIELD = 0;
- const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_REPORT_TOKEN = 4;
- const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_SENSOR_TYPE = 8;
- const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_ATOMIC_COUNTER = 12;
- const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_TIMESTAMP = 16;
- const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_DATA = 24;
- const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_RESERVED = 88;
+ const int EVENT_QUEUE_FLAG_BITS_READ_AND_PROCESS = (1 << 0) /* 1 */;
+ const int EVENT_QUEUE_FLAG_BITS_EVENTS_READ = (1 << 1) /* 2 */;
+ const int WAKE_LOCK_QUEUE_FLAG_BITS_DATA_WRITTEN = (1 << 0) /* 1 */;
+ const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_FIELD = 0x0;
+ const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_REPORT_TOKEN = 0x4;
+ const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_SENSOR_TYPE = 0x8;
+ const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_ATOMIC_COUNTER = 0xC;
+ const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_TIMESTAMP = 0x10;
+ const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_DATA = 0x18;
+ const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_RESERVED = 0x58;
const int DIRECT_REPORT_SENSOR_EVENT_TOTAL_LENGTH = 104;
- const int RUNTIME_SENSORS_HANDLE_BASE = 1593835520;
- const int RUNTIME_SENSORS_HANDLE_END = 1610612735;
+ const int RUNTIME_SENSORS_HANDLE_BASE = 0x5F000000;
+ const int RUNTIME_SENSORS_HANDLE_END = 0x5FFFFFFF;
@Backing(type="int") @VintfStability
enum RateLevel {
- STOP = 0,
- NORMAL = 1,
- FAST = 2,
- VERY_FAST = 3,
+ STOP,
+ NORMAL,
+ FAST,
+ VERY_FAST,
}
@Backing(type="int") @VintfStability
enum OperationMode {
@@ -85,7 +85,7 @@
@Backing(type="int") @VintfStability
enum SharedMemType {
ASHMEM = 1,
- GRALLOC = 2,
+ GRALLOC,
}
}
}
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl
index 996be3d..677e6c4 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl
@@ -54,14 +54,14 @@
const int SENSOR_FLAG_BITS_ON_CHANGE_MODE = 2;
const int SENSOR_FLAG_BITS_ONE_SHOT_MODE = 4;
const int SENSOR_FLAG_BITS_SPECIAL_REPORTING_MODE = 6;
- const int SENSOR_FLAG_BITS_DATA_INJECTION = 16;
- const int SENSOR_FLAG_BITS_DYNAMIC_SENSOR = 32;
- const int SENSOR_FLAG_BITS_ADDITIONAL_INFO = 64;
- const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_ASHMEM = 1024;
- const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_GRALLOC = 2048;
- const int SENSOR_FLAG_BITS_MASK_REPORTING_MODE = 14;
- const int SENSOR_FLAG_BITS_MASK_DIRECT_REPORT = 896;
- const int SENSOR_FLAG_BITS_MASK_DIRECT_CHANNEL = 3072;
+ const int SENSOR_FLAG_BITS_DATA_INJECTION = 0x10;
+ const int SENSOR_FLAG_BITS_DYNAMIC_SENSOR = 0x20;
+ const int SENSOR_FLAG_BITS_ADDITIONAL_INFO = 0x40;
+ const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_ASHMEM = 0x400;
+ const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_GRALLOC = 0x800;
+ const int SENSOR_FLAG_BITS_MASK_REPORTING_MODE = 0xE;
+ const int SENSOR_FLAG_BITS_MASK_DIRECT_REPORT = 0x380;
+ const int SENSOR_FLAG_BITS_MASK_DIRECT_CHANNEL = 0xC00;
const int SENSOR_FLAG_SHIFT_REPORTING_MODE = 1;
const int SENSOR_FLAG_SHIFT_DATA_INJECTION = 4;
const int SENSOR_FLAG_SHIFT_DYNAMIC_SENSOR = 5;
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl
index 4521710..f401dac 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl
@@ -34,7 +34,7 @@
package android.hardware.sensors;
@Backing(type="byte") @VintfStability
enum SensorStatus {
- NO_CONTACT = -1,
+ NO_CONTACT = (-1) /* -1 */,
UNRELIABLE = 0,
ACCURACY_LOW = 1,
ACCURACY_MEDIUM = 2,
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl
index 8c864e9..9332c63 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl
@@ -76,5 +76,6 @@
ACCELEROMETER_LIMITED_AXES_UNCALIBRATED = 40,
GYROSCOPE_LIMITED_AXES_UNCALIBRATED = 41,
HEADING = 42,
- DEVICE_PRIVATE_BASE = 65536,
+ MOISTURE_INTRUSION = 43,
+ DEVICE_PRIVATE_BASE = 0x10000,
}
diff --git a/sensors/aidl/android/hardware/sensors/Event.aidl b/sensors/aidl/android/hardware/sensors/Event.aidl
index b95299c..7775cfc 100644
--- a/sensors/aidl/android/hardware/sensors/Event.aidl
+++ b/sensors/aidl/android/hardware/sensors/Event.aidl
@@ -88,7 +88,7 @@
* SensorType::GLANCE_GESTURE, SensorType::PICK_UP_GESTURE,
* SensorType::WRIST_TILT_GESTURE, SensorType::STATIONARY_DETECT,
* SensorType::MOTION_DETECT, SensorType::HEART_BEAT,
- * SensorType::LOW_LATENCY_OFFBODY_DETECT
+ * SensorType::LOW_LATENCY_OFFBODY_DETECT, SensorType::MOISTURE_INTRUSION
*/
float scalar;
diff --git a/sensors/aidl/android/hardware/sensors/SensorType.aidl b/sensors/aidl/android/hardware/sensors/SensorType.aidl
index 4904c3f..adaf8e6 100644
--- a/sensors/aidl/android/hardware/sensors/SensorType.aidl
+++ b/sensors/aidl/android/hardware/sensors/SensorType.aidl
@@ -718,6 +718,20 @@
HEADING = 42,
/**
+ * MOISTURE_INTRUSION
+ * trigger mode: on-change
+ *
+ * Detects moisture intrusion in the chassis of device. This detection is
+ * one-way and persistent. Once a device is detected to have water damage,
+ * it will always report 1 (across factory reset /reboot) even if moisture
+ * is no longer present, until the device has been repaired.
+ * The only allowed values to return are:
+ * 0.0: no moisture intrusion detected in relevant history
+ * 1.0: moisture intrusion detected now or previously
+ */
+ MOISTURE_INTRUSION = 43,
+
+ /**
* Base of the range reserved for device manufacturers' private sensor
* types. These sensor types aren't documented in the SDK.
*/
diff --git a/sensors/aidl/convert/Android.bp b/sensors/aidl/convert/Android.bp
index 7217b2f..548308e 100644
--- a/sensors/aidl/convert/Android.bp
+++ b/sensors/aidl/convert/Android.bp
@@ -36,7 +36,7 @@
"libhardware",
"libbase",
"libutils",
- "android.hardware.sensors-V2-ndk",
+ "android.hardware.sensors-V3-ndk",
],
whole_static_libs: [
"sensors_common_convert",
diff --git a/sensors/aidl/default/Android.bp b/sensors/aidl/default/Android.bp
index 6f011ee..4bdcfb0 100644
--- a/sensors/aidl/default/Android.bp
+++ b/sensors/aidl/default/Android.bp
@@ -32,7 +32,7 @@
"libfmq",
"libpower",
"libbinder_ndk",
- "android.hardware.sensors-V2-ndk",
+ "android.hardware.sensors-V3-ndk",
],
export_include_dirs: ["include"],
srcs: [
@@ -58,7 +58,7 @@
static_libs: [
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
- "android.hardware.sensors-V2-ndk",
+ "android.hardware.sensors-V3-ndk",
"android.system.suspend-V1-ndk",
"libbase",
"libcutils",
diff --git a/sensors/aidl/default/multihal/Android.bp b/sensors/aidl/default/multihal/Android.bp
index 7482ffe..6ca81d9 100644
--- a/sensors/aidl/default/multihal/Android.bp
+++ b/sensors/aidl/default/multihal/Android.bp
@@ -39,7 +39,7 @@
"android.hardware.sensors@1.0",
"android.hardware.sensors@2.0",
"android.hardware.sensors@2.1",
- "android.hardware.sensors-V2-ndk",
+ "android.hardware.sensors-V3-ndk",
],
export_include_dirs: ["include"],
srcs: [
diff --git a/sensors/aidl/default/sensors-default.xml b/sensors/aidl/default/sensors-default.xml
index 36b28ed..bed2538 100644
--- a/sensors/aidl/default/sensors-default.xml
+++ b/sensors/aidl/default/sensors-default.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.sensors</name>
- <version>2</version>
+ <version>3</version>
<fqname>ISensors/default</fqname>
</hal>
</manifest>
diff --git a/sensors/aidl/multihal/Android.bp b/sensors/aidl/multihal/Android.bp
index cac5fc2..cee3db6 100644
--- a/sensors/aidl/multihal/Android.bp
+++ b/sensors/aidl/multihal/Android.bp
@@ -41,7 +41,7 @@
"android.hardware.sensors@2.0-ScopedWakelock",
"android.hardware.sensors@2.0",
"android.hardware.sensors@2.1",
- "android.hardware.sensors-V2-ndk",
+ "android.hardware.sensors-V3-ndk",
"libbase",
"libcutils",
"libfmq",
diff --git a/sensors/aidl/multihal/android.hardware.sensors-multihal.xml b/sensors/aidl/multihal/android.hardware.sensors-multihal.xml
index 5da4fbd..9186f64 100644
--- a/sensors/aidl/multihal/android.hardware.sensors-multihal.xml
+++ b/sensors/aidl/multihal/android.hardware.sensors-multihal.xml
@@ -17,7 +17,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.sensors</name>
- <version>2</version>
+ <version>3</version>
<fqname>ISensors/default</fqname>
</hal>
</manifest>
diff --git a/sensors/aidl/vts/Android.bp b/sensors/aidl/vts/Android.bp
index 1f96bb4..63371cd 100644
--- a/sensors/aidl/vts/Android.bp
+++ b/sensors/aidl/vts/Android.bp
@@ -42,7 +42,7 @@
"android.hardware.common.fmq-V1-ndk",
],
static_libs: [
- "android.hardware.sensors-V2-ndk",
+ "android.hardware.sensors-V3-ndk",
"VtsHalSensorsTargetTestUtils",
"libaidlcommonsupport",
],
diff --git a/thermal/aidl/android/hardware/thermal/IThermal.aidl b/thermal/aidl/android/hardware/thermal/IThermal.aidl
index 87f7637..7c0ee24 100644
--- a/thermal/aidl/android/hardware/thermal/IThermal.aidl
+++ b/thermal/aidl/android/hardware/thermal/IThermal.aidl
@@ -227,12 +227,12 @@
void unregisterCoolingDeviceChangedCallback(in ICoolingDeviceChangedCallback callback);
/**
- * Retrieves the forecasted skin temperature in Celsius.
+ * Retrieves the forecasted {@link TemperatureType#SKIN} type temperature in Celsius.
*
* @param forecastSeconds the number of seconds to forecast the skin temperature, it should
- * at least support superset of [0, 60] seconds range.
+ * support any value from a superset of range [0, 60] seconds.
*
- * @return forecasted skin temperature in Celsius.
+ * @return forecasted skin temperature in Celsius unit at the forecasted seconds in future.
*
* @throws EX_ILLEGAL_STATE If the Thermal HAL is not initialized successfully
* @throws EX_ILLEGAL_ARGUMENT If the provided forecastSeconds is negative
diff --git a/thermal/aidl/android/hardware/thermal/IThermalChangedCallback.aidl b/thermal/aidl/android/hardware/thermal/IThermalChangedCallback.aidl
index 1ff4b7a..b40b7c2 100644
--- a/thermal/aidl/android/hardware/thermal/IThermalChangedCallback.aidl
+++ b/thermal/aidl/android/hardware/thermal/IThermalChangedCallback.aidl
@@ -26,8 +26,7 @@
@VintfStability
interface IThermalChangedCallback {
/**
- * Send a thermal throttling event to all Thermal HAL
- * thermal event listeners.
+ * Send a thermal throttling event to all Thermal HAL thermal event listeners.
*
* @param temperature The temperature associated with the
* throttling event.
@@ -35,8 +34,14 @@
oneway void notifyThrottling(in Temperature temperature);
/**
- * Send a thermal threshold change event to all Thermal HAL
- * thermal event listeners.
+ * Send a thermal threshold change event to all Thermal HAL thermal event listeners.
+ *
+ * Some devices may change the thresholds based on hardware state or app workload changes.
+ * While this is generally not recommended, it should be used with caution at low frequency
+ * especially for the {@link TemperatureType#SKIN} type temperature thresholds. Since such
+ * a skin type callback to system may trigger notifications to apps that have preivously
+ * registered thermal headroom listeners with a new set of headroom and thresholds in case
+ * any of them changed.
*
* @param threshold The temperature threshold that changed.
*/
diff --git a/thermal/aidl/default/Thermal.cpp b/thermal/aidl/default/Thermal.cpp
index 339e9b8..04efbd6 100644
--- a/thermal/aidl/default/Thermal.cpp
+++ b/thermal/aidl/default/Thermal.cpp
@@ -47,27 +47,85 @@
return ScopedAStatus::ok();
}
-ScopedAStatus Thermal::getTemperatures(std::vector<Temperature>* /* out_temperatures */) {
+ScopedAStatus Thermal::getTemperatures(std::vector<Temperature>* out_temperatures) {
LOG(VERBOSE) << __func__;
+ std::vector<Temperature> temperatures;
+ temperatures.push_back(Temperature{
+ .name = "skin",
+ .type = TemperatureType::SKIN,
+ .value = 30.1f,
+ });
+ temperatures.push_back(Temperature{
+ .name = "battery",
+ .type = TemperatureType::BATTERY,
+ .value = 30.2f,
+ });
+ *out_temperatures = temperatures;
return ScopedAStatus::ok();
}
ScopedAStatus Thermal::getTemperaturesWithType(TemperatureType in_type,
- std::vector<Temperature>* /* out_temperatures */) {
+ std::vector<Temperature>* out_temperatures) {
LOG(VERBOSE) << __func__ << " TemperatureType: " << static_cast<int32_t>(in_type);
+ if (in_type == TemperatureType::SKIN) {
+ std::vector<Temperature> temperatures;
+ temperatures.push_back(Temperature{
+ .name = "skin",
+ .type = TemperatureType::SKIN,
+ .value = 30.1f,
+ });
+ *out_temperatures = temperatures;
+ } else if (in_type == TemperatureType::BATTERY) {
+ std::vector<Temperature> temperatures;
+ temperatures.push_back(Temperature{
+ .name = "battery",
+ .type = TemperatureType::BATTERY,
+ .value = 30.2f,
+ });
+ *out_temperatures = temperatures;
+ }
return ScopedAStatus::ok();
}
ScopedAStatus Thermal::getTemperatureThresholds(
- std::vector<TemperatureThreshold>* /* out_temperatureThresholds */) {
+ std::vector<TemperatureThreshold>* out_temperatureThresholds) {
LOG(VERBOSE) << __func__;
+ std::vector<TemperatureThreshold> temperatureThresholds;
+ temperatureThresholds.push_back(TemperatureThreshold{
+ .name = "skin",
+ .type = TemperatureType::SKIN,
+ .hotThrottlingThresholds = {30.0f, 31.0f, 32.0f, 33.0f, 34.0f, 35.0f, 36.0f},
+ });
+ temperatureThresholds.push_back(TemperatureThreshold{
+ .name = "battery",
+ .type = TemperatureType::BATTERY,
+ .hotThrottlingThresholds = {30.0f, 31.0f, 32.0f, 33.0f, 34.0f, 35.0f, 36.0f},
+ });
+ *out_temperatureThresholds = temperatureThresholds;
return ScopedAStatus::ok();
}
ScopedAStatus Thermal::getTemperatureThresholdsWithType(
TemperatureType in_type,
- std::vector<TemperatureThreshold>* /* out_temperatureThresholds */) {
+ std::vector<TemperatureThreshold>* out_temperatureThresholds) {
LOG(VERBOSE) << __func__ << " TemperatureType: " << static_cast<int32_t>(in_type);
+ if (in_type == TemperatureType::SKIN) {
+ std::vector<TemperatureThreshold> temperatureThresholds;
+ temperatureThresholds.push_back(TemperatureThreshold{
+ .name = "skin",
+ .type = TemperatureType::SKIN,
+ .hotThrottlingThresholds = {30.0f, 31.0f, 32.0f, 33.0f, 34.0f, 35.0f, 36.0f},
+ });
+ *out_temperatureThresholds = temperatureThresholds;
+ } else if (in_type == TemperatureType::BATTERY) {
+ std::vector<TemperatureThreshold> temperatureThresholds;
+ temperatureThresholds.push_back(TemperatureThreshold{
+ .name = "battery",
+ .type = TemperatureType::BATTERY,
+ .hotThrottlingThresholds = {30.0f, 31.0f, 32.0f, 33.0f, 34.0f, 35.0f, 36.0f},
+ });
+ *out_temperatureThresholds = temperatureThresholds;
+ }
return ScopedAStatus::ok();
}
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ColorRange.aidl
similarity index 82%
rename from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
rename to tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ColorRange.aidl
index 077652b..c08c6cc 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ColorRange.aidl
@@ -31,10 +31,10 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum ColorRange {
+ AUTO,
+ LIMITED,
+ FULL,
}
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ColorSpace.aidl
similarity index 82%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ColorSpace.aidl
index 077652b..9bcddcb 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ColorSpace.aidl
@@ -31,10 +31,14 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum ColorSpace {
+ AUTO,
+ S_RGB_BT_709,
+ DCI,
+ ADOBE_RGB,
+ BT2020,
+ ON,
+ OFF,
}
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/Gamma.aidl
similarity index 81%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/Gamma.aidl
index 077652b..89bb808 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/Gamma.aidl
@@ -31,10 +31,10 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum Gamma {
+ DARK,
+ MIDDLE,
+ BRIGHT,
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
index 006abee..b569baa 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -49,12 +49,12 @@
void setAutoAqEnabled(boolean enable);
android.hardware.tv.mediaquality.IPictureProfileChangedListener getPictureProfileListener();
void setPictureProfileAdjustmentListener(android.hardware.tv.mediaquality.IPictureProfileAdjustmentListener listener);
- android.hardware.tv.mediaquality.PictureParameters getPictureParameters(long pictureProfileId);
void sendDefaultPictureParameters(in android.hardware.tv.mediaquality.PictureParameters pictureParameters);
android.hardware.tv.mediaquality.ISoundProfileChangedListener getSoundProfileListener();
void setSoundProfileAdjustmentListener(android.hardware.tv.mediaquality.ISoundProfileAdjustmentListener listener);
- android.hardware.tv.mediaquality.SoundParameters getSoundParameters(long soundProfileId);
void sendDefaultSoundParameters(in android.hardware.tv.mediaquality.SoundParameters soundParameters);
void getParamCaps(in android.hardware.tv.mediaquality.ParameterName[] paramNames, out android.hardware.tv.mediaquality.ParamCapability[] caps);
void getVendorParamCaps(in android.hardware.tv.mediaquality.VendorParameterIdentifier[] names, out android.hardware.tv.mediaquality.VendorParamCapability[] caps);
+ void sendPictureParameters(in android.hardware.tv.mediaquality.PictureParameters pictureParameters);
+ void sendSoundParameters(in android.hardware.tv.mediaquality.SoundParameters soundParameters);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 6339377..e1a882e 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -37,4 +37,5 @@
oneway void onPictureProfileAdjusted(in android.hardware.tv.mediaquality.PictureProfile pictureProfile);
oneway void onParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
oneway void onVendorParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
+ oneway void onRequestPictureParameters(long pictureProfileId);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index 1006349..e162601 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -37,4 +37,5 @@
oneway void onSoundProfileAdjusted(in android.hardware.tv.mediaquality.SoundProfile soundProfile);
oneway void onParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
oneway void onVendorParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
+ oneway void onRequestSoundParameters(long SoundProfileId);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
index ae396ad..c38e96f 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -60,4 +60,15 @@
boolean globeDimming;
boolean autoPictureQualityEnabled;
boolean autoSuperResolutionEnabled;
+ android.hardware.tv.mediaquality.ColorRange levelRange;
+ boolean gamutMapping;
+ boolean pcMode;
+ boolean lowLatency;
+ boolean vrr;
+ boolean cvrr;
+ android.hardware.tv.mediaquality.ColorRange hdmiRgbRange;
+ android.hardware.tv.mediaquality.ColorSpace colorSpace;
+ int panelInitMaxLuminceNits;
+ boolean panelInitMaxLuminceValid;
+ android.hardware.tv.mediaquality.Gamma gamma;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParamCapability.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParamCapability.aidl
index 9cf29a5..5f16de9 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParamCapability.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParamCapability.aidl
@@ -34,7 +34,7 @@
package android.hardware.tv.mediaquality;
@VintfStability
parcelable VendorParamCapability {
- ParcelableHolder name;
+ android.hardware.tv.mediaquality.VendorParameterIdentifier identifier;
boolean isSupported;
@nullable android.hardware.tv.mediaquality.ParameterDefaultValue defaultValue;
@nullable android.hardware.tv.mediaquality.ParameterRange range;
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ColorRange.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ColorRange.aidl
new file mode 100644
index 0000000..29f12ef
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ColorRange.aidl
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2024 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.tv.mediaquality;
+
+/**
+ * The range of color the TV can display.
+ */
+@VintfStability
+enum ColorRange {
+ AUTO,
+ LIMITED,
+ FULL,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ColorSpace.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ColorSpace.aidl
new file mode 100644
index 0000000..bd4511d
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ColorSpace.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2024 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.tv.mediaquality;
+
+/**
+ * Specific model used to define and represent colors numerically.
+ */
+@VintfStability
+enum ColorSpace {
+ AUTO,
+ S_RGB_BT_709,
+ DCI,
+ ADOBE_RGB,
+ BT2020,
+ ON,
+ OFF,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/Gamma.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/Gamma.aidl
new file mode 100644
index 0000000..c633557
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/Gamma.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 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.tv.mediaquality;
+
+@VintfStability
+enum Gamma {
+ DARK,
+ MIDDLE,
+ BRIGHT,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
index 6a992a1..373a977 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -149,19 +149,18 @@
/**
* Sets the listener for picture adjustment from the HAL.
*
- * @param IPictureProfileAdjustmentListener listener object to pass picture profile.
+ * When the same client registers this listener multiple times, only the most recent
+ * registration will be active. The previous listener will be overwritten.
+ *
+ * When different client registers this listener, it will overwrite the previous registered
+ * client. Only one listener can be active.
+ *
+ * @param IPictureProfileAdjustmentListener listener object to pass picture profile, profile
+ * id and hardware capability.
*/
void setPictureProfileAdjustmentListener(IPictureProfileAdjustmentListener listener);
/**
- * Get the picture parameters by PictureProfile id. Check PictureParameters for its' detail.
- *
- * @param pictureProfileId The PictureProfile id that associate with the PictureProfile.
- * @return PictureParameters with all the pre-defined parameters and vendor defined parameters.
- */
- PictureParameters getPictureParameters(long pictureProfileId);
-
- /**
* Send the default picture parameters to the vendor code or HAL to apply the picture
* parameters.
*
@@ -180,19 +179,18 @@
/**
* Sets the listener for sound adjustment from the HAL.
*
- * @param ISoundProfileAdjustmentListener listener object to pass sound profile.
+ * When the same client registers this listener multiple times, only the most recent
+ * registration will be active. The previous listener will be overwritten.
+ *
+ * When different client registers this listener, it will overwrite the previous registered
+ * client. Only one listener can be active.
+ *
+ * @param ISoundProfileAdjustmentListener listener object to pass sound profile, profile id
+ * and hardware capability.
*/
void setSoundProfileAdjustmentListener(ISoundProfileAdjustmentListener listener);
/**
- * Get the sound parameters by SoundProfile id. Check SoundParameters for its' detail.
- *
- * @param soundProfileId The SoundProfile id that associate with a SoundProfile.
- * @return SoundParameters with all the pre-defined parameters and vendor defined parameters.
- */
- SoundParameters getSoundParameters(long soundProfileId);
-
- /**
* Send the default sound parameters to the vendor code or HAL to apply the sound parameters.
*
* @param soundParameters SoundParameters with pre-defined parameters and vendor defined
@@ -209,4 +207,20 @@
* Gets vendor capability information of the given parameters.
*/
void getVendorParamCaps(in VendorParameterIdentifier[] names, out VendorParamCapability[] caps);
+
+ /**
+ * When HAL request picture parameters by picture profile id, the framework will use this to
+ * send the picture parameters associate with the profile id.
+ *
+ * @param pictureParameters pictureParameters that associate with the profile id HAL provided.
+ */
+ void sendPictureParameters(in PictureParameters pictureParameters);
+
+ /**
+ * When HAL request sound parameters by sound profile id, the framework will use this to
+ * send the sound parameters associate with the profile id.
+ *
+ * @param soundParameters soundParameters that associate with the profile id HAL provided.
+ */
+ void sendSoundParameters(in SoundParameters soundParameters);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 806d90d..06651e4 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -39,11 +39,25 @@
void onParamCapabilityChanged(long pictureProfileId, in ParamCapability[] caps);
/**
- * Notifies Media Quality Manager when venfor parameter capabilities changed.
+ * Notifies Media Quality Manager when vendor parameter capabilities changed.
+ *
+ * <p>This should be also called when the listener is registered to let the client know
+ * what vendor parameters are supported.
*
* @param pictureProfileId the ID of the profile used by the media content. -1 if there
* is no associated profile.
* @param caps the updated vendor capabilities.
*/
void onVendorParamCapabilityChanged(long pictureProfileId, in VendorParamCapability[] caps);
+
+ /**
+ * Request the picture parameters by picture profile id. Check PictureParameters for its detail.
+ * This is called from the HAL to media quality framework.
+ *
+ * The requested picture parameters will get from IMediaQuality::sendPictureParameters called
+ * by the framework.
+ *
+ * @param pictureProfileId The PictureProfile id that associate with the PictureProfile.
+ */
+ void onRequestPictureParameters(long pictureProfileId);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index 5ee9d86..2ab9c6c 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -39,11 +39,25 @@
void onParamCapabilityChanged(long soundProfileId, in ParamCapability[] caps);
/**
- * Notifies Media Quality Manager when venfor parameter capabilities changed.
+ * Notifies Media Quality Manager when vendor parameter capabilities changed.
+ *
+ * <p>This should be also called when the listener is registered to let the client know
+ * what vendor parameters are supported.
*
* @param soundProfileId the ID of the profile used by the media content. -1 if there
* is no associated profile.
* @param caps the updated vendor capabilities.
*/
void onVendorParamCapabilityChanged(long soundProfileId, in VendorParamCapability[] caps);
+
+ /**
+ * Request the sound parameters by sound profile id. Check SoundParameters for its detail.
+ * This is called from the HAL to media quality framework.
+ *
+ * The requested sound parameters will get from IMediaQuality::sendSoundParameters called
+ * by the framework.
+ *
+ * @param SoundProfileId The SoundProfile id that associate with the SoundProfile.
+ */
+ void onRequestSoundParameters(long SoundProfileId);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
index 922368d..b7f2a11 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -16,8 +16,12 @@
package android.hardware.tv.mediaquality;
+import android.hardware.tv.mediaquality.ColorRange;
+import android.hardware.tv.mediaquality.ColorSpace;
import android.hardware.tv.mediaquality.ColorTemperature;
+import android.hardware.tv.mediaquality.Gamma;
import android.hardware.tv.mediaquality.QualityLevel;
+
/**
* The parameters for Picture Profile.
*/
@@ -187,4 +191,66 @@
* image and uses its knowledge to invent the missing pixel, make the image look sharper.
*/
boolean autoSuperResolutionEnabled;
+
+ /**
+ * The color range of the content. This indicates the range of luminance values
+ * used in the video signal.
+ */
+ ColorRange levelRange;
+
+ /**
+ * Enable/disable gamut mapping. Gamut mapping is a process that adjusts
+ * the colors in the video signal to match the color gamut of the display.
+ */
+ boolean gamutMapping;
+
+ /**
+ * Enable/disable PC mode. PC mode is a display mode that is optimized for
+ * use with computers.
+ */
+ boolean pcMode;
+
+ /**
+ * Enable/disable low latency mode. Low latency mode reduces the delay
+ * between the video source and the display.
+ */
+ boolean lowLatency;
+
+ /**
+ * Enable/disable variable refresh rate (VRR) mode. VRR allows the display to
+ * dynamically adjust its refresh rate to match the frame rate of the video
+ * source, reducing screen tearing.
+ */
+ boolean vrr;
+
+ /**
+ * Enable/disable continuous variable refresh rate (CVRR) mode. CVRR is a type
+ * of VRR that allows for a wider range of refresh rates.
+ */
+ boolean cvrr;
+
+ /**
+ * The color range of the HDMI input. This indicates the range of luminance
+ * values used in the HDMI signal.
+ */
+ ColorRange hdmiRgbRange;
+
+ /**
+ * The color space of the content. This indicates the color gamut and
+ * transfer function used in the video signal.
+ */
+ ColorSpace colorSpace;
+
+ /**
+ * The initial maximum luminance of the panel, in nits.
+ */
+ int panelInitMaxLuminceNits;
+
+ /**
+ * Whether the initial maximum luminance value is valid.
+ */
+ boolean panelInitMaxLuminceValid;
+
+ /* The gamma curve used for the display. */
+ Gamma gamma;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParamCapability.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParamCapability.aidl
index 1d9476d..bdc0188 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParamCapability.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParamCapability.aidl
@@ -18,14 +18,15 @@
import android.hardware.tv.mediaquality.ParameterDefaultValue;
import android.hardware.tv.mediaquality.ParameterRange;
+import android.hardware.tv.mediaquality.VendorParameterIdentifier;
/**
* Capability of vendor parameters.
*/
@VintfStability
parcelable VendorParamCapability {
- /** Name of the parameter **/
- ParcelableHolder name;
+ /** Identifier of the parameter **/
+ VendorParameterIdentifier identifier;
/** true if this parameter is supported **/
boolean isSupported;
diff --git a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
index 35fb999..1946cec 100644
--- a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
+++ b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
@@ -24,16 +24,14 @@
IPictureProfileChangedListener::IPictureProfileChangedListener,
ParamCapability::ParamCapability,
ParameterName::ParameterName,
- PictureParameter::PictureParameter,
PictureParameters::PictureParameters,
ISoundProfileAdjustmentListener::ISoundProfileAdjustmentListener,
ISoundProfileChangedListener::ISoundProfileChangedListener,
- SoundParameter::SoundParameter,
SoundParameters::SoundParameters,
VendorParamCapability::VendorParamCapability,
VendorParameterIdentifier::VendorParameterIdentifier,
};
-use binder::{Interface, ParcelableHolder, Strong};
+use binder::{Interface, Strong};
use std::sync::{Arc, Mutex};
use std::thread;
@@ -224,25 +222,6 @@
Ok(())
}
- fn getPictureParameters(&self, id: i64) -> binder::Result<PictureParameters>{
- let picture_parameters = match id {
- 1 => {
- vec![
- PictureParameter::Brightness(0.5),
- PictureParameter::Contrast(50),
- ]
- },
- _ => vec![]
- };
-
- let picture_params = PictureParameters {
- pictureParameters: picture_parameters,
- vendorPictureParameters: ParcelableHolder::default(),
- };
-
- Ok(picture_params)
- }
-
fn sendDefaultPictureParameters(&self, _picture_parameters: &PictureParameters) -> binder::Result<()>{
println!("Received picture parameters");
Ok(())
@@ -264,25 +243,6 @@
Ok(())
}
- fn getSoundParameters(&self, id: i64) -> binder::Result<SoundParameters>{
- let sound_parameters = match id {
- 1 => {
- vec![
- SoundParameter::Balance(50),
- SoundParameter::Bass(50),
- ]
- },
- _ => vec![]
- };
-
- let sound_params = SoundParameters {
- soundParameters: sound_parameters,
- vendorSoundParameters: ParcelableHolder::default(),
- };
-
- Ok(sound_params)
- }
-
fn sendDefaultSoundParameters(&self, _sound_parameters: &SoundParameters) -> binder::Result<()>{
println!("Received sound parameters");
Ok(())
@@ -305,4 +265,14 @@
println!("getVendorParamCaps. len= {}", param_names.len());
Ok(())
}
+
+ fn sendPictureParameters(&self, _picture_parameters: &PictureParameters) -> binder::Result<()>{
+ println!("Received picture parameters");
+ Ok(())
+ }
+
+ fn sendSoundParameters(&self, _sound_parameters: &SoundParameters) -> binder::Result<()>{
+ println!("Received sound parameters");
+ Ok(())
+ }
}
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
index b508ed6..84f798b 100644
--- a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -23,8 +23,10 @@
#include <aidl/android/hardware/tv/mediaquality/BnPictureProfileAdjustmentListener.h>
#include <aidl/android/hardware/tv/mediaquality/BnSoundProfileAdjustmentListener.h>
#include <aidl/android/hardware/tv/mediaquality/IMediaQuality.h>
+#include <aidl/android/hardware/tv/mediaquality/PictureParameter.h>
#include <aidl/android/hardware/tv/mediaquality/PictureParameters.h>
#include <aidl/android/hardware/tv/mediaquality/PictureProfile.h>
+#include <aidl/android/hardware/tv/mediaquality/SoundParameter.h>
#include <aidl/android/hardware/tv/mediaquality/SoundParameters.h>
#include <aidl/android/hardware/tv/mediaquality/SoundProfile.h>
@@ -43,11 +45,14 @@
using aidl::android::hardware::tv::mediaquality::BnSoundProfileAdjustmentListener;
using aidl::android::hardware::tv::mediaquality::IMediaQuality;
using aidl::android::hardware::tv::mediaquality::ParamCapability;
+using aidl::android::hardware::tv::mediaquality::PictureParameter;
using aidl::android::hardware::tv::mediaquality::PictureParameters;
using aidl::android::hardware::tv::mediaquality::PictureProfile;
+using aidl::android::hardware::tv::mediaquality::SoundParameter;
using aidl::android::hardware::tv::mediaquality::SoundParameters;
using aidl::android::hardware::tv::mediaquality::SoundProfile;
using aidl::android::hardware::tv::mediaquality::VendorParamCapability;
+using aidl::android::hardware::tv::mediaquality::VendorParameterIdentifier;
using android::ProcessState;
using android::String16;
using ndk::ScopedAStatus;
@@ -90,6 +95,8 @@
return ScopedAStatus::ok();
}
+ ScopedAStatus onRequestPictureParameters(int64_t) { return ScopedAStatus::ok(); }
+
private:
std::function<void(const PictureProfile& pictureProfile)> on_hal_picture_profile_adjust_;
};
@@ -114,6 +121,8 @@
return ScopedAStatus::ok();
}
+ ScopedAStatus onRequestSoundParameters(int64_t) { return ScopedAStatus::ok(); }
+
private:
std::function<void(const SoundProfile& soundProfile)> on_hal_sound_profile_adjust_;
};
@@ -162,18 +171,20 @@
ASSERT_OK(mediaquality->setPictureProfileAdjustmentListener(listener));
}
-TEST_P(MediaQualityAidl, TestGetPictureParameters) {
- PictureParameters pictureParams;
- auto result = mediaquality->getPictureParameters(1, &pictureParams);
- ASSERT_TRUE(result.isOk());
- ASSERT_EQ(pictureParams.pictureParameters.size(), 2);
-}
-
TEST_P(MediaQualityAidl, TestSendDefaultPictureParameters) {
- PictureParameters pictureParams;
- auto result = mediaquality->getPictureParameters(1, &pictureParams);
- ASSERT_TRUE(result.isOk());
- ASSERT_OK(mediaquality->sendDefaultPictureParameters(pictureParams));
+ PictureParameters pictureParameters;
+ std::vector<PictureParameter> picParams;
+
+ PictureParameter brightnessParam;
+ brightnessParam.set<PictureParameter::Tag::brightness>(0.5f);
+ picParams.push_back(brightnessParam);
+
+ PictureParameter contrastParam;
+ contrastParam.set<PictureParameter::Tag::contrast>(50);
+ picParams.push_back(contrastParam);
+
+ pictureParameters.pictureParameters = picParams;
+ ASSERT_OK(mediaquality->sendDefaultPictureParameters(pictureParameters));
}
TEST_P(MediaQualityAidl, TestSetSoundProfileAdjustmentListener) {
@@ -183,18 +194,20 @@
ASSERT_OK(mediaquality->setSoundProfileAdjustmentListener(listener));
}
-TEST_P(MediaQualityAidl, TestGetSoundParameters) {
- SoundParameters soundParams;
- auto result = mediaquality->getSoundParameters(1, &soundParams);
- ASSERT_TRUE(result.isOk());
- ASSERT_EQ(soundParams.soundParameters.size(), 2);
-}
-
TEST_P(MediaQualityAidl, TestSendDefaultSoundParameters) {
- SoundParameters soundParams;
- auto result = mediaquality->getSoundParameters(1, &soundParams);
- ASSERT_TRUE(result.isOk());
- ASSERT_OK(mediaquality->sendDefaultSoundParameters(soundParams));
+ SoundParameters soundParameters;
+ std::vector<SoundParameter> soundParams;
+
+ SoundParameter balanceParam;
+ balanceParam.set<SoundParameter::Tag::balance>(50);
+ soundParams.push_back(balanceParam);
+
+ SoundParameter bassParam;
+ bassParam.set<SoundParameter::Tag::bass>(50);
+ soundParams.push_back(bassParam);
+
+ soundParameters.soundParameters = soundParams;
+ ASSERT_OK(mediaquality->sendDefaultSoundParameters(soundParameters));
}
TEST_P(MediaQualityAidl, TestSetAmbientBacklightDetector) {
diff --git a/virtualization/capabilities_service/aidl/Android.bp b/virtualization/capabilities_service/aidl/Android.bp
new file mode 100644
index 0000000..b0bbbdd
--- /dev/null
+++ b/virtualization/capabilities_service/aidl/Android.bp
@@ -0,0 +1,35 @@
+// Copyright (C) 2024 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 {
+ default_team: "trendy_team_virtualization",
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aidl_interface {
+ name: "android.hardware.virtualization.capabilities.capabilities_service",
+ vendor_available: true,
+ srcs: ["android/**/*.aidl"],
+ stability: "vintf",
+ backend: {
+ rust: {
+ enabled: true,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.virt",
+ ],
+ },
+ },
+ frozen: false,
+}
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl b/virtualization/capabilities_service/aidl/aidl_api/android.hardware.virtualization.capabilities.capabilities_service/current/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
similarity index 81%
copy from automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
copy to virtualization/capabilities_service/aidl/aidl_api/android.hardware.virtualization.capabilities.capabilities_service/current/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
index 077652b..68ff021 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/ValueRange.aidl
+++ b/virtualization/capabilities_service/aidl/aidl_api/android.hardware.virtualization.capabilities.capabilities_service/current/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
@@ -31,10 +31,8 @@
// 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;
-@JavaDerive(equals=true, toString=true) @RustDerive(Clone=true) @VintfStability
-parcelable ValueRange {
- @nullable android.hardware.automotive.vehicle.RawPropValues minValue;
- @nullable android.hardware.automotive.vehicle.RawPropValues maxValue;
- @nullable List<android.hardware.automotive.vehicle.RawPropValues> supportedValues;
+package android.hardware.virtualization.capabilities;
+@VintfStability
+interface IVmCapabilitiesService {
+ void grantAccessToVendorTeeServices(in ParcelFileDescriptor vmFd, in String[] vendorTeeServices);
}
diff --git a/virtualization/capabilities_service/aidl/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl b/virtualization/capabilities_service/aidl/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
new file mode 100644
index 0000000..0d09ecb
--- /dev/null
+++ b/virtualization/capabilities_service/aidl/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2024 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.virtualization.capabilities;
+
+/**
+ * Encapsulates vendor-specific capabilities that can be granted to VMs.
+ */
+@VintfStability
+interface IVmCapabilitiesService {
+ /**
+ * Grant access for the VM represented by the given vm_fd to the given vendor-owned tee
+ * services. The names in |vendorTeeServices| must match the ones defined in the
+ * tee_service_contexts files.
+ * TODO(ioffe): link to the integration doc for custom smc filtering feature once
+ * it's ready.
+ */
+ void grantAccessToVendorTeeServices(
+ in ParcelFileDescriptor vmFd, in String[] vendorTeeServices);
+}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
index 6482eac..565f33a 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
@@ -109,6 +109,7 @@
T2LM_NEGOTIATION = (1 << 8) /* 256 */,
SET_VOIP_MODE = (1 << 9) /* 512 */,
MLO_SAP = (1 << 10) /* 1024 */,
+ MULTIPLE_MLD_ON_SAP = (1 << 11) /* 2048 */,
}
@VintfStability
parcelable ChipConcurrencyCombinationLimit {
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
index 8c44330..9d982b8 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
@@ -72,4 +72,5 @@
oneway void notifyInitiateBootstrappingResponse(in char id, in android.hardware.wifi.NanStatus status, in int bootstrappingInstanceId);
oneway void notifyRespondToBootstrappingIndicationResponse(in char id, in android.hardware.wifi.NanStatus status);
oneway void notifyTerminatePairingResponse(in char id, in android.hardware.wifi.NanStatus status);
+ oneway void notifyRangingResults(in android.hardware.wifi.RttResult[] results, in byte discoverySessionId);
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
index a30893a..0722a04 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
@@ -54,4 +54,7 @@
boolean supportsPairing;
boolean supportsSetClusterId;
boolean supportsSuspension;
+ boolean supportsPeriodicRanging;
+ android.hardware.wifi.RttBw maxSupportedBandwidth;
+ int maxNumRxChainsSupported;
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
index 96d940a..58e62db 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
@@ -55,4 +55,7 @@
char distanceIngressCm;
char distanceEgressCm;
boolean enableSessionSuspendability;
+ int rttBurstSize;
+ android.hardware.wifi.RttPreamble preamble;
+ @nullable android.hardware.wifi.WifiChannelInfo channelInfo;
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanPublishRequest.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanPublishRequest.aidl
index bdc8357..90e9a8b 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanPublishRequest.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanPublishRequest.aidl
@@ -41,4 +41,5 @@
android.hardware.wifi.NanPairingConfig pairingConfig;
byte[16] identityKey;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
+ boolean rangingResultsRequired;
}
diff --git a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
index 78508cf..5a5e4a7 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
@@ -91,6 +91,14 @@
* Chip supports Wi-Fi 7 MLO SoftAp.
*/
MLO_SAP = 1 << 10,
+ /**
+ * Chip supports multiple Wi-Fi 7 multi-link devices (MLD) on SoftAp.
+ * When this feature flag is enabled, it is an indication that the chip can
+ * support Bridged-SoftAp in 11be with separate MLD MAC addresses.
+ * When this feature is disabled, then only one MLD address can be used in 11be mode
+ * (if supported), this includes use of MLO if MLO_SAP flag is set to True.
+ */
+ MULTIPLE_MLD_ON_SAP = 1 << 11,
}
/**
diff --git a/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl b/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
index 3649b7b..376dcac 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
@@ -29,6 +29,7 @@
import android.hardware.wifi.NanPairingRequestInd;
import android.hardware.wifi.NanStatus;
import android.hardware.wifi.NanSuspensionModeChangeInd;
+import android.hardware.wifi.RttResult;
/**
* NAN Response and Asynchronous Event Callbacks.
*
@@ -461,4 +462,12 @@
* |NanStatusCode.INVALID_PAIRING_ID|
*/
void notifyTerminatePairingResponse(in char id, in NanStatus status);
+
+ /**
+ * Callback is invoked when ranging results are available.
+ *
+ * @param results RttResult data.
+ * @param discoverySessionId Discovery session ID.
+ */
+ void notifyRangingResults(in RttResult[] results, in byte discoverySessionId);
}
diff --git a/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl b/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
index f581c5e..f9f825f 100644
--- a/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
@@ -16,6 +16,8 @@
package android.hardware.wifi;
+import android.hardware.wifi.RttBw;
+
/**
* NDP Capabilities response.
*/
@@ -103,4 +105,16 @@
* Flag to indicate if NAN suspension is supported.
*/
boolean supportsSuspension;
+ /**
+ * Flag to indicate if NAN periodic ranging is supported.
+ */
+ boolean supportsPeriodicRanging;
+ /**
+ * Maximum supported bandwidth.
+ */
+ RttBw maxSupportedBandwidth;
+ /**
+ * Maximum number of supported receive chains.
+ */
+ int maxNumRxChainsSupported;
}
diff --git a/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl b/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
index 4bedce0..725ed3c 100644
--- a/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
@@ -18,6 +18,8 @@
import android.hardware.wifi.NanDataPathSecurityConfig;
import android.hardware.wifi.NanMatchAlg;
+import android.hardware.wifi.RttPreamble;
+import android.hardware.wifi.WifiChannelInfo;
/**
* Configurations of NAN discovery sessions. Common to publish and subscribe discovery.
@@ -136,10 +138,14 @@
*/
boolean rangingRequired;
/**
- * Interval in ms between two ranging measurements. Only relevant if |rangingRequired| is true.
+ * Interval in ms between two ranging measurements. Only applies to periodic ranging and is
+ * only relevant if |rangingRequired| is true.
+ *
* If the Awake DW interval specified either in |discoveryWindowPeriod| or in
* |NanBandSpecificConfig.discoveryWindowIntervalVal| is larger than the ranging interval then
* priority is given to Awake DW interval.
+ *
+ * If this is set to 0, then only one ranging is performed.
*/
int rangingIntervalMs;
/**
@@ -162,4 +168,16 @@
* |NanCapabilities.supportsSuspension| is false.
*/
boolean enableSessionSuspendability;
+ /**
+ * The number of FTM packets used to estimate a range.
+ */
+ int rttBurstSize;
+ /**
+ * RTT preamble to be used in the RTT frames.
+ */
+ RttPreamble preamble;
+ /**
+ * Channel information.
+ */
+ @nullable WifiChannelInfo channelInfo;
}
diff --git a/wifi/aidl/android/hardware/wifi/NanPublishRequest.aidl b/wifi/aidl/android/hardware/wifi/NanPublishRequest.aidl
index ae75caf..09ea496 100644
--- a/wifi/aidl/android/hardware/wifi/NanPublishRequest.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanPublishRequest.aidl
@@ -61,4 +61,9 @@
* that no vendor data is provided.
*/
@nullable OuiKeyedData[] vendorData;
+ /**
+ * If |NanCapabilities.supportsPeriodicRanging| is true, then this field specifies whether the
+ * ranging results need to be notified to the Publisher when they are available.
+ */
+ boolean rangingResultsRequired;
}
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index bf6c206..75e9bfe 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -26,6 +26,9 @@
namespace aidl_struct_util {
WifiChannelWidthInMhz convertLegacyWifiChannelWidthToAidl(legacy_hal::wifi_channel_width type);
+bool convertAidlWifiChannelInfoToLegacy(const WifiChannelInfo& aidl_info,
+ legacy_hal::wifi_channel_info* legacy_info);
+RttBw convertLegacyRttBwToAidl(legacy_hal::wifi_rtt_bw type);
std::string safeConvertChar(const char* str, size_t max_len) {
const char* c = str;
@@ -1859,7 +1862,9 @@
legacy_request->ranging_auto_response = aidl_request.baseConfigs.rangingRequired
? legacy_hal::NAN_RANGING_AUTO_RESPONSE_ENABLE
: legacy_hal::NAN_RANGING_AUTO_RESPONSE_DISABLE;
- legacy_request->sdea_params.range_report = legacy_hal::NAN_DISABLE_RANGE_REPORT;
+ legacy_request->sdea_params.range_report = aidl_request.rangingResultsRequired
+ ? legacy_hal::NAN_ENABLE_RANGE_REPORT
+ : legacy_hal::NAN_DISABLE_RANGE_REPORT;
legacy_request->publish_type = convertAidlNanPublishTypeToLegacy(aidl_request.publishType);
legacy_request->tx_type = convertAidlNanTxTypeToLegacy(aidl_request.txType);
legacy_request->service_responder_policy = aidl_request.autoAcceptDataPathRequests
@@ -1988,6 +1993,17 @@
legacy_request->ranging_cfg.distance_ingress_mm =
aidl_request.baseConfigs.distanceIngressCm * 10;
legacy_request->ranging_cfg.distance_egress_mm = aidl_request.baseConfigs.distanceEgressCm * 10;
+ legacy_request->ranging_cfg.rtt_burst_size = aidl_request.baseConfigs.rttBurstSize;
+ legacy_request->ranging_cfg.preamble =
+ convertAidlRttPreambleToLegacy(aidl_request.baseConfigs.preamble);
+ if (aidl_request.baseConfigs.channelInfo.has_value()) {
+ if (!convertAidlWifiChannelInfoToLegacy(aidl_request.baseConfigs.channelInfo.value(),
+ &legacy_request->ranging_cfg.channel_info)) {
+ LOG(ERROR) << "convertAidlNanSubscribeRequestToLegacy: "
+ "Unable to convert aidl channel info to legacy";
+ return false;
+ }
+ }
legacy_request->ranging_auto_response = aidl_request.baseConfigs.rangingRequired
? legacy_hal::NAN_RANGING_AUTO_RESPONSE_ENABLE
: legacy_hal::NAN_RANGING_AUTO_RESPONSE_DISABLE;
@@ -2296,6 +2312,9 @@
aidl_response->supportsPairing = legacy_response.is_pairing_supported;
aidl_response->supportsSetClusterId = legacy_response.is_set_cluster_id_supported;
aidl_response->supportsSuspension = legacy_response.is_suspension_supported;
+ aidl_response->supportsPeriodicRanging = legacy_response.is_periodic_ranging_supported;
+ aidl_response->maxSupportedBandwidth = convertLegacyRttBwToAidl(legacy_response.supported_bw);
+ aidl_response->maxNumRxChainsSupported = legacy_response.num_rx_chains_supported;
return true;
}
diff --git a/wifi/aidl/default/aidl_struct_util.h b/wifi/aidl/default/aidl_struct_util.h
index 2574f95..9a3c535 100644
--- a/wifi/aidl/default/aidl_struct_util.h
+++ b/wifi/aidl/default/aidl_struct_util.h
@@ -231,6 +231,8 @@
TwtSession* aidl_twt_session);
bool convertLegacyHalTwtSessionStatsToAidl(legacy_hal::wifi_twt_session_stats twt_stats,
TwtSessionStats* aidl_twt_stats);
+legacy_hal::wifi_rtt_preamble convertAidlRttPreambleToLegacy(RttPreamble type);
+
} // namespace aidl_struct_util
} // namespace wifi
} // namespace hardware
diff --git a/wifi/aidl/default/tests/wifi_nan_iface_unit_tests.cpp b/wifi/aidl/default/tests/wifi_nan_iface_unit_tests.cpp
index d58a9b0..513f440 100644
--- a/wifi/aidl/default/tests/wifi_nan_iface_unit_tests.cpp
+++ b/wifi/aidl/default/tests/wifi_nan_iface_unit_tests.cpp
@@ -138,6 +138,7 @@
MOCK_METHOD2(notifyResumeResponse, ndk::ScopedAStatus(char16_t, const NanStatus&));
MOCK_METHOD2(notifyTerminatePairingResponse, ndk::ScopedAStatus(char16_t, const NanStatus&));
MOCK_METHOD1(eventSuspensionModeChanged, ndk::ScopedAStatus(const NanSuspensionModeChangeInd&));
+ MOCK_METHOD2(notifyRangingResults, ndk::ScopedAStatus(const std::vector<RttResult>&, int8_t));
};
class WifiNanIfaceTest : public Test {
diff --git a/wifi/aidl/default/wifi_legacy_hal.cpp b/wifi/aidl/default/wifi_legacy_hal.cpp
index bd92a20..8d69013 100644
--- a/wifi/aidl/default/wifi_legacy_hal.cpp
+++ b/wifi/aidl/default/wifi_legacy_hal.cpp
@@ -372,6 +372,16 @@
}
}
+std::function<void(wifi_rtt_result* rtt_results[], uint32_t num_results, uint16_t session_id)>
+ on_nan_event_ranging_results_callback;
+void onAsyncNanEventRangingResults(wifi_rtt_result* rtt_results[], uint32_t num_results,
+ uint16_t session_id) {
+ const auto lock = aidl_sync_util::acquireGlobalLock();
+ if (on_nan_event_ranging_results_callback && rtt_results) {
+ on_nan_event_ranging_results_callback(rtt_results, num_results, session_id);
+ }
+}
+
std::function<void(const NanPairingRequestInd&)> on_nan_event_pairing_request_user_callback;
void onAsyncNanEventPairingRequest(NanPairingRequestInd* event) {
const auto lock = aidl_sync_util::acquireGlobalLock();
@@ -1510,6 +1520,7 @@
on_nan_event_schedule_update_user_callback = user_callbacks.on_event_schedule_update;
on_nan_event_suspension_mode_change_user_callback =
user_callbacks.on_event_suspension_mode_change;
+ on_nan_event_ranging_results_callback = user_callbacks.on_ranging_results;
return global_func_table_.wifi_nan_register_handler(getIfaceHandle(iface_name),
{onAsyncNanNotifyResponse,
@@ -1534,7 +1545,8 @@
onAsyncNanEventPairingConfirm,
onAsyncNanEventBootstrappingRequest,
onAsyncNanEventBootstrappingConfirm,
- onAsyncNanEventSuspensionModeChange});
+ onAsyncNanEventSuspensionModeChange,
+ onAsyncNanEventRangingResults});
}
wifi_error WifiLegacyHal::nanEnableRequest(const std::string& iface_name, transaction_id id,
diff --git a/wifi/aidl/default/wifi_legacy_hal.h b/wifi/aidl/default/wifi_legacy_hal.h
index aa563cb..f603210 100644
--- a/wifi/aidl/default/wifi_legacy_hal.h
+++ b/wifi/aidl/default/wifi_legacy_hal.h
@@ -63,6 +63,7 @@
using ::NAN_DP_REQUEST_CHANNEL_SETUP;
using ::NAN_DP_REQUEST_REJECT;
using ::NAN_DP_RESPONDER_RESPONSE;
+using ::NAN_ENABLE_RANGE_REPORT;
using ::NAN_GET_CAPABILITIES;
using ::NAN_MATCH_ALG_MATCH_CONTINUOUS;
using ::NAN_MATCH_ALG_MATCH_NEVER;
@@ -488,6 +489,8 @@
std::function<void(const NanBootstrappingRequestInd&)> on_event_bootstrapping_request;
std::function<void(const NanBootstrappingConfirmInd&)> on_event_bootstrapping_confirm;
std::function<void(const NanSuspensionModeChangeInd&)> on_event_suspension_mode_change;
+ std::function<void(wifi_rtt_result* rtt_results[], uint32_t num_results, uint16_t session_id)>
+ on_ranging_results;
};
// Full scan results contain IE info and are hence passed by reference, to
diff --git a/wifi/aidl/default/wifi_nan_iface.cpp b/wifi/aidl/default/wifi_nan_iface.cpp
index 9d50798..950e647 100644
--- a/wifi/aidl/default/wifi_nan_iface.cpp
+++ b/wifi/aidl/default/wifi_nan_iface.cpp
@@ -613,7 +613,36 @@
}
}
};
+ callback_handlers.on_ranging_results = [weak_ptr_this](
+ legacy_hal::wifi_rtt_result* rtt_results[],
+ uint32_t num_results, uint16_t session_id) {
+ const auto shared_ptr_this = weak_ptr_this.lock();
+ if (!shared_ptr_this.get() || !shared_ptr_this->isValid()) {
+ LOG(ERROR) << "Callback invoked on an invalid object";
+ return;
+ }
+ if (shared_ptr_this->getMinCallbackVersion() < 3) {
+ LOG(INFO) << "notifyRangingResults requires callback version 3";
+ return;
+ }
+ std::vector<const wifi_rtt_result*> legacy_results;
+ std::copy_if(rtt_results, rtt_results + num_results, back_inserter(legacy_results),
+ [](wifi_rtt_result* rtt_result) { return rtt_result != nullptr; });
+
+ std::vector<RttResult> aidl_results;
+ if (!aidl_struct_util::convertLegacyVectorOfRttResultToAidl(legacy_results,
+ &aidl_results)) {
+ LOG(ERROR) << "Failed to convert RTT results to AIDL structs";
+ return;
+ }
+
+ for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
+ if (!callback->notifyRangingResults(aidl_results, session_id).isOk()) {
+ LOG(ERROR) << "Failed to invoke the callback";
+ }
+ }
+ };
legacy_hal::wifi_error legacy_status =
legacy_hal_.lock()->nanRegisterCallbackHandlers(ifname_, callback_handlers);
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
diff --git a/wifi/aidl/vts/functional/wifi_nan_iface_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_nan_iface_aidl_test.cpp
index bc169a4..d646162 100644
--- a/wifi/aidl/vts/functional/wifi_nan_iface_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_nan_iface_aidl_test.cpp
@@ -58,6 +58,7 @@
using aidl::android::hardware::wifi::NanStatusCode;
using aidl::android::hardware::wifi::NanSuspensionModeChangeInd;
using aidl::android::hardware::wifi::NanTxType;
+using aidl::android::hardware::wifi::RttResult;
#define TIMEOUT_PERIOD 10
@@ -106,6 +107,7 @@
NOTIFY_SUSPEND_RESPONSE,
NOTIFY_RESUME_RESPONSE,
NOTIFY_TERMINATE_PAIRING_RESPONSE,
+ NOTIFY_RANGING_RESULTS,
EVENT_CLUSTER_EVENT,
EVENT_DISABLED,
@@ -400,6 +402,12 @@
parent_.notify(NOTIFY_TERMINATE_PAIRING_RESPONSE);
return ndk::ScopedAStatus::ok();
}
+ ::ndk::ScopedAStatus notifyRangingResults(const std::vector<RttResult>& /* results */,
+ int8_t discoverySessionId) override {
+ parent_.session_id_ = discoverySessionId;
+ parent_.notify(NOTIFY_RANGING_RESULTS);
+ return ndk::ScopedAStatus::ok();
+ }
private:
WifiNanIfaceAidlTest& parent_;
diff --git a/wifi/legacy_headers/include/hardware_legacy/wifi_nan.h b/wifi/legacy_headers/include/hardware_legacy/wifi_nan.h
index 4e490d9..cd4e86d 100644
--- a/wifi/legacy_headers/include/hardware_legacy/wifi_nan.h
+++ b/wifi/legacy_headers/include/hardware_legacy/wifi_nan.h
@@ -19,6 +19,7 @@
#include <net/if.h>
#include <stdbool.h>
+#include "rtt.h"
#include "wifi_hal.h"
#ifdef __cplusplus
@@ -476,6 +477,9 @@
bool is_pairing_supported;
bool is_set_cluster_id_supported;
bool is_suspension_supported;
+ bool is_periodic_ranging_supported;
+ wifi_rtt_bw supported_bw;
+ u8 num_rx_chains_supported;
} NanCapabilities;
/*
@@ -746,6 +750,12 @@
u32 distance_ingress_mm;
/* Egress distance in millmilliimeters (optional) */
u32 distance_egress_mm;
+ /* Number of FTM frames per burst */
+ u32 rtt_burst_size;
+ /* RTT Measurement Preamble */
+ wifi_rtt_preamble preamble;
+ /* Channel information */
+ wifi_channel_info channel_info;
} NanRangingCfg;
/* NAN Ranging request's response */
@@ -3103,6 +3113,7 @@
void (*EventBootstrappingRequest) (NanBootstrappingRequestInd* event);
void (*EventBootstrappingConfirm) (NanBootstrappingConfirmInd* event);
void (*EventSuspensionModeChange) (NanSuspensionModeChangeInd* event);
+ void (*EventRangingResults)(wifi_rtt_result* rtt_result[], u32 num_results, u16 session_id);
} NanCallbackHandler;
/**@brief nan_enable_request