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

Commit d3f5a1e4 authored by Henri Chataing's avatar Henri Chataing Committed by Android (Google) Code Review
Browse files

Merge "system/bta/le_audio: Conflict resolution for libbluetooth_log migration" into main

parents 28ad2aaa c951b406
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -800,6 +800,7 @@ cc_test {
        "LeAudioSetConfigSchemas_h",
    ],
    shared_libs: [
        "libbase",
        "libcrypto",
        "libhidlbase",
        "liblog", // __android_log_print
@@ -1084,6 +1085,7 @@ cc_test {
        "le_audio/mock_codec_manager.cc",
    ],
    shared_libs: [
        "libbase",
        "libcrypto",
        "liblog",
    ],
@@ -1152,6 +1154,7 @@ cc_test {
        "le_audio/mock_codec_manager.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")) {