Loading audio/aidl/TEST_MAPPING +6 −6 Original line number Original line Diff line number Diff line Loading @@ -3,9 +3,15 @@ { { "name": "VtsHalAudioCoreTargetTest" "name": "VtsHalAudioCoreTargetTest" }, }, { "name": "audioeffect_tests" }, { { "name": "audio_policy_config_xml_converter_tests" "name": "audio_policy_config_xml_converter_tests" }, }, { "name": "trackplayerbase_tests" }, { { "name": "VtsHalAudioEffectFactoryTargetTest" "name": "VtsHalAudioEffectFactoryTargetTest" }, }, Loading Loading @@ -59,15 +65,9 @@ { { "name": "audiorecord_tests" "name": "audiorecord_tests" }, }, { "name": "audioeffect_tests" }, { { "name": "audiorouting_tests" "name": "audiorouting_tests" }, }, { "name": "trackplayerbase_tests" }, { { "name": "audiosystem_tests" "name": "audiosystem_tests" }, }, Loading audio/aidl/default/EffectConfig.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -93,7 +93,7 @@ std::vector<std::reference_wrapper<const tinyxml2::XMLElement>> EffectConfig::ge } } bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) { bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) { if (__builtin_available(android AAPEXSUPPORT_API, *)) { if constexpr (__ANDROID_VENDOR_API__ >= 202404) { AApexInfo *apexInfo; AApexInfo *apexInfo; if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { std::string apexName(AApexInfo_getName(apexInfo)); std::string apexName(AApexInfo_getName(apexInfo)); Loading audio/aidl/default/EffectMain.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,7 @@ static const char* kDefaultConfigName = "audio_effects_config.xml"; static const char* kDefaultConfigName = "audio_effects_config.xml"; static inline std::string config_file_path() { static inline std::string config_file_path() { if (__builtin_available(android AAPEXSUPPORT_API, *)) { if constexpr (__ANDROID_VENDOR_API__ >= 202404) { AApexInfo *apexInfo; AApexInfo *apexInfo; if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { std::string apexName(AApexInfo_getName(apexInfo)); std::string apexName(AApexInfo_getName(apexInfo)); Loading audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp +19 −0 Original line number Original line Diff line number Diff line Loading @@ -296,6 +296,25 @@ TEST_P(EffectFactoryTest, QueryProcess) { [&](const auto& proc) { return processingSet.find(proc) != processingSet.end(); })); [&](const auto& proc) { return processingSet.find(proc) != processingSet.end(); })); } } // Make sure all effect instances have same HAL version number as IFactory. TEST_P(EffectFactoryTest, VersionNumberForAllEffectsEqualsToIFactory) { std::vector<Descriptor> descs; EXPECT_IS_OK(mEffectFactory->queryEffects(std::nullopt, std::nullopt, std::nullopt, &descs)); EXPECT_NE(descs.size(), 0UL); std::vector<std::shared_ptr<IEffect>> effects = createWithDescs(descs); int factoryVersion = 0; EXPECT_IS_OK(mEffectFactory->getInterfaceVersion(&factoryVersion)); for (const auto& effect : effects) { int effectVersion = 0; EXPECT_NE(nullptr, effect); EXPECT_IS_OK(effect->getInterfaceVersion(&effectVersion)); EXPECT_EQ(factoryVersion, effectVersion); } ASSERT_NO_FATAL_FAILURE(destroyEffects(effects)); } INSTANTIATE_TEST_SUITE_P(EffectFactoryTest, EffectFactoryTest, INSTANTIATE_TEST_SUITE_P(EffectFactoryTest, EffectFactoryTest, testing::ValuesIn(android::getAidlHalInstanceNames(IFactory::descriptor)), testing::ValuesIn(android::getAidlHalInstanceNames(IFactory::descriptor)), android::PrintInstanceNameToString); android::PrintInstanceNameToString); Loading bluetooth/lmp_event/aidl/default/src/main.rs +2 −2 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,7 @@ use android_hardware_bluetooth_lmp_event::aidl::android::hardware::bluetooth::lm }; }; use binder::BinderFeatures; use binder::BinderFeatures; use log::{info, Level}; use log::{info, LevelFilter}; mod lmp_event; mod lmp_event; Loading @@ -30,7 +30,7 @@ const LOG_TAG: &str = "lmp_event_service_example"; fn main() { fn main() { info!("{LOG_TAG}: starting service"); info!("{LOG_TAG}: starting service"); let logger_success = logger::init( let logger_success = logger::init( logger::Config::default().with_tag_on_device(LOG_TAG).with_min_level(Level::Trace) logger::Config::default().with_tag_on_device(LOG_TAG).with_max_level(LevelFilter::Trace) ); ); if !logger_success { if !logger_success { panic!("{LOG_TAG}: Failed to start logger"); panic!("{LOG_TAG}: Failed to start logger"); Loading Loading
audio/aidl/TEST_MAPPING +6 −6 Original line number Original line Diff line number Diff line Loading @@ -3,9 +3,15 @@ { { "name": "VtsHalAudioCoreTargetTest" "name": "VtsHalAudioCoreTargetTest" }, }, { "name": "audioeffect_tests" }, { { "name": "audio_policy_config_xml_converter_tests" "name": "audio_policy_config_xml_converter_tests" }, }, { "name": "trackplayerbase_tests" }, { { "name": "VtsHalAudioEffectFactoryTargetTest" "name": "VtsHalAudioEffectFactoryTargetTest" }, }, Loading Loading @@ -59,15 +65,9 @@ { { "name": "audiorecord_tests" "name": "audiorecord_tests" }, }, { "name": "audioeffect_tests" }, { { "name": "audiorouting_tests" "name": "audiorouting_tests" }, }, { "name": "trackplayerbase_tests" }, { { "name": "audiosystem_tests" "name": "audiosystem_tests" }, }, Loading
audio/aidl/default/EffectConfig.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -93,7 +93,7 @@ std::vector<std::reference_wrapper<const tinyxml2::XMLElement>> EffectConfig::ge } } bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) { bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) { if (__builtin_available(android AAPEXSUPPORT_API, *)) { if constexpr (__ANDROID_VENDOR_API__ >= 202404) { AApexInfo *apexInfo; AApexInfo *apexInfo; if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { std::string apexName(AApexInfo_getName(apexInfo)); std::string apexName(AApexInfo_getName(apexInfo)); Loading
audio/aidl/default/EffectMain.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,7 @@ static const char* kDefaultConfigName = "audio_effects_config.xml"; static const char* kDefaultConfigName = "audio_effects_config.xml"; static inline std::string config_file_path() { static inline std::string config_file_path() { if (__builtin_available(android AAPEXSUPPORT_API, *)) { if constexpr (__ANDROID_VENDOR_API__ >= 202404) { AApexInfo *apexInfo; AApexInfo *apexInfo; if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { std::string apexName(AApexInfo_getName(apexInfo)); std::string apexName(AApexInfo_getName(apexInfo)); Loading
audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp +19 −0 Original line number Original line Diff line number Diff line Loading @@ -296,6 +296,25 @@ TEST_P(EffectFactoryTest, QueryProcess) { [&](const auto& proc) { return processingSet.find(proc) != processingSet.end(); })); [&](const auto& proc) { return processingSet.find(proc) != processingSet.end(); })); } } // Make sure all effect instances have same HAL version number as IFactory. TEST_P(EffectFactoryTest, VersionNumberForAllEffectsEqualsToIFactory) { std::vector<Descriptor> descs; EXPECT_IS_OK(mEffectFactory->queryEffects(std::nullopt, std::nullopt, std::nullopt, &descs)); EXPECT_NE(descs.size(), 0UL); std::vector<std::shared_ptr<IEffect>> effects = createWithDescs(descs); int factoryVersion = 0; EXPECT_IS_OK(mEffectFactory->getInterfaceVersion(&factoryVersion)); for (const auto& effect : effects) { int effectVersion = 0; EXPECT_NE(nullptr, effect); EXPECT_IS_OK(effect->getInterfaceVersion(&effectVersion)); EXPECT_EQ(factoryVersion, effectVersion); } ASSERT_NO_FATAL_FAILURE(destroyEffects(effects)); } INSTANTIATE_TEST_SUITE_P(EffectFactoryTest, EffectFactoryTest, INSTANTIATE_TEST_SUITE_P(EffectFactoryTest, EffectFactoryTest, testing::ValuesIn(android::getAidlHalInstanceNames(IFactory::descriptor)), testing::ValuesIn(android::getAidlHalInstanceNames(IFactory::descriptor)), android::PrintInstanceNameToString); android::PrintInstanceNameToString); Loading
bluetooth/lmp_event/aidl/default/src/main.rs +2 −2 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,7 @@ use android_hardware_bluetooth_lmp_event::aidl::android::hardware::bluetooth::lm }; }; use binder::BinderFeatures; use binder::BinderFeatures; use log::{info, Level}; use log::{info, LevelFilter}; mod lmp_event; mod lmp_event; Loading @@ -30,7 +30,7 @@ const LOG_TAG: &str = "lmp_event_service_example"; fn main() { fn main() { info!("{LOG_TAG}: starting service"); info!("{LOG_TAG}: starting service"); let logger_success = logger::init( let logger_success = logger::init( logger::Config::default().with_tag_on_device(LOG_TAG).with_min_level(Level::Trace) logger::Config::default().with_tag_on_device(LOG_TAG).with_max_level(LevelFilter::Trace) ); ); if !logger_success { if !logger_success { panic!("{LOG_TAG}: Failed to start logger"); panic!("{LOG_TAG}: Failed to start logger"); Loading