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

Commit 10851beb 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

Change-Id: If0afe59d698d66be02105ca157bfcf330b846f3d
parent c293a324
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -175,8 +175,6 @@ static void target_announcement_observe_results_cb(tBTM_INQ_RESULTS* p_inq,
  LOG_INFO("Found targeted announcement for device %s",
           ADDRESS_TO_LOGGABLE_CSTR(addr));

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

  if (it->second.is_in_accept_list) {
    LOG_INFO("Device %s is already connecting", ADDRESS_TO_LOGGABLE_CSTR(addr));
    return;
@@ -187,6 +185,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());