audio_effect HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds; VTS HalAudioEffectHidlTargetBasicTest passes
Bug: 33844934
Change-Id: I7796982c4cad976aeeabf7708ec0104505332cad
diff --git a/audio/2.0/default/service.cpp b/audio/2.0/default/service.cpp
index 8b608c8..3a48999 100644
--- a/audio/2.0/default/service.cpp
+++ b/audio/2.0/default/service.cpp
@@ -40,7 +40,7 @@
android::status_t status;
status = registerPassthroughServiceImplementation<IDevicesFactory>("audio_devices_factory");
LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio service: %d", status);
- status = registerPassthroughServiceImplementation<IEffectsFactory>("audio_effects_factory");
+ status = registerPassthroughServiceImplementation<IEffectsFactory>();
LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio effects service: %d", status);
// Soundtrigger and FM radio might be not present.
status = registerPassthroughServiceImplementation<ISoundTriggerHw>("sound_trigger.primary");
diff --git a/audio/effect/2.0/vts/functional/audio_effect_hidl_hal_test.cpp b/audio/effect/2.0/vts/functional/audio_effect_hidl_hal_test.cpp
index 145d4c3..6e050c6 100644
--- a/audio/effect/2.0/vts/functional/audio_effect_hidl_hal_test.cpp
+++ b/audio/effect/2.0/vts/functional/audio_effect_hidl_hal_test.cpp
@@ -38,7 +38,7 @@
class AudioEffectHidlTest : public ::testing::Test {
public:
virtual void SetUp() override {
- effectsFactory = IEffectsFactory::getService("audio_effects_factory");
+ effectsFactory = IEffectsFactory::getService();
ASSERT_NE(effectsFactory, nullptr);
}