diff options
author | Mikhail Naganov <mnaganov@google.com> | 2020-04-14 14:53:22 -0700 |
---|---|---|
committer | Mikhail Naganov <mnaganov@google.com> | 2020-04-17 01:55:48 +0000 |
commit | 0dd9a6bacc2f4d7d269c13c7ed8dec7346e80be7 (patch) | |
tree | dadcc770427ea5815c6cf9d3a69de2a0b7d9f986 /audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp | |
parent | 32e9b6360854d4c2e1d9ef784de2ae01d9fa8dd8 (diff) |
audio: Centralize audio configuration paths specification
The list of possible paths for the audio configuration
files is now retrieved using audio_get_configuration_paths()
function. All duplicated lists of known configuration
directories have been removed.
Bug: 153680356
Test: atest VtsHalAudioV6_0TargetTest \
VtsHalAudioPolicyV1_0TargetTest \
VtsHalAudioEffectV6_0TargetTest
Change-Id: I1e40fdf8d6e3a5ac339f7f138f62063bb87bd3da
Merged-In: I1e40fdf8d6e3a5ac339f7f138f62063bb87bd3da
Diffstat (limited to 'audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp')
-rw-r--r-- | audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp b/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp index 9c0135bf93..f2516349d4 100644 --- a/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp +++ b/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp @@ -18,6 +18,7 @@ #include <iterator> #include <media/EffectsConfig.h> +#include <system/audio_config.h> // clang-format off #include PATH(android/hardware/audio/effect/FILE_VERSION/IEffectsFactory.h) // clang-format on @@ -41,13 +42,14 @@ TEST(CheckConfig, audioEffectsConfigurationValidation) { GTEST_SKIP() << "No Effects HAL version " STRINGIFY(CPP_VERSION) " on this device"; } - std::vector<const char*> locations(std::begin(DEFAULT_LOCATIONS), std::end(DEFAULT_LOCATIONS)); const char* xsd = "/data/local/tmp/audio_effects_conf_" STRINGIFY(CPP_VERSION) ".xsd"; #if MAJOR_VERSION == 2 // In V2, audio effect XML is not required. .conf is still allowed though deprecated - EXPECT_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, locations, xsd); + EXPECT_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, android::audio_get_configuration_paths(), + xsd); #elif MAJOR_VERSION >= 4 // Starting with V4, audio effect XML is required - EXPECT_ONE_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, locations, xsd); + EXPECT_ONE_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, android::audio_get_configuration_paths(), + xsd); #endif } |