audio: Improve debug logging in the AIDL version, fix bugs
- Make sure the AIDL default implementation has debug output enabled.
- Log additional info in the AIDL VTS to facilitate debugging.
- Make resource handler classes move-only types.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I111b72aaf12962f00b4d31b8ac87186bca5eb853
Change-Id: I111b72aaf12962f00b4d31b8ac87186bca5eb853
(cherry picked from commit f82fc6476d8778e7a513056e1d7f7d4ab5aaadfd)
diff --git a/audio/aidl/default/main.cpp b/audio/aidl/default/main.cpp
index 0de6047..aeb9983 100644
--- a/audio/aidl/default/main.cpp
+++ b/audio/aidl/default/main.cpp
@@ -25,20 +25,22 @@
using aidl::android::hardware::audio::core::Module;
int main() {
+ // This is a debug implementation, always enable debug logging.
+ android::base::SetMinimumLogSeverity(::android::base::DEBUG);
ABinderProcess_setThreadPoolMaxThreadCount(16);
- // make the default config service
+ // Make the default config service
auto config = ndk::SharedRefBase::make<Config>();
const std::string configName = std::string() + Config::descriptor + "/default";
binder_status_t status =
AServiceManager_addService(config->asBinder().get(), configName.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(STATUS_OK, status);
- // make the default module
+ // Make the default module
auto moduleDefault = ndk::SharedRefBase::make<Module>();
const std::string moduleDefaultName = std::string() + Module::descriptor + "/default";
status = AServiceManager_addService(moduleDefault->asBinder().get(), moduleDefaultName.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(STATUS_OK, status);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach