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

Commit 4ed5c6da authored by Chris Manton's avatar Chris Manton
Browse files

Check discoverability/connectability/inquirability return codes [2nd]

Bug: 340680094
Test: m .
Flag: EXEMPT, Logging Change
Change-Id: Ic2833598f36ac8c0cf9284a782dd26d8ae298141
parent bef85a13
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -321,10 +321,10 @@ void bta_dm_disable() {
  bta_sys_disable();

  if (BTM_SetDiscoverability(BTM_NON_DISCOVERABLE) != BTM_SUCCESS) {
    log::warn("Unable to clear discoverability");
    log::warn("Unable to disable classic BR/EDR discoverability");
  }
  if (BTM_SetConnectability(BTM_NON_CONNECTABLE) != BTM_SUCCESS) {
    log::warn("Unable to clear connectability");
    log::warn("Unable to disable classic BR/EDR connectability");
  }

  bta_dm_disable_pm();
@@ -449,10 +449,12 @@ bool BTA_DmSetVisibility(bt_scan_mode_t mode) {
  }

  if (BTM_SetDiscoverability(disc_mode_param) != BTM_SUCCESS) {
    log::warn("Unable to set discoveability");
    log::warn("Unable to set classic BR/EDR discoverability 0x{:04x}",
              disc_mode_param);
  }
  if (BTM_SetConnectability(conn_mode_param) != BTM_SUCCESS) {
    log::warn("Unable to set connectability");
    log::warn("Unable to set classic BR/EDR connectability 0x{:04x}",
              conn_mode_param);
  }
  return true;
}
@@ -1609,7 +1611,7 @@ void bta_dm_allow_wake_by_hid(
  // the adapter connectable for classic.
  if (classic_hid_devices.size() > 0) {
    if (BTM_SetConnectability(BTM_CONNECTABLE) != BTM_SUCCESS) {
      log::warn("Unable to set connectability");
      log::warn("Unable to enable classic BR/EDR connectability");
    }
  }