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

Commit de9fc4e5 authored by Chris Manton's avatar Chris Manton
Browse files

Because #defines interleaved with {} is a nightmare

Creating ACL API

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I961af8aa686042f5253031b81457c2626fe33d17
parent f816b079
Loading
Loading
Loading
Loading
+24 −24
Original line number Diff line number Diff line
@@ -719,9 +719,12 @@ static void bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) {
      APPL_TRACE_DEBUG("%s: already in remote initiate sniff", __func__);
      return;
    }
  }
#else
  APPL_TRACE_DEBUG("bta_dm_pm_sniff cur:%d, idx:%d", mode, index);
  if (mode != BTM_PM_MD_SNIFF) {
  if (mode == BTM_PM_MD_SNIFF) {
    return;
  }
#endif
  /* if the current mode is not sniff, issue the sniff command.
   * If sniff, but SSR is not used in this link, still issue the command */
@@ -729,14 +732,12 @@ static void bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) {
  if (p_peer_dev->info & BTA_DM_DI_INT_SNIFF) {
    pwr_md.mode |= BTM_PM_MD_FORCE;
  }
    status =
        BTM_SetPowerMode(bta_dm_cb.pm_id, p_peer_dev->peer_bdaddr, &pwr_md);
  status = BTM_SetPowerMode(bta_dm_cb.pm_id, p_peer_dev->peer_bdaddr, &pwr_md);
  if (status == BTM_CMD_STORED || status == BTM_CMD_STARTED) {
    p_peer_dev->info &= ~(BTA_DM_DI_INT_SNIFF | BTA_DM_DI_ACP_SNIFF);
    p_peer_dev->info |= BTA_DM_DI_SET_SNIFF;
  } else if (status == BTM_SUCCESS) {
      APPL_TRACE_DEBUG(
          "bta_dm_pm_sniff BTM_SetPowerMode() returns BTM_SUCCESS");
    APPL_TRACE_DEBUG("bta_dm_pm_sniff BTM_SetPowerMode() returns BTM_SUCCESS");
    p_peer_dev->info &=
        ~(BTA_DM_DI_INT_SNIFF | BTA_DM_DI_ACP_SNIFF | BTA_DM_DI_SET_SNIFF);
  } else /* error */
@@ -747,7 +748,6 @@ static void bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) {
        ~(BTA_DM_DI_INT_SNIFF | BTA_DM_DI_ACP_SNIFF | BTA_DM_DI_SET_SNIFF);
  }
}
}
/*******************************************************************************
 *
 * Function         bta_dm_pm_ssr