Effect AIDL Refine effect test parameter combination list

Add effects implementation shared lib dependency.

Bug: 258124419
Test: atest VtsHalVisualizerTargetTest
Test: atest VtsHalAECTargetTest
Test: atest VtsHalAGCTargetTest
Test: atest VtsHalNSTargetTest
Change-Id: I58be0b789b08c9211a6bc79e8fc3c21d9658dd4a
diff --git a/audio/aidl/vts/VtsHalNSTargetTest.cpp b/audio/aidl/vts/VtsHalNSTargetTest.cpp
index 2845225..93ad86d 100644
--- a/audio/aidl/vts/VtsHalNSTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalNSTargetTest.cpp
@@ -14,12 +14,14 @@
  * limitations under the License.
  */
 
+#include <Utils.h>
 #include <aidl/Vintf.h>
+#include <android/binder_enums.h>
+#include <unordered_set>
 
 #define LOG_TAG "VtsHalNSParamTest"
 
-#include <Utils.h>
-#include <unordered_set>
+#include <aidl/android/hardware/audio/effect/NoiseSuppression.h>
 #include "EffectHelper.h"
 
 using namespace android;
@@ -69,9 +71,6 @@
     }
 
     static const long kInputFrameCount = 0x100, kOutputFrameCount = 0x100;
-    static const std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor>> kFactoryDescList;
-    static const std::unordered_set<NoiseSuppression::Level> kLevelValues;
-
     std::shared_ptr<IFactory> mFactory;
     std::shared_ptr<IEffect> mEffect;
     Descriptor mDescriptor;
@@ -114,19 +113,16 @@
         ns.set<NoiseSuppression::level>(level);
         mTags.push_back({NoiseSuppression::level, ns});
     }
+    static std::unordered_set<NoiseSuppression::Level> getLevelValues() {
+        return {ndk::enum_range<NoiseSuppression::Level>().begin(),
+                ndk::enum_range<NoiseSuppression::Level>().end()};
+    }
 
   private:
     std::vector<std::pair<NoiseSuppression::Tag, NoiseSuppression>> mTags;
     void CleanUp() { mTags.clear(); }
 };
 
-const std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor>> kFactoryDescList =
-        EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor,
-                                                     kNoiseSuppressionTypeUUID);
-const std::unordered_set<NoiseSuppression::Level> NSParamTest::kLevelValues = {
-        ndk::enum_range<NoiseSuppression::Level>().begin(),
-        ndk::enum_range<NoiseSuppression::Level>().end()};
-
 TEST_P(NSParamTest, SetAndGetLevel) {
     EXPECT_NO_FATAL_FAILURE(addLevelParam(mLevel));
     SetAndGetParameters();
@@ -136,7 +132,7 @@
         NSParamTest, NSParamTest,
         ::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
                                    IFactory::descriptor, kNoiseSuppressionTypeUUID)),
-                           testing::ValuesIn(NSParamTest::kLevelValues)),
+                           testing::ValuesIn(NSParamTest::getLevelValues())),
         [](const testing::TestParamInfo<NSParamTest::ParamType>& info) {
             auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
             std::string level = aidl::android::hardware::audio::effect::toString(