Merge "VTS: Create a new ConnectedDisplaysTest" into main
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 53e5e99..92681de 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
@@ -1339,7 +1339,7 @@
{
"name": "EV_CHARGE_CURRENT_DRAW_LIMIT",
"value": 291508031,
- "description": "Indicates the maximum current draw threshold for charging set by the user\nconfigArray[0] is used to specify the max current draw allowed by the vehicle in Amperes at boot time.\nIf {@code HasSupportedValueInfo} for the global area ID (0) is not {@code null}, {@code HasSupportedValueInfo#hasMaxSupportedValue} and {@code HasSupportedValueInfo#hasMinSupportedValue} must be {@code true}. {@code MinMaxSupportedValueResult#maxSupportedValue} specifies the max current draw allowed by the vehicle in Amperes at the current moment. {@code MinMaxSupportedValueResult#minSupportedValue} must be 0. At boot, configArray[0] is equal to maxSupportedValue.\nIf the max current draw allowed by the vehicle may change dynamically, {@code HasSupportedValueInfo#hasMaxSupportedValue} must be {@code true} and {@code MinMaxSupportedValueResult#maxSupportedValue} must be implemented.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
+ "description": "The vehicle's selected alternating current (AC) EV charging draw limit in Amperes.\nconfigArray[0] is used to specify the max current draw allowed by the vehicle in Amperes at boot time.\nIf {@code HasSupportedValueInfo} for the global area ID (0) is not {@code null}, {@code HasSupportedValueInfo#hasMaxSupportedValue} and {@code HasSupportedValueInfo#hasMinSupportedValue} must be {@code true}. {@code MinMaxSupportedValueResult#maxSupportedValue} specifies the max current draw allowed by the vehicle in Amperes at the current moment. {@code MinMaxSupportedValueResult#minSupportedValue} must be 0. At boot, configArray[0] is equal to maxSupportedValue.\nIf the max current draw allowed by the vehicle may change dynamically, {@code HasSupportedValueInfo#hasMaxSupportedValue} must be {@code true} and {@code MinMaxSupportedValueResult#maxSupportedValue} must be implemented.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
},
{
"name": "EV_CHARGE_PERCENT_LIMIT",
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 a7ecb36..2f1b277 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -6156,7 +6156,7 @@
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32
/**
- * Indicates the maximum current draw threshold for charging set by the user
+ * The vehicle's selected alternating current (AC) EV charging draw limit in Amperes.
*
* configArray[0] is used to specify the max current draw allowed by the vehicle in Amperes at
* boot time.
diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
index 3f1f5f6..3d7c376 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
@@ -123,40 +123,6 @@
return (sessionType == session_type_);
}
-std::string getSettingOutputString(
- IBluetoothAudioProvider::LeAudioAseConfigurationSetting& setting) {
- std::stringstream ss;
- std::string name = "";
- if (!setting.sinkAseConfiguration.has_value() &&
- !setting.sourceAseConfiguration.has_value())
- return "";
- std::vector<
- std::optional<LeAudioAseConfigurationSetting::AseDirectionConfiguration>>*
- directionAseConfiguration;
- if (setting.sinkAseConfiguration.has_value() &&
- !setting.sinkAseConfiguration.value().empty())
- directionAseConfiguration = &setting.sinkAseConfiguration.value();
- else
- directionAseConfiguration = &setting.sourceAseConfiguration.value();
- for (auto& aseConfiguration : *directionAseConfiguration) {
- if (aseConfiguration.has_value() &&
- aseConfiguration.value().aseConfiguration.metadata.has_value()) {
- for (auto& meta :
- aseConfiguration.value().aseConfiguration.metadata.value()) {
- if (meta.has_value() &&
- meta.value().getTag() == MetadataLtv::vendorSpecific) {
- auto k = meta.value().get<MetadataLtv::vendorSpecific>().opaqueValue;
- name = std::string(k.begin(), k.end());
- break;
- }
- }
- }
- }
-
- ss << "setting name: " << name << ", setting: " << setting.toString();
- return ss.str();
-}
-
ndk::ScopedAStatus LeAudioOffloadAudioProvider::startSession(
const std::shared_ptr<IBluetoothAudioPort>& host_if,
const AudioConfiguration& audio_config,
@@ -742,9 +708,11 @@
return filtered_setting;
}
-std::optional<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>
+std::optional<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>
LeAudioOffloadAudioProvider::matchWithRequirement(
- std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>&
+ std::vector<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>&
matched_ase_configuration_settings,
const IBluetoothAudioProvider::LeAudioConfigurationRequirement& requirement,
bool isMatchContext, bool isExact, bool isMatchFlags) {
@@ -758,14 +726,15 @@
if (!requirement.flags.has_value()) return std::nullopt;
requirement_flags_bitmask = requirement.flags.value().bitmask;
}
- for (auto& setting : matched_ase_configuration_settings) {
+ for (auto& [setting_name, setting] : matched_ase_configuration_settings) {
// Try to match context.
if (isMatchContext) {
if ((setting.audioContext.bitmask & requirement.audioContext.bitmask) !=
requirement.audioContext.bitmask)
continue;
- LOG(DEBUG) << __func__ << ": Setting with matched context: "
- << getSettingOutputString(setting);
+ LOG(DEBUG) << __func__
+ << ": Setting with matched context: name: " << setting_name
+ << ", setting: " << setting.toString();
}
// Try to match configuration flags
@@ -774,19 +743,20 @@
if ((setting.flags.value().bitmask & requirement_flags_bitmask) !=
requirement_flags_bitmask)
continue;
- LOG(DEBUG) << __func__ << ": Setting with matched flags: "
- << getSettingOutputString(setting);
+ LOG(DEBUG) << __func__
+ << ": Setting with matched flags: name: " << setting_name
+ << ", setting: " << setting.toString();
}
auto filtered_ase_configuration_setting =
getRequirementMatchedAseConfigurationSettings(setting, requirement,
isExact);
if (filtered_ase_configuration_setting.has_value()) {
- LOG(INFO) << __func__ << ": Result found: "
- << getSettingOutputString(
- filtered_ase_configuration_setting.value());
+ LOG(INFO) << __func__ << ": Result found: name: " << setting_name
+ << ", setting: "
+ << filtered_ase_configuration_setting.value().toString();
// Found a matched setting, ignore other settings
- return filtered_ase_configuration_setting;
+ return {{setting_name, filtered_ase_configuration_setting.value()}};
}
}
// If cannot satisfy this requirement, return nullopt
@@ -812,7 +782,8 @@
std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>*
_aidl_return) {
// Get all configuration settings
- std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>
+ std::vector<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>
ase_configuration_settings =
BluetoothAudioCodecs::GetLeAudioAseConfigurationSettings();
@@ -822,15 +793,17 @@
}
// Matched ASE configuration with ignored audio context
- std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>
+ std::vector<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>
sink_matched_ase_configuration_settings;
- std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>
+ std::vector<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>
matched_ase_configuration_settings;
// A setting must match both source and sink.
// First filter all setting matched with sink capability
if (in_remoteSinkAudioCapabilities.has_value()) {
- for (auto& setting : ase_configuration_settings) {
+ for (auto& [setting_name, setting] : ase_configuration_settings) {
for (auto& capability : in_remoteSinkAudioCapabilities.value()) {
if (!capability.has_value()) continue;
auto filtered_ase_configuration_setting =
@@ -838,7 +811,7 @@
setting, capability.value(), kLeAudioDirectionSink);
if (filtered_ase_configuration_setting.has_value()) {
sink_matched_ase_configuration_settings.push_back(
- filtered_ase_configuration_setting.value());
+ {setting_name, filtered_ase_configuration_setting.value()});
}
}
}
@@ -848,7 +821,8 @@
// Combine filter every source capability
if (in_remoteSourceAudioCapabilities.has_value()) {
- for (auto& setting : sink_matched_ase_configuration_settings)
+ for (auto& [setting_name, setting] :
+ sink_matched_ase_configuration_settings)
for (auto& capability : in_remoteSourceAudioCapabilities.value()) {
if (!capability.has_value()) continue;
auto filtered_ase_configuration_setting =
@@ -856,7 +830,7 @@
setting, capability.value(), kLeAudioDirectionSource);
if (filtered_ase_configuration_setting.has_value()) {
matched_ase_configuration_settings.push_back(
- filtered_ase_configuration_setting.value());
+ {setting_name, filtered_ase_configuration_setting.value()});
}
}
} else {
@@ -864,7 +838,11 @@
sink_matched_ase_configuration_settings;
}
- std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting> result;
+ std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>
+ result_no_name;
+ std::vector<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>
+ result;
for (auto& requirement : in_requirements) {
// For each requirement, try to match with a setting.
// If we cannot match, return an empty result.
@@ -896,18 +874,19 @@
if (!found) {
LOG(ERROR) << __func__
<< ": Cannot find any match for this requirement, exitting...";
- result.clear();
- *_aidl_return = result;
+ *_aidl_return = result_no_name;
return ndk::ScopedAStatus::ok();
}
}
LOG(INFO) << __func__
<< ": Found matches for all requirements, chosen settings:";
- for (auto& setting : result) {
- LOG(INFO) << __func__ << ": " << getSettingOutputString(setting);
+ for (auto& [setting_name, setting] : result) {
+ LOG(INFO) << __func__ << ": name: " << setting_name
+ << ", setting: " << setting.toString();
+ result_no_name.push_back(setting);
}
- *_aidl_return = result;
+ *_aidl_return = result_no_name;
return ndk::ScopedAStatus::ok();
};
@@ -937,7 +916,8 @@
uint8_t direction,
const IBluetoothAudioProvider::LeAudioAseQosConfigurationRequirement&
qosRequirement,
- std::vector<LeAudioAseConfigurationSetting>& ase_configuration_settings,
+ std::vector<std::pair<std::string, LeAudioAseConfigurationSetting>>&
+ ase_configuration_settings,
bool isExact, bool isMatchFlags) {
auto requirement_flags_bitmask = 0;
if (isMatchFlags) {
@@ -955,13 +935,14 @@
direction_qos_requirement = qosRequirement.sourceAseQosRequirement.value();
}
- for (auto& setting : ase_configuration_settings) {
+ for (auto& [setting_name, setting] : ase_configuration_settings) {
// Context matching
if ((setting.audioContext.bitmask & qosRequirement.audioContext.bitmask) !=
qosRequirement.audioContext.bitmask)
continue;
- LOG(DEBUG) << __func__ << ": Setting with matched context: "
- << getSettingOutputString(setting);
+ LOG(DEBUG) << __func__
+ << ": Setting with matched context: name: " << setting_name
+ << ", setting: " << setting.toString();
// Match configuration flags
if (isMatchFlags) {
@@ -969,8 +950,9 @@
if ((setting.flags.value().bitmask & requirement_flags_bitmask) !=
requirement_flags_bitmask)
continue;
- LOG(DEBUG) << __func__ << ": Setting with matched flags: "
- << getSettingOutputString(setting);
+ LOG(DEBUG) << __func__
+ << ": Setting with matched flags: name: " << setting_name
+ << ", setting: " << setting.toString();
}
// Get a list of all matched AseDirectionConfiguration
@@ -1041,7 +1023,8 @@
IBluetoothAudioProvider::LeAudioAseQosConfigurationPair result;
// Get all configuration settings
- std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>
+ std::vector<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>
ase_configuration_settings =
BluetoothAudioCodecs::GetLeAudioAseConfigurationSettings();
diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
index 8c4f543..6d402a4 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
@@ -163,15 +163,19 @@
uint8_t direction,
const IBluetoothAudioProvider::LeAudioAseQosConfigurationRequirement&
qosRequirement,
- std::vector<LeAudioAseConfigurationSetting>& ase_configuration_settings,
+ std::vector<std::pair<std::string, LeAudioAseConfigurationSetting>>&
+ ase_configuration_settings,
bool isExact, bool isMatchedFlag);
bool isSubgroupConfigurationMatchedContext(
AudioContext requirement_context,
IBluetoothAudioProvider::BroadcastQuality quality,
LeAudioBroadcastSubgroupConfiguration configuration);
- std::optional<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>
+ std::optional<std::pair<
+ std::string, IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>
matchWithRequirement(
- std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>&
+ std::vector<
+ std::pair<std::string,
+ IBluetoothAudioProvider::LeAudioAseConfigurationSetting>>&
matched_ase_configuration_settings,
const IBluetoothAudioProvider::LeAudioConfigurationRequirement&
requirements,
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
index db2528e..89472e6 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
@@ -452,7 +452,7 @@
return kDefaultOffloadHfpCodecInfo;
}
-std::vector<LeAudioAseConfigurationSetting>
+std::vector<std::pair<std::string, LeAudioAseConfigurationSetting>>
BluetoothAudioCodecs::GetLeAudioAseConfigurationSettings() {
return AudioSetConfigurationProviderJson::
GetLeAudioAseConfigurationSettings();
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.h b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.h
index 0a1f708..c77de61 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.h
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.h
@@ -54,7 +54,7 @@
static std::vector<CodecInfo> GetLeAudioOffloadCodecInfo(
const SessionType& session_type);
- static std::vector<LeAudioAseConfigurationSetting>
+ static std::vector<std::pair<std::string, LeAudioAseConfigurationSetting>>
GetLeAudioAseConfigurationSettings();
static std::vector<CodecInfo> GetHfpOffloadCodecInfo();
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
index 2474916..feb4cda 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
@@ -65,7 +65,8 @@
ConfigurationFlags>>
configurations_;
-std::vector<LeAudioAseConfigurationSetting> ase_configuration_settings_;
+std::vector<std::pair<std::string, LeAudioAseConfigurationSetting>>
+ ase_configuration_settings_;
constexpr uint8_t kIsoDataPathHci = 0x00;
constexpr uint8_t kIsoDataPathPlatformDefault = 0x01;
@@ -273,7 +274,7 @@
/* Implementation */
-std::vector<LeAudioAseConfigurationSetting>
+std::vector<std::pair<std::string, LeAudioAseConfigurationSetting>>
AudioSetConfigurationProviderJson::GetLeAudioAseConfigurationSettings() {
AudioSetConfigurationProviderJson::LoadAudioSetConfigurationProviderJson();
return ase_configuration_settings_;
@@ -392,7 +393,7 @@
}
void AudioSetConfigurationProviderJson::populateAseConfiguration(
- const std::string& name, LeAudioAseConfiguration& ase,
+ LeAudioAseConfiguration& ase,
const le_audio::AudioSetSubConfiguration* flat_subconfig,
const le_audio::QosConfiguration* qos_cfg,
ConfigurationFlags& configurationFlags) {
@@ -431,12 +432,6 @@
}
// Codec configuration data
populateConfigurationData(ase, flat_subconfig->codec_configuration());
- // Populate the config name for easier debug
- auto meta = std::vector<std::optional<MetadataLtv>>();
- MetadataLtv::VendorSpecific cfg_name;
- cfg_name.opaqueValue = std::vector<uint8_t>(name.begin(), name.end());
- meta.push_back(cfg_name);
- ase.metadata = meta;
}
void AudioSetConfigurationProviderJson::populateAseQosConfiguration(
@@ -507,7 +502,6 @@
// Parse into AseDirectionConfiguration
AseDirectionConfiguration
AudioSetConfigurationProviderJson::SetConfigurationFromFlatSubconfig(
- const std::string& name,
const le_audio::AudioSetSubConfiguration* flat_subconfig,
const le_audio::QosConfiguration* qos_cfg, CodecLocation location,
ConfigurationFlags& configurationFlags) {
@@ -518,8 +512,7 @@
LeAudioDataPathConfiguration path;
// Translate into LeAudioAseConfiguration
- populateAseConfiguration(name, ase, flat_subconfig, qos_cfg,
- configurationFlags);
+ populateAseConfiguration(ase, flat_subconfig, qos_cfg, configurationFlags);
// Translate into LeAudioAseQosConfiguration
populateAseQosConfiguration(qos, qos_cfg, ase,
@@ -553,15 +546,14 @@
// Parse into AseDirectionConfiguration and the ConfigurationFlags
// and put them in the given list.
void AudioSetConfigurationProviderJson::processSubconfig(
- const std::string& name,
const le_audio::AudioSetSubConfiguration* subconfig,
const le_audio::QosConfiguration* qos_cfg,
std::vector<std::optional<AseDirectionConfiguration>>&
directionAseConfiguration,
CodecLocation location, ConfigurationFlags& configurationFlags) {
auto ase_cnt = subconfig->ase_cnt();
- auto config = SetConfigurationFromFlatSubconfig(name, subconfig, qos_cfg,
- location, configurationFlags);
+ auto config = SetConfigurationFromFlatSubconfig(subconfig, qos_cfg, location,
+ configurationFlags);
directionAseConfiguration.push_back(config);
// Put the same setting again.
if (ase_cnt == 2) directionAseConfiguration.push_back(config);
@@ -646,11 +638,11 @@
/* Load subconfigurations */
for (auto subconfig : *codec_cfg->subconfigurations()) {
if (subconfig->direction() == kLeAudioDirectionSink) {
- processSubconfig(flat_cfg->name()->str(), subconfig, qos_sink_cfg,
- sinkAseConfiguration, location, configurationFlags);
+ processSubconfig(subconfig, qos_sink_cfg, sinkAseConfiguration,
+ location, configurationFlags);
} else {
- processSubconfig(flat_cfg->name()->str(), subconfig, qos_source_cfg,
- sourceAseConfiguration, location, configurationFlags);
+ processSubconfig(subconfig, qos_source_cfg, sourceAseConfiguration,
+ location, configurationFlags);
}
}
@@ -860,7 +852,7 @@
setting.flags = flags;
// Add to list of setting
LOG(DEBUG) << "Pushing configuration to list: " << config_name;
- ase_configuration_settings_.push_back(setting);
+ ase_configuration_settings_.push_back({config_name, setting});
}
}
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.h b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.h
index 8e12618..f115d61 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.h
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.h
@@ -50,7 +50,7 @@
class AudioSetConfigurationProviderJson {
public:
- static std::vector<LeAudioAseConfigurationSetting>
+ static std::vector<std::pair<std::string, LeAudioAseConfigurationSetting>>
GetLeAudioAseConfigurationSettings();
private:
@@ -73,7 +73,7 @@
flat_codec_specific_params);
static void populateAseConfiguration(
- const std::string& name, LeAudioAseConfiguration& ase,
+ LeAudioAseConfiguration& ase,
const le_audio::AudioSetSubConfiguration* flat_subconfig,
const le_audio::QosConfiguration* qos_cfg,
ConfigurationFlags& configurationFlags);
@@ -84,13 +84,11 @@
uint8_t ase_channel_cnt);
static AseDirectionConfiguration SetConfigurationFromFlatSubconfig(
- const std::string& name,
const le_audio::AudioSetSubConfiguration* flat_subconfig,
const le_audio::QosConfiguration* qos_cfg, CodecLocation location,
ConfigurationFlags& configurationFlags);
static void processSubconfig(
- const std::string& name,
const le_audio::AudioSetSubConfiguration* subconfig,
const le_audio::QosConfiguration* qos_cfg,
std::vector<std::optional<AseDirectionConfiguration>>&
diff --git a/nfc/OWNERS b/nfc/OWNERS
index f46dccd..47f209f 100644
--- a/nfc/OWNERS
+++ b/nfc/OWNERS
@@ -1,2 +1,2 @@
# Bug component: 48448
-include platform/packages/apps/Nfc:/OWNERS
\ No newline at end of file
+include platform/packages/modules/Nfc:/OWNERS
\ No newline at end of file
diff --git a/nfc/aidl/vts/functional/VtsNfcBehaviorChangesTest.cpp b/nfc/aidl/vts/functional/VtsNfcBehaviorChangesTest.cpp
index 6db7e14..9c44c3a 100644
--- a/nfc/aidl/vts/functional/VtsNfcBehaviorChangesTest.cpp
+++ b/nfc/aidl/vts/functional/VtsNfcBehaviorChangesTest.cpp
@@ -349,44 +349,18 @@
}
/*
- * SetPassiveObserverTech_individualTechnologies:
- * Verifies per-technology observe mode is supported as a capability. Then sets observe mode
- * for each individual technology and verifies the command succeeds.
- *
- * @VsrTest = GMS-VSR-3.2.8-002
+ * SetPassiveObserverTech_getCaps:
+ * Verifies GET_CAPS returns get correct value for observe mode capabilities.
*/
-TEST_P(NfcBehaviorChanges, SetPassiveObserverTech_individualTechnologies) {
+TEST_P(NfcBehaviorChanges, SetPassiveObserverTech_getCaps) {
if (get_vsr_api_level() < 202504) {
GTEST_SKIP() << "Skipping test for board API level < 202504";
}
tNFC_STATUS status = nfaGetCaps();
+
ASSERT_EQ(status, NFC_STATUS_OK);
ASSERT_EQ(getCapsPassiveObserverModeValue(), 0x2);
-
- status = nfaSetPassiveObserverTech(NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_A);
- ASSERT_EQ(status, NFA_STATUS_OK);
- status = nfaQueryObserveModeState();
- ASSERT_EQ(status, NFA_STATUS_OK);
- ASSERT_EQ(sObserveModeState, NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_A);
-
- status = nfaSetPassiveObserverTech(NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_B);
- ASSERT_EQ(status, NFA_STATUS_OK);
- status = nfaQueryObserveModeState();
- ASSERT_EQ(status, NFA_STATUS_OK);
- ASSERT_EQ(sObserveModeState, NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_B);
-
- status = nfaSetPassiveObserverTech(NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_V);
- ASSERT_EQ(status, NFA_STATUS_OK);
- status = nfaQueryObserveModeState();
- ASSERT_EQ(status, NFA_STATUS_OK);
- ASSERT_EQ(sObserveModeState, NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_V);
-
- status = nfaSetPassiveObserverTech(NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_F);
- ASSERT_EQ(status, NFA_STATUS_OK);
- status = nfaQueryObserveModeState();
- ASSERT_EQ(status, NFA_STATUS_OK);
- ASSERT_EQ(sObserveModeState, NCI_ANDROID_PASSIVE_OBSERVE_PARAM_ENABLE_F);
}
/*
diff --git a/radio/aidl/vts/radio_modem_test.cpp b/radio/aidl/vts/radio_modem_test.cpp
index c6b2579..98ea0d2 100644
--- a/radio/aidl/vts/radio_modem_test.cpp
+++ b/radio/aidl/vts/radio_modem_test.cpp
@@ -55,6 +55,15 @@
ASSERT_NE(nullptr, radio_config.get());
}
+bool RadioModemTest::shouldTestCdma() {
+ int32_t aidl_version = 0;
+ ndk::ScopedAStatus aidl_status = radio_modem->getInterfaceVersion(&aidl_version);
+ EXPECT_TRUE(aidl_status.isOk());
+ if (aidl_version < 2) return true; // < RADIO_HAL_VERSION_2_1
+
+ return !telephony_flags::cleanup_cdma();
+}
+
/*
* Test IRadioModem.setRadioPower() for the response returned.
*/
@@ -244,6 +253,10 @@
* Test IRadioModem.nvReadItem() for the response returned.
*/
TEST_P(RadioModemTest, nvReadItem) {
+ if (!shouldTestCdma()) {
+ GTEST_SKIP() << "Skipping CDMA testing (deprecated)";
+ }
+
serial = GetRandomSerialNumber();
radio_modem->nvReadItem(serial, NvItem::LTE_BAND_ENABLE_25);
@@ -261,6 +274,10 @@
* Test IRadioModem.nvWriteItem() for the response returned.
*/
TEST_P(RadioModemTest, nvWriteItem) {
+ if (!shouldTestCdma()) {
+ GTEST_SKIP() << "Skipping CDMA testing (deprecated)";
+ }
+
serial = GetRandomSerialNumber();
NvWriteItem item;
memset(&item, 0, sizeof(item));
diff --git a/radio/aidl/vts/radio_modem_utils.h b/radio/aidl/vts/radio_modem_utils.h
index aa99ea3..21481bd 100644
--- a/radio/aidl/vts/radio_modem_utils.h
+++ b/radio/aidl/vts/radio_modem_utils.h
@@ -119,6 +119,8 @@
public:
void SetUp() override;
+ bool shouldTestCdma();
+
/* radio modem service handle */
std::shared_ptr<IRadioModem> radio_modem;
/* radio modem response handle */
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 9a3a429..439d268 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -78,6 +78,15 @@
ASSERT_NE(nullptr, radio_config.get());
}
+bool RadioNetworkTest::shouldTestCdma() {
+ int32_t aidl_version = 0;
+ ndk::ScopedAStatus aidl_status = radio_network->getInterfaceVersion(&aidl_version);
+ EXPECT_TRUE(aidl_status.isOk());
+ if (aidl_version < 4) return true; // < RADIO_HAL_VERSION_2_3
+
+ return !telephony_flags::cleanup_cdma();
+}
+
void RadioNetworkTest::stopNetworkScan() {
serial = GetRandomSerialNumber();
radio_network->stopNetworkScan(serial);
@@ -1775,6 +1784,9 @@
* Test IRadioNetwork.getAvailableBandModes() for the response returned.
*/
TEST_P(RadioNetworkTest, getAvailableBandModes) {
+ if (!shouldTestCdma()) {
+ GTEST_SKIP() << "Skipping CDMA testing (deprecated)";
+ }
if (telephony_flags::enforce_telephony_feature_mapping()) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_RADIO_ACCESS)) {
GTEST_SKIP() << "Skipping getAvailableBandModes "
@@ -2019,6 +2031,9 @@
* Test IRadioNetwork.setBandMode() for the response returned.
*/
TEST_P(RadioNetworkTest, setBandMode) {
+ if (!shouldTestCdma()) {
+ GTEST_SKIP() << "Skipping CDMA testing (deprecated)";
+ }
if (telephony_flags::enforce_telephony_feature_mapping()) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_RADIO_ACCESS)) {
GTEST_SKIP() << "Skipping setBandMode "
@@ -2043,6 +2058,10 @@
* Test IRadioNetwork.setLocationUpdates() for the response returned.
*/
TEST_P(RadioNetworkTest, setLocationUpdates) {
+ // While setLocationUpdates is not CDMA-related, it's guarded by the same release flag.
+ if (!shouldTestCdma()) {
+ GTEST_SKIP() << "Skipping testing of deprecated setLocationUpdates method";
+ }
if (telephony_flags::enforce_telephony_feature_mapping()) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_RADIO_ACCESS)) {
GTEST_SKIP() << "Skipping setLocationUpdates "
diff --git a/radio/aidl/vts/radio_network_utils.h b/radio/aidl/vts/radio_network_utils.h
index 17c0896..3387dec 100644
--- a/radio/aidl/vts/radio_network_utils.h
+++ b/radio/aidl/vts/radio_network_utils.h
@@ -263,6 +263,8 @@
public:
void SetUp() override;
+ bool shouldTestCdma();
+
/* radio network service handle */
std::shared_ptr<IRadioNetwork> radio_network;
/* radio network response handle */
diff --git a/radio/aidl/vts/radio_sim_test.cpp b/radio/aidl/vts/radio_sim_test.cpp
index 2823977..aaccb21 100644
--- a/radio/aidl/vts/radio_sim_test.cpp
+++ b/radio/aidl/vts/radio_sim_test.cpp
@@ -52,6 +52,15 @@
ASSERT_NE(nullptr, radio_config.get());
}
+bool RadioSimTest::shouldTestCdma() {
+ int32_t aidl_version = 0;
+ ndk::ScopedAStatus aidl_status = radio_sim->getInterfaceVersion(&aidl_version);
+ EXPECT_TRUE(aidl_status.isOk());
+ if (aidl_version < 4) return true; // < RADIO_HAL_VERSION_2_3
+
+ return !telephony_flags::cleanup_cdma();
+}
+
void RadioSimTest::updateSimCardStatus() {
serial = GetRandomSerialNumber();
radio_sim->getIccCardStatus(serial);
@@ -935,6 +944,13 @@
* Test IRadioSim.iccCloseLogicalChannel() for the response returned.
*/
TEST_P(RadioSimTest, iccCloseLogicalChannel) {
+ int32_t aidl_version;
+ ndk::ScopedAStatus aidl_status = radio_sim->getInterfaceVersion(&aidl_version);
+ ASSERT_OK(aidl_status);
+ if (aidl_version >= 2) { // >= RADIO_HAL_VERSION_2_1
+ GTEST_SKIP() << "Skipping iccCloseLogicalChannel (deprecated)";
+ }
+
if (telephony_flags::enforce_telephony_feature_mapping()) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SUBSCRIPTION)) {
GTEST_SKIP() << "Skipping iccCloseLogicalChannel "
@@ -1176,6 +1192,9 @@
* Test IRadioSim.setUiccSubscription() for the response returned.
*/
TEST_P(RadioSimTest, setUiccSubscription) {
+ if (!shouldTestCdma()) {
+ GTEST_SKIP() << "Skipping CDMA testing (deprecated)";
+ }
if (telephony_flags::enforce_telephony_feature_mapping()) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SUBSCRIPTION)) {
GTEST_SKIP() << "Skipping setUiccSubscription "
diff --git a/radio/aidl/vts/radio_sim_utils.h b/radio/aidl/vts/radio_sim_utils.h
index 7cbcc58..eb3efb2 100644
--- a/radio/aidl/vts/radio_sim_utils.h
+++ b/radio/aidl/vts/radio_sim_utils.h
@@ -198,6 +198,8 @@
public:
void SetUp() override;
+ bool shouldTestCdma();
+
/* Override updateSimCardStatus in RadioServiceTest to not call setResponseFunctions */
void updateSimCardStatus();
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index 65e93c6..0696ada 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -405,7 +405,7 @@
* is non-normal.
*/
TEST(NonParameterizedTests, unlockedBootloaderStatesImpliesNonNormalKeyMintInAVmDiceChain) {
- if (::android::base::GetBoolProperty("trusty.security_vm.keymint.enabled", false)) {
+ if (!::android::base::GetBoolProperty("trusty.security_vm.keymint.enabled", false)) {
GTEST_SKIP() << "The KeyMint (" << DEFAULT_INSTANCE_NAME
<< ") instance is not inside a VM.";
}
diff --git a/sensors/aidl/default/Sensors.cpp b/sensors/aidl/default/Sensors.cpp
index 9e6bea5..853045d 100644
--- a/sensors/aidl/default/Sensors.cpp
+++ b/sensors/aidl/default/Sensors.cpp
@@ -85,9 +85,6 @@
ALOGI("Sensors initializing");
ScopedAStatus result = ScopedAStatus::ok();
- mEventQueue = std::make_unique<AidlMessageQueue<Event, SynchronizedReadWrite>>(
- in_eventQueueDescriptor, true /* resetPointers */);
-
// Ensure that all sensors are disabled.
for (auto sensor : mSensors) {
sensor.second->activate(false);
@@ -106,6 +103,9 @@
// Hold the lock to ensure that re-creation of event flag is atomic
std::lock_guard<std::mutex> lock(mWriteLock);
+ mEventQueue = std::make_unique<AidlMessageQueue<Event, SynchronizedReadWrite>>(
+ in_eventQueueDescriptor, true /* resetPointers */);
+
// Ensure that any existing EventFlag is properly deleted
deleteEventFlagLocked();
diff --git a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
index 17653b4..9dd5153 100644
--- a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
+++ b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
@@ -38,6 +38,7 @@
#include <android/binder_manager.h>
#include <android/binder_process.h>
#include <android/binder_status.h>
+#include <cutils/properties.h>
#include <gtest/gtest.h>
#include <unistd.h>
@@ -179,6 +180,34 @@
ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
}
}
+
+ bool isEmulator() {
+ if (property_get_bool("ro.boot.qemu", false)) {
+ return true;
+ }
+ char device[PROP_VALUE_MAX];
+ char model[PROP_VALUE_MAX];
+ char name[PROP_VALUE_MAX];
+ char hardware[PROP_VALUE_MAX];
+
+ property_get("ro.product.device", device, "");
+ property_get("ro.product.model", model, "");
+ property_get("ro.product.name", name, "");
+ property_get("ro.hardware", hardware, "");
+
+ std::string deviceStr(device);
+ std::string modelStr(model);
+ std::string nameStr(name);
+ std::string hardwareStr(hardware);
+
+ return deviceStr.rfind("vsoc_", 0) == 0 || modelStr.rfind("Cuttlefish ", 0) == 0 ||
+ nameStr.rfind("cf_", 0) == 0 || nameStr.rfind("aosp_cf_", 0) == 0 ||
+ hardwareStr.find("goldfish") != std::string::npos ||
+ hardwareStr.find("ranchu") != std::string::npos ||
+ hardwareStr.find("cutf_cvm") != std::string::npos ||
+ hardwareStr.find("starfish") != std::string::npos;
+ }
+
// Stores thermal version
int32_t thermal_version;
@@ -359,6 +388,9 @@
if (apiLevel < 202404) {
GTEST_SKIP() << "Skipping test as the vendor level is below 202404: " << apiLevel;
}
+ if (isEmulator()) {
+ GTEST_SKIP() << "Skipping test on emulator";
+ }
for (const auto& feature : kNonHandheldFeatures) {
if (::testing::deviceSupportsFeature(feature.c_str())) {
GTEST_SKIP() << "Skipping test as the device has feature: " << feature;