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

Commit e34e9610 authored by Martin Brabham's avatar Martin Brabham Committed by Automerger Merge Worker
Browse files

Inclusive Language Updates am: 2263ade5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1459349

Change-Id: Ie16652cd82fccc532c3487061b596bd979e69146
parents e4b098c4 2263ade5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ interface IBluetoothGatt {
    void configureMTU(in int clientIf, in String address, in int mtu);
    void connectionParameterUpdate(in int clientIf, in String address, in int connectionPriority);
    void leConnectionUpdate(int clientIf, String address, int minInterval,
                            int maxInterval, int slaveLatency, int supervisionTimeout,
                            int maxInterval, int peripheralLatency, int supervisionTimeout,
                            int minConnectionEventLen, int maxConnectionEventLen);

    void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback);
+2 −2
Original line number Diff line number Diff line
@@ -1794,7 +1794,7 @@ void bta_av_do_start(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
  }

  /* disallow role switch during streaming, only if we are the central role
   * i.e. allow role switch, if we are slave.
   * i.e. allow role switch, if we are peripheral.
   * It would not hurt us, if the peer device wants us to be central */
  if ((BTM_GetRole(p_scb->PeerAddress(), &cur_role) == BTM_SUCCESS) &&
      (cur_role == HCI_ROLE_CENTRAL)) {
@@ -2292,7 +2292,7 @@ void bta_av_start_ok(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
    /* If sink starts stream, disable sniff mode here */
    if (!initiator) {
      /* If souce is the central role, disable role switch during streaming.
       * Otherwise allow role switch, if source is slave.
       * Otherwise allow role switch, if source is peripheral.
       * Because it would not hurt source, if the peer device wants source to be
       * central */
      if ((BTM_GetRole(p_scb->PeerAddress(), &cur_role) == BTM_SUCCESS) &&
+2 −2
Original line number Diff line number Diff line
@@ -842,7 +842,7 @@ static void bta_av_sys_rs_cback(UNUSED_ATTR tBTA_SYS_CONN_STATUS status,
  /* restore role switch policy, if role switch failed */
  if ((HCI_SUCCESS != app_id) &&
      (BTM_GetRole(peer_addr, &cur_role) == BTM_SUCCESS) &&
      (cur_role == HCI_ROLE_SLAVE)) {
      (cur_role == HCI_ROLE_PERIPHERAL)) {
    BTM_unblock_role_switch_for(peer_addr);
  }

@@ -941,7 +941,7 @@ static void bta_av_sco_chg_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
 * Function         bta_av_switch_if_needed
 *
 * Description      This function checks if there is another existing AV
 *                  channel that is local as slave role.
 *                  channel that is local as peripheral role.
 *                  If so, role switch and remove it from link policy.
 *
 * Returns          true, if role switch is done
+6 −6
Original line number Diff line number Diff line
@@ -2157,10 +2157,10 @@ static void handle_role_change(const RawAddress& bd_addr, uint8_t new_role,
    bool need_policy_change = false;

    /* there's AV activity on this link */
    if (new_role == HCI_ROLE_SLAVE && bta_dm_cb.device_list.count > 1 &&
    if (new_role == HCI_ROLE_PERIPHERAL && bta_dm_cb.device_list.count > 1 &&
        hci_status == HCI_SUCCESS) {
      /* more than one connections and the AV connection is role switched
       * to slave
       * to peripheral
       * switch it back to central and remove the switch policy */
      BTM_SwitchRole(bd_addr, HCI_ROLE_CENTRAL);
      need_policy_change = true;
@@ -2543,7 +2543,7 @@ static void bta_dm_adjust_roles(bool delay_role_switch) {
            delayed to avoid the collision with link encryption setup */

          if (bta_dm_cb.device_list.peer_device[i].pref_role !=
                  BTA_SLAVE_ROLE_ONLY &&
                  BTA_PERIPHERAL_ROLE_ONLY &&
              !delay_role_switch) {
            BTM_SwitchRole(bta_dm_cb.device_list.peer_device[i].peer_bdaddr,
                           HCI_ROLE_CENTRAL);
@@ -3442,13 +3442,13 @@ void bta_dm_ble_confirm_reply(const RawAddress& bd_addr, bool accept) {
/** This function set the preferred connection parameters */
void bta_dm_ble_set_conn_params(const RawAddress& bd_addr,
                                uint16_t conn_int_min, uint16_t conn_int_max,
                                uint16_t slave_latency,
                                uint16_t peripheral_latency,
                                uint16_t supervision_tout) {
  L2CA_AdjustConnectionIntervals(&conn_int_min, &conn_int_max,
                                 BTM_BLE_CONN_INT_MIN);

  BTM_BleSetPrefConnParams(bd_addr, conn_int_min, conn_int_max, slave_latency,
                           supervision_tout);
  BTM_BleSetPrefConnParams(bd_addr, conn_int_min, conn_int_max,
                           peripheral_latency, supervision_tout);
}

/** This function update LE connection parameters */
+6 −5
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ void BTA_DmBleSecurityGrant(const RawAddress& bd_addr,
 *                  scan_window      - scan window
 *                  min_conn_int     - minimum preferred connection interval
 *                  max_conn_int     - maximum preferred connection interval
 *                  slave_latency    - preferred slave latency
 *                  peripheral_latency    - preferred peripheral latency
 *                  supervision_tout - preferred supervision timeout
 *
 *
@@ -465,11 +465,12 @@ void BTA_DmBleSecurityGrant(const RawAddress& bd_addr,
 ******************************************************************************/
void BTA_DmSetBlePrefConnParams(const RawAddress& bd_addr,
                                uint16_t min_conn_int, uint16_t max_conn_int,
                                uint16_t slave_latency,
                                uint16_t peripheral_latency,
                                uint16_t supervision_tout) {
  do_in_main_thread(
      FROM_HERE, base::Bind(bta_dm_ble_set_conn_params, bd_addr, min_conn_int,
                            max_conn_int, slave_latency, supervision_tout));
      FROM_HERE,
      base::Bind(bta_dm_ble_set_conn_params, bd_addr, min_conn_int,
                 max_conn_int, peripheral_latency, supervision_tout));
}

/*******************************************************************************
@@ -484,7 +485,7 @@ void BTA_DmSetBlePrefConnParams(const RawAddress& bd_addr,
 *                                  [0x0004 ~ 0x4000]
 *                  max_int   -     maximum connection interval,
 *                                  [0x0004 ~ 0x4000]
 *                  latency   -     slave latency [0 ~ 500]
 *                  latency   -     peripheral latency [0 ~ 500]
 *                  timeout   -     supervision timeout [0x000a ~ 0xc80]
 *
 * Returns          void
Loading