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

Commit 6912d547 authored by Chris Manton's avatar Chris Manton
Browse files

Use main/shim/dumpsys::supervision_timeout_to_seconds

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I71224efcf0026f69e83d19b711590f2222b80f92
parent d1ce8c9f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1149,10 +1149,18 @@ tBTM_STATUS BTM_SetLinkSuperTout(const RawAddress& remote_bda,

    /* Only send if current role is Central; 2.0 spec requires this */
    if (p->link_role == HCI_ROLE_CENTRAL) {
      LOG_DEBUG("Setting supervison timeout:%.2fms bd_addr:%s",
                supervision_timeout_to_seconds(timeout),
                PRIVATE_ADDRESS(remote_bda));

      btsnd_hcic_write_link_super_tout(LOCAL_BR_EDR_CONTROLLER_ID,
                                       p->hci_handle, timeout);
      return (BTM_CMD_STARTED);
    } else {
      LOG_WARN(
          "Role is peripheral so unable to set supervison timeout:%.2fms "
          "bd_addr:%s",
          supervision_timeout_to_seconds(timeout), PRIVATE_ADDRESS(remote_bda));
      return (BTM_SUCCESS);
    }
  }