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

Commit 62f9ab3b authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "Fix bta_dm_disc stuck in cancelling state" into main am: b0ceadb8 am:...

Merge "Fix bta_dm_disc stuck in cancelling state" into main am: b0ceadb8 am: fb46da17 am: 49dee478

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2907207



Change-Id: I0d4f84b3cb48d07b9594ff222885d9fe233770d0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f9e777c8 49dee478
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <cstdint>
#include <vector>

#include "android_bluetooth_flags.h"
#include "bta/dm/bta_dm_disc.h"
#include "bta/dm/bta_dm_disc_int.h"
#include "bta/include/bta_gatt_api.h"
@@ -1963,6 +1964,13 @@ static void bta_dm_gatt_disc_complete(uint16_t conn_id, tGATT_STATUS status) {
            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("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();
    }
  }
}