Merge "Added config flag test for default bcradio HAL" into main
diff --git a/audio/aidl/default/apex/com.android.hardware.audio/Android.bp b/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
index 9c91e27..2ece7a1 100644
--- a/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
+++ b/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
@@ -38,6 +38,7 @@
"libpreprocessingaidl",
"libpresetreverbsw",
"libreverbaidl",
+ "libspatializersw",
"libvirtualizersw",
"libvisualizeraidl",
"libvolumesw",
diff --git a/audio/aidl/default/spatializer/Android.bp b/audio/aidl/default/spatializer/Android.bp
index 400629e..2c229fe 100644
--- a/audio/aidl/default/spatializer/Android.bp
+++ b/audio/aidl/default/spatializer/Android.bp
@@ -35,6 +35,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/spatializer/SpatializerSw.cpp b/audio/aidl/default/spatializer/SpatializerSw.cpp
index 6d3c4bd..ef86ddb 100644
--- a/audio/aidl/default/spatializer/SpatializerSw.cpp
+++ b/audio/aidl/default/spatializer/SpatializerSw.cpp
@@ -108,6 +108,8 @@
ndk::ScopedAStatus SpatializerSw::getParameterSpecific(const Parameter::Id& id,
Parameter::Specific* specific) {
+ RETURN_IF(!mContext, EX_NULL_POINTER, "nullContext");
+
auto tag = id.getTag();
RETURN_IF(Parameter::Id::spatializerTag != tag, EX_ILLEGAL_ARGUMENT, "wrongIdTag");
auto spatializerId = id.get<Parameter::Id::spatializerTag>();
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp
index c7761c5..1eb6a6d 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp
@@ -120,6 +120,12 @@
ndk::ScopedAStatus A2dpOffloadAudioProvider::parseA2dpConfiguration(
const CodecId& codec_id, const std::vector<uint8_t>& configuration,
CodecParameters* codec_parameters, A2dpStatus* _aidl_return) {
+ if (!kEnableA2dpCodecExtensibility) {
+ // parseA2dpConfiguration must not be implemented if A2dp codec
+ // extensibility is not supported.
+ return ndk::ScopedAStatus::fromStatus(STATUS_UNKNOWN_TRANSACTION);
+ }
+
auto codec = codec_factory_.GetCodec(codec_id);
if (!codec) {
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
@@ -136,6 +142,12 @@
const std::vector<A2dpRemoteCapabilities>& remote_a2dp_capabilities,
const A2dpConfigurationHint& hint,
std::optional<audio::A2dpConfiguration>* _aidl_return) {
+ if (!kEnableA2dpCodecExtensibility) {
+ // getA2dpConfiguration must not be implemented if A2dp codec
+ // extensibility is not supported.
+ return ndk::ScopedAStatus::fromStatus(STATUS_UNKNOWN_TRANSACTION);
+ }
+
*_aidl_return = std::nullopt;
A2dpConfiguration avdtp_configuration;
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
index 2c21440..866eaeb 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
@@ -35,6 +35,23 @@
namespace bluetooth {
namespace audio {
+/// Enable flag for the reference implementation for A2dp Codec
+/// Extensibility.
+///
+/// A2dp Codec extensibility cannot be enabled until the following
+/// requirements are fulfilled.
+///
+/// 1. The Bluetooth controller must support the HCI Requirements
+/// v1.04 or later, and must support the vendor HCI command
+/// A2DP Offload Start (v2), A2DP Offload Stop (v2) as indicated
+/// by the field a2dp_offload_v2 of the vendor capabilities.
+///
+/// 2. The implementation of the provider must be completed with
+/// DSP configuration for streaming.
+enum : bool {
+ kEnableA2dpCodecExtensibility = false,
+};
+
class BluetoothAudioProvider : public BnBluetoothAudioProvider {
public:
BluetoothAudioProvider();
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp
index c7c6e6d..584640b 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp
@@ -159,6 +159,12 @@
if (session_type == SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH ||
session_type == SessionType::A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH) {
+ if (!kEnableA2dpCodecExtensibility) {
+ // Implementing getProviderInfo equates supporting
+ // A2dp codec extensibility.
+ return ndk::ScopedAStatus::fromStatus(STATUS_UNKNOWN_TRANSACTION);
+ }
+
auto& provider_info = _aidl_return->emplace();
provider_info.name = a2dp_offload_codec_factory_.name;
diff --git a/broadcastradio/aidl/default/test/Android.bp b/broadcastradio/aidl/default/test/Android.bp
index 9e1b89d..a33fb70 100644
--- a/broadcastradio/aidl/default/test/Android.bp
+++ b/broadcastradio/aidl/default/test/Android.bp
@@ -15,6 +15,7 @@
*/
package {
+ default_team: "trendy_team_aaos_framework",
default_applicable_licenses: ["Android-Apache-2.0"],
}
diff --git a/broadcastradio/common/utilsaidl/Android.bp b/broadcastradio/common/utilsaidl/Android.bp
index 4814778..e3bdfdd 100644
--- a/broadcastradio/common/utilsaidl/Android.bp
+++ b/broadcastradio/common/utilsaidl/Android.bp
@@ -20,6 +20,7 @@
// all of the 'license_kinds' from "hardware_interfaces_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
+ default_team: "trendy_team_aaos_framework",
default_applicable_licenses: ["hardware_interfaces_license"],
}
diff --git a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
index b329de2..1e0c427 100644
--- a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
+++ b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
@@ -166,7 +166,8 @@
auto status = mAllocator->getIMapperLibrarySuffix(&mapperSuffix);
ASSERT_TRUE(status.isOk()) << "Failed to get IMapper library suffix";
std::string lib_name = "mapper." + mapperSuffix + ".so";
- void* so = android_load_sphal_library(lib_name.c_str(), RTLD_LOCAL | RTLD_NOW);
+ void* so = AServiceManager_openDeclaredPassthroughHal("mapper", mapperSuffix.c_str(),
+ RTLD_LOCAL | RTLD_NOW);
ASSERT_NE(nullptr, so) << "Failed to load " << lib_name;
mIMapperLoader = (AIMapper_loadIMapperFn)dlsym(so, "AIMapper_loadIMapper");
ASSERT_NE(nullptr, mIMapperLoader) << "AIMapper_locaIMapper missing from " << lib_name;
diff --git a/keymaster/4.0/vts/functional/HmacKeySharingTest.cpp b/keymaster/4.0/vts/functional/HmacKeySharingTest.cpp
index 1bff076..a076438 100644
--- a/keymaster/4.0/vts/functional/HmacKeySharingTest.cpp
+++ b/keymaster/4.0/vts/functional/HmacKeySharingTest.cpp
@@ -51,7 +51,7 @@
};
using KeymasterVec = std::vector<sp<IKeymasterDevice>>;
- using ByteString = std::basic_string<uint8_t>;
+ using ByteString = std::vector<uint8_t>;
// using NonceVec = std::vector<HidlBuf>;
GetParamsResult getHmacSharingParameters(IKeymasterDevice& keymaster) {
@@ -98,7 +98,7 @@
std::vector<ByteString> copyNonces(const hidl_vec<HmacSharingParameters>& paramsVec) {
std::vector<ByteString> nonces;
for (auto& param : paramsVec) {
- nonces.emplace_back(param.nonce.data(), param.nonce.size());
+ nonces.emplace_back(param.nonce.data(), param.nonce.data() + param.nonce.size());
}
return nonces;
}
diff --git a/neuralnetworks/aidl/utils/src/Conversions.cpp b/neuralnetworks/aidl/utils/src/Conversions.cpp
index 47c72b4..9f920bb 100644
--- a/neuralnetworks/aidl/utils/src/Conversions.cpp
+++ b/neuralnetworks/aidl/utils/src/Conversions.cpp
@@ -421,7 +421,7 @@
return createSharedMemoryFromAHWB(ahwb, /*takeOwnership=*/true);
#else // __ANDROID__
- LOG(FATAL) << "GeneralResult<SharedMemory> unvalidatedConvert(const aidl_hal::Memory& "
+ LOG(ERROR) << "GeneralResult<SharedMemory> unvalidatedConvert(const aidl_hal::Memory& "
"memory): Not Available on Host Build";
return NN_ERROR() << "createFromHandle failed";
#endif // __ANDROID__
@@ -732,7 +732,7 @@
};
return Memory::make<Memory::Tag::hardwareBuffer>(std::move(hardwareBuffer));
#else // __ANDROID__
- LOG(FATAL) << "nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::HardwareBuffer& "
+ LOG(ERROR) << "nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::HardwareBuffer& "
"memory): Not Available on Host Build";
(void)memory;
return (NN_ERROR() << "unvalidatedConvert failed").operator nn::GeneralResult<Memory>();
diff --git a/security/keymint/support/remote_prov_utils_test.cpp b/security/keymint/support/remote_prov_utils_test.cpp
index 630f7bb..89469f1 100644
--- a/security/keymint/support/remote_prov_utils_test.cpp
+++ b/security/keymint/support/remote_prov_utils_test.cpp
@@ -14,20 +14,23 @@
* limitations under the License.
*/
-#include "cppbor.h"
-#include "keymaster/cppcose/cppcose.h"
#include <aidl/android/hardware/security/keymint/RpcHardwareInfo.h>
#include <android-base/properties.h>
+#include <cppbor.h>
#include <cppbor_parse.h>
-#include <cstdint>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <keymaster/android_keymaster_utils.h>
+#include <keymaster/cppcose/cppcose.h>
#include <keymaster/logger.h>
#include <keymaster/remote_provisioning_utils.h>
#include <openssl/curve25519.h>
#include <remote_prov/remote_prov_utils.h>
+#include <algorithm>
+#include <cstdint>
+#include <span>
+
namespace aidl::android::hardware::security::keymint::remote_prov {
namespace {
@@ -36,7 +39,11 @@
using ::keymaster::kStatusInvalidEek;
using ::keymaster::StatusOr;
using ::testing::ElementsAreArray;
-using byte_view = std::basic_string_view<uint8_t>;
+using byte_view = std::span<const uint8_t>;
+
+inline bool equal_byte_views(const byte_view& view1, const byte_view& view2) {
+ return std::equal(view1.begin(), view1.end(), view2.begin(), view2.end());
+}
struct KeyInfoEcdsa {
CoseKeyCurve curve;
@@ -44,7 +51,8 @@
byte_view pubKeyY;
bool operator==(const KeyInfoEcdsa& other) const {
- return curve == other.curve && pubKeyX == other.pubKeyX && pubKeyY == other.pubKeyY;
+ return curve == other.curve && equal_byte_views(pubKeyX, other.pubKeyX) &&
+ equal_byte_views(pubKeyY, other.pubKeyY);
}
};
diff --git a/wifi/common/aidl/Android.bp b/wifi/common/aidl/Android.bp
index 11acb4f..a941869 100644
--- a/wifi/common/aidl/Android.bp
+++ b/wifi/common/aidl/Android.bp
@@ -13,6 +13,7 @@
// limitations under the License.
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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"
diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
index 69a8919..82e3128 100644
--- a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
+++ b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
@@ -35,6 +35,7 @@
using aidl::android::hardware::wifi::supplicant::ISupplicant;
using aidl::android::hardware::wifi::supplicant::ISupplicantP2pIface;
using aidl::android::hardware::wifi::supplicant::MiracastMode;
+using aidl::android::hardware::wifi::supplicant::P2pAddGroupConfigurationParams;
using aidl::android::hardware::wifi::supplicant::P2pConnectInfo;
using aidl::android::hardware::wifi::supplicant::P2pCreateGroupOwnerInfo;
using aidl::android::hardware::wifi::supplicant::P2pDeviceFoundEventParams;
@@ -553,6 +554,27 @@
}
/*
+ * AddGroupWithConfigurationParams
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, AddGroupWithConfigurationParams) {
+ if (interface_version_ < 3) {
+ GTEST_SKIP() << "addGroupWithConfigurationParams is available as of Supplicant V3";
+ }
+
+ P2pAddGroupConfigurationParams params;
+ params.ssid = kTestSsid;
+ params.passphrase = kTestPassphrase;
+ params.isPersistent = kTestGroupPersistent;
+ params.frequencyMHzOrBand = kTestGroupFreq;
+ params.goInterfaceAddress = vecToArrayMacAddr(kTestZeroMacAddr);
+ params.joinExistingGroup = kTestGroupIsJoin;
+ params.keyMgmtMask = 0;
+ params.vendorData = kTestVendorDataOptional;
+
+ EXPECT_TRUE(p2p_iface_->addGroupWithConfigurationParams(params).isOk());
+}
+
+/*
* Find
*/
TEST_P(SupplicantP2pIfaceAidlTest, Find) {