Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c951b406 authored by Henri Chataing's avatar Henri Chataing
Browse files

system/bta/le_audio: Conflict resolution for libbluetooth_log migration

Ignore-AOSP-First: Auto-merge conflict
Test: m com.android.btservices
Bug: 305066880
Flag: EXEMPT, mechanical refactor
Change-Id: I73a437789c80c5a66a1e0aa594a63ba06ec6dee8
parent 895ffc52
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -801,6 +801,7 @@ cc_test {
        "LeAudioSetConfigSchemas_h",
    ],
    shared_libs: [
        "libbase",
        "libcrypto",
        "libhidlbase",
        "liblog", // __android_log_print
@@ -1087,6 +1088,7 @@ cc_test {
        "le_audio/mock_codec_manager.cc",
    ],
    shared_libs: [
        "libbase",
        "libcrypto",
        "liblog",
    ],
@@ -1156,6 +1158,7 @@ cc_test {
        "test/common/mock_controller.cc",
    ],
    shared_libs: [
        "libbase",
        "libbinder_ndk",
        "libcrypto",
        "libfmq",
+18 −4
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#include "le_audio_utils.h"

#include <bluetooth/log.h>

#include "bta/le_audio/content_control_id_keeper.h"
#include "common/strings.h"
#include "le_audio_types.h"
@@ -25,6 +27,18 @@ using bluetooth::common::ToString;
using bluetooth::le_audio::types::AudioContexts;
using bluetooth::le_audio::types::LeAudioContextType;

namespace fmt {
template <>
struct formatter<audio_usage_t> : enum_formatter<audio_usage_t> {};
template <>
struct formatter<audio_content_type_t> : enum_formatter<audio_content_type_t> {
};
template <>
struct formatter<audio_source_t> : enum_formatter<audio_source_t> {};
template <>
struct formatter<audio_devices_t> : enum_formatter<audio_devices_t> {};
}  // namespace fmt

namespace bluetooth::le_audio {
namespace utils {

@@ -174,9 +188,9 @@ AudioContexts GetAudioContextsFromSourceMetadata(
    auto track = entry.base;
    if (track.content_type == 0 && track.usage == 0) continue;

    LOG_INFO("%s: usage=%s(%d), content_type=%s(%d), gain=%f, tag:%s", __func__,
             usageToString(track.usage).c_str(), track.usage,
             contentTypeToString(track.content_type).c_str(),
    log::info("usage={}({}), content_type={}({}), gain={:f}, tag:{}",
              usageToString(track.usage), track.usage,
              contentTypeToString(track.content_type),
              track.content_type, track.gain, entry.tags);

    if (isMetadataTagPresent(entry.tags, "VX_AOSP_SAMPLESOUND")) {