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

Commit eded8ba7 authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "Merge "Ensure btm_log_history is constructed" am: acc4f792 am:...

Merge "Merge "Ensure btm_log_history is constructed" am: acc4f792 am: 51fe97fd am: 174fa642 am: 5d8760c0 am: e55ad2ed" into tm-dev am: 72bfb4f0

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/18110098



Change-Id: I59e06c015c1cf9ddd21b019ed07eecac18a11054
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents bd2387d1 72bfb4f0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@

#include "bt_target.h"
#include "main/shim/dumpsys.h"
#include "osi/include/log.h"
#include "stack/btm/btm_int_types.h"
#include "stack/include/btm_client_interface.h"
#include "stack_config.h"
@@ -64,6 +65,11 @@ constexpr size_t kMaxLogHistoryMsgLength = 25;

static void btm_log_history(const std::string& tag, const char* addr,
                            const std::string& msg, const std::string& extra) {
  if (btm_cb.history_ == nullptr) {
    LOG_ERROR("BTM_LogHistory has not been constructed or already destroyed !");
    return;
  }

  btm_cb.history_->Push(
      "%-6s %-25s: %s %s", tag.substr(0, kMaxLogHistoryTagLength).c_str(),
      msg.substr(0, kMaxLogHistoryMsgLength).c_str(), addr, extra.c_str());