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

Commit 7ba5bd52 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

gatt: Improve logging

Avoid printing information on found device if it is already on the allow
list or connected

Bug: 262646759
Test: manual
Tag: #feature

Merged-In: If0afe59d698d66be02105ca157bfcf330b846f3d
Change-Id: If0afe59d698d66be02105ca157bfcf330b846f3d
(cherry picked from commit 10851beb)
parent c8b0259a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -174,8 +174,6 @@ static void target_announcement_observe_results_cb(tBTM_INQ_RESULTS* p_inq,
  LOG_INFO("Found targeted announcement for device %s",
           addr.ToString().c_str());

  BTM_LogHistory(kBtmLogTag, addr, "Found TA from");

  if (it->second.is_in_accept_list) {
    LOG_INFO("Device %s is already connecting", addr.ToString().c_str());
    return;
@@ -186,6 +184,8 @@ static void target_announcement_observe_results_cb(tBTM_INQ_RESULTS* p_inq,
    return;
  }

  BTM_LogHistory(kBtmLogTag, addr, "Found TA from");

  /* Take fist app_id and use it for direct_connect */
  auto app_id = *(it->second.doing_targeted_announcements_conn.begin());