Audio HAL: Simplify types updates for 'common' and 'audio' packages
Instead of importing every single type individually ("using <type>"),
import entire namespaces of
::android::hardware::audio::CPP_VERSION and
::android::hardware::audio::common::CPP_VERSION
inside the "implementation" namespace in the default implementation.
This simplifies modifying types, as it is not needed anymore
to surround "using <type>" directives with #if MAJOR_VERSION ...
Note that the contents of the namespaces are imported inside
the "implementation" namespace, which reduces risks of name collision
Also, fixed the namespace for HidlUtils--it needs to be in
'implementation'.
Test: make
Change-Id: I8461d2ac3ad5d8ad4df4a15d99430ae0d7a5ccef
diff --git a/media/libaudiohal/impl/EffectHalHidl.cpp b/media/libaudiohal/impl/EffectHalHidl.cpp
index 7b867b4..df79b95 100644
--- a/media/libaudiohal/impl/EffectHalHidl.cpp
+++ b/media/libaudiohal/impl/EffectHalHidl.cpp
@@ -31,9 +31,7 @@
using ::android::hardware::audio::effect::CPP_VERSION::EffectConfigParameters;
using ::android::hardware::audio::effect::CPP_VERSION::MessageQueueFlagBits;
using ::android::hardware::audio::effect::CPP_VERSION::Result;
-using ::android::hardware::audio::common::CPP_VERSION::HidlUtils;
-using ::android::hardware::audio::common::CPP_VERSION::AudioChannelMask;
-using ::android::hardware::audio::common::CPP_VERSION::AudioFormat;
+using ::android::hardware::audio::common::CPP_VERSION::implementation::HidlUtils;
using ::android::hardware::audio::common::utils::EnumBitfield;
using ::android::hardware::hidl_vec;
using ::android::hardware::MQDescriptorSync;
@@ -42,6 +40,8 @@
namespace android {
namespace CPP_VERSION {
+using namespace ::android::hardware::audio::common::CPP_VERSION;
+
EffectHalHidl::EffectHalHidl(const sp<IEffect>& effect, uint64_t effectId)
: mEffect(effect), mEffectId(effectId), mBuffersChanged(true), mEfGroup(nullptr) {
}