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

Commit 394b5b8f authored by Rahul Arya's avatar Rahul Arya Committed by Chris Manton
Browse files

Do not stop service discovery when stopping inquiry

We already don't clear the service discovery *queue* when
cancelDiscovery() is called, but we should also let the existing
procedure keep on going.

Bug: 273759359
Test: m .
Change-Id: I9ca8a5a11210ea4689be96813bd4a52f99a3aa0d
parent a220ed0d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -211,7 +211,11 @@ bool bta_dm_search_sm_execute(const BT_HDR_RIGID* p_msg) {
          break;
        case BTA_DM_API_SEARCH_CANCEL_EVT:
          bta_dm_search_clear_queue();

          if (bluetooth::common::init_flags::
                  bta_dm_stop_discovery_on_search_cancel_is_enabled()) {
            bta_dm_search_set_state(BTA_DM_SEARCH_CANCELLING);
          }
          bta_dm_search_cancel_notify();
          break;
        case BTA_DM_DISC_CLOSE_TOUT_EVT:
+1 −0
Original line number Diff line number Diff line
@@ -366,6 +366,7 @@ init_flags!(
        btaa_hci = true,
        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,
        clear_hidd_interrupt_cid_on_disconnect = true,
        delay_hidh_cleanup_until_hidh_ready_start = true,
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ mod ffi {
        fn bta_dm_clear_conn_id_on_client_close_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;
        fn bta_dm_stop_discovery_on_search_cancel_is_enabled() -> bool;
        fn classic_discovery_only_is_enabled() -> bool;
        fn clear_hidd_interrupt_cid_on_disconnect_is_enabled() -> bool;
        fn device_iot_config_logging_is_enabled() -> bool;