Add A2DP_DumpCodecInfo() API
The API can be used to display A2DP codec info when using |LOG_DEBUG|.
Test: Code compilation
Bug: 64128712
Change-Id: I04379b45f24adb7008365d38ccc8aa7f49ed4b73
(cherry picked from commit 81c2234305d4c84eb38f0d5a92605e3b42366f84)
diff --git a/stack/a2dp/a2dp_aac.cc b/stack/a2dp/a2dp_aac.cc
index ce5431b..7027df7 100644
--- a/stack/a2dp/a2dp_aac.cc
+++ b/stack/a2dp/a2dp_aac.cc
@@ -529,7 +529,7 @@
return true;
}
-void A2DP_DumpCodecInfoAac(const uint8_t* p_codec_info) {
+bool A2DP_DumpCodecInfoAac(const uint8_t* p_codec_info) {
tA2DP_STATUS a2dp_status;
tA2DP_AAC_CIE aac_cie;
@@ -538,7 +538,7 @@
a2dp_status = A2DP_ParseInfoAac(&aac_cie, p_codec_info, true);
if (a2dp_status != A2DP_SUCCESS) {
LOG_ERROR(LOG_TAG, "%s: A2DP_ParseInfoAac fail:%d", __func__, a2dp_status);
- return;
+ return false;
}
LOG_DEBUG(LOG_TAG, "\tobjectType: 0x%x", aac_cie.objectType);
@@ -605,6 +605,8 @@
(aac_cie.variableBitRateSupport != 0) ? "true" : "false");
LOG_DEBUG(LOG_TAG, "\tbitRate: %u", aac_cie.bitRate);
+
+ return true;
}
const tA2DP_ENCODER_INTERFACE* A2DP_GetEncoderInterfaceAac(