libaudiohal: Optimize loading for minor version upgrades
Make libaudiohal@7.1 to contain clients for core HAL
V7.1 and effect HAL V7.0. This is to avoid loading
both libaudiohal@7.1 (for core) and libaudiohal@7.0
(for effects).
Update the loader to figure out maximum minor version
and only load the library for that version.
Implemented proper conversion for the Result type
from the a.h.audio.effect library.
Bug: 219730472
Test: adb shell dumpsys meminfo
Change-Id: I44dd6c77505f6bbf8897e10b083e99e36730b43d
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp
index 7fa1d45..0cdf621 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.cpp
+++ b/media/libaudiohal/impl/DeviceHalHidl.cpp
@@ -50,12 +50,12 @@
mediautils::makeTimeCheckStatsForClassMethod(getClassName(), __func__)
DeviceHalHidl::DeviceHalHidl(const sp<::android::hardware::audio::CPP_VERSION::IDevice>& device)
- : ConversionHelperHidl("DeviceHalHidl"), mDevice(device) {
+ : CoreConversionHelperHidl("DeviceHalHidl"), mDevice(device) {
}
DeviceHalHidl::DeviceHalHidl(
const sp<::android::hardware::audio::CPP_VERSION::IPrimaryDevice>& device)
- : ConversionHelperHidl("DeviceHalHidl"),
+ : CoreConversionHelperHidl("DeviceHalHidl"),
#if MAJOR_VERSION <= 6 || (MAJOR_VERSION == 7 && MINOR_VERSION == 0)
mDevice(device),
#endif