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

Commit 880649ee authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

btif_on_name_read - flip condition to reduce indentation

Bug: 330675788
Flag: exempt, no logic changes
Test: mma -j32
Change-Id: I55dbf5b21ba513daa0ed6c1c34711a14c1beb081
parent 5b52c1b3
Loading
Loading
Loading
Loading
+30 −29
Original line number Diff line number Diff line
@@ -2089,7 +2089,11 @@ static void btif_dm_search_services_evt(tBTA_DM_SEARCH_EVT event,

void btif_on_name_read(RawAddress bd_addr, tHCI_ERROR_CODE hci_status,
                       const BD_NAME bd_name) {
  if (IS_FLAG_ENABLED(rnr_present_during_service_discovery)) {
  if (!IS_FLAG_ENABLED(rnr_present_during_service_discovery)) {
    log::info("Skipping name read event - called on bad callback.");
    return;
  }

  if (hci_status != HCI_SUCCESS) {
    log::warn("Received RNR event with bad status addr:{} hci_status:{}",
              ADDRESS_TO_LOGGABLE_CSTR(bd_addr),
@@ -2117,9 +2121,6 @@ void btif_on_name_read(RawAddress bd_addr, tHCI_ERROR_CODE hci_status,
  log::info("Callback for read name event addr:{} name:{}",
            ADDRESS_TO_LOGGABLE_CSTR(bd_addr),
            PRIVATE_NAME(reinterpret_cast<char const*>(bd_name)));
  } else {
    log::info("Skipping name read event - called on bad callback.");
  }
}

void btif_on_did_received(RawAddress bd_addr, uint8_t vendor_id_src,