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

Commit 5c9120f9 authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Gerrit Code Review
Browse files

Merge changes I9591c300,I68a30646 into main

* changes:
  Removing flag bta_dm_disc_stuck_in_cancelling_fix
  Removing flag connect_hid_after_service_discovery
parents 77dc0f35 485ce9cc
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -8,20 +8,6 @@ flag {
    bug: "311196228"
}

flag {
    name: "connect_hid_after_service_discovery"
    namespace: "bluetooth"
    description: "Don't initiate HID connection before pairing and service discovery"
    bug: "314707251"
}

flag {
    name: "bta_dm_disc_stuck_in_cancelling_fix"
    namespace: "bluetooth"
    description: "Fix being stuck in BTA_DM_SEARCH_CANCELLING"
    bug: "319890673"
}

flag {
    name: "bta_dm_defer_device_discovery_state_change_until_rnr_complete"
    namespace: "bluetooth"
+3 −6
Original line number Diff line number Diff line
@@ -617,14 +617,11 @@ static void bta_dm_gatt_disc_complete(uint16_t conn_id, tGATT_STATUS status) {
  } else {
    bta_dm_discovery_cb.conn_id = GATT_INVALID_CONN_ID;

    if (com::android::bluetooth::flags::bta_dm_disc_stuck_in_cancelling_fix()) {
      log::info(
          "Discovery complete for invalid conn ID. Will pick up next job");
    log::info("Discovery complete for invalid conn ID. Will pick up next job");
    bta_dm_discovery_set_state(BTA_DM_DISCOVER_IDLE);
    bta_dm_execute_queued_discovery_request();
  }
}
}

/*******************************************************************************
 *
+4 −7
Original line number Diff line number Diff line
@@ -1836,15 +1836,12 @@ static void bta_dm_gatt_disc_complete(uint16_t conn_id, tGATT_STATUS status) {
  } else {
    bta_dm_search_cb.conn_id = GATT_INVALID_CONN_ID;

    if (com::android::bluetooth::flags::bta_dm_disc_stuck_in_cancelling_fix()) {
      log::info(
          "Discovery complete for invalid conn ID. Will pick up next job");
    log::info("Discovery complete for invalid conn ID. Will pick up next job");
    bta_dm_search_set_state(BTA_DM_SEARCH_IDLE);
    bta_dm_free_sdp_db();
    bta_dm_execute_queued_request();
  }
}
}

/*******************************************************************************
 *
+1 −14
Original line number Diff line number Diff line
@@ -854,20 +854,7 @@ static void btif_dm_cb_create_bond(const RawAddress bd_addr,
                       static_cast<tBT_DEVICE_TYPE>(device_type));
  }

  if (!com::android::bluetooth::flags::connect_hid_after_service_discovery() &&
      is_hid && (device_type & BT_DEVICE_TYPE_BLE) == 0) {
    tAclLinkSpec link_spec;
    link_spec.addrt.bda = bd_addr;
    link_spec.addrt.type = addr_type;
    link_spec.transport = transport;
    const bt_status_t status =
        GetInterfaceToProfiles()->profileSpecific_HACK->btif_hh_connect(
            link_spec);
    if (status != BT_STATUS_SUCCESS)
      bond_state_changed(status, bd_addr, BT_BOND_STATE_NONE);
  } else {
  BTA_DmBond(bd_addr, addr_type, transport, device_type);
  }
  /*  Track  originator of bond creation  */
  pairing_cb.is_local_initiated = true;
}