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

Commit eb4b0ec0 authored by David Duarte's avatar David Duarte
Browse files

Remove bta_dm_clear_conn_id_on_client_close flag

Bug: 290843638
Fix: 290843638
Test: m com.android.btservices
Change-Id: I2cec5ecc8b7d67aba76af549237b385396b20635
parent 4ccf635b
Loading
Loading
Loading
Loading
+6 −20
Original line number Diff line number Diff line
@@ -1967,10 +1967,7 @@ static void bta_dm_gatt_disc_complete(uint16_t conn_id, tGATT_STATUS status) {
      bta_sys_sendmsg(p_msg);
    }
  } else {
    if (bluetooth::common::init_flags::
            bta_dm_clear_conn_id_on_client_close_is_enabled()) {
    bta_dm_search_cb.conn_id = GATT_INVALID_CONN_ID;
    }

    if (IS_FLAG_ENABLED(bta_dm_disc_stuck_in_cancelling_fix)) {
      log::info(
@@ -2117,11 +2114,8 @@ static void bta_dm_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data) {
      log::info("BTA_GATTC_CLOSE_EVT reason = {}", p_data->close.reason);

      if (p_data->close.remote_bda == bta_dm_search_cb.peer_bdaddr) {
        if (bluetooth::common::init_flags::
                bta_dm_clear_conn_id_on_client_close_is_enabled()) {
        bta_dm_search_cb.conn_id = GATT_INVALID_CONN_ID;
      }
      }

      switch (bta_dm_search_get_state()) {
        case BTA_DM_SEARCH_IDLE:
@@ -2320,12 +2314,8 @@ bool bta_dm_search_sm_execute(const BT_HDR_RIGID* p_msg) {
          bta_dm_execute_queued_request();
          break;
        case BTA_DM_DISC_CLOSE_TOUT_EVT:
          if (bluetooth::common::init_flags::
                  bta_dm_clear_conn_id_on_client_close_is_enabled()) {
          bta_dm_close_gatt_conn(message);
          break;
          }
          [[fallthrough]];
        default:
          log::info("Received unexpected event {}[0x{:x}] in state {}",
                    bta_dm_event_text(event), event,
@@ -2358,12 +2348,8 @@ bool bta_dm_search_sm_execute(const BT_HDR_RIGID* p_msg) {
          bta_dm_search_cancel_notify();
          break;
        case BTA_DM_DISC_CLOSE_TOUT_EVT:
          if (bluetooth::common::init_flags::
                  bta_dm_clear_conn_id_on_client_close_is_enabled()) {
          bta_dm_close_gatt_conn(message);
          break;
          }
          [[fallthrough]];
        default:
          log::info("Received unexpected event {}[0x{:x}] in state {}",
                    bta_dm_event_text(event), event,
+0 −1
Original line number Diff line number Diff line
@@ -228,7 +228,6 @@ init_flags!(
        always_send_services_if_gatt_disc_done = true,
        always_use_private_gatt_for_debugging,
        bluetooth_power_telemetry = false,
        bta_dm_clear_conn_id_on_client_close = true,
        btm_dm_flush_discovery_queue_on_search_cancel,
        bta_dm_stop_discovery_on_search_cancel,
        classic_discovery_only,
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ mod ffi {

        fn always_send_services_if_gatt_disc_done_is_enabled() -> bool;
        fn always_use_private_gatt_for_debugging_is_enabled() -> bool;
        fn bta_dm_clear_conn_id_on_client_close_is_enabled() -> bool;
        fn bluetooth_power_telemetry_is_enabled() -> bool;
        fn delay_hidh_cleanup_until_hidh_ready_start_is_enabled() -> bool;
        fn btm_dm_flush_discovery_queue_on_search_cancel_is_enabled() -> bool;