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

Commit 369f847d authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Call BTA_VendorCleanup on proper thread

Right now this function is running on any thread that call it, i.e. one
of Binder threads. This is introducing race condition during shutdown.

Test: restart bluetooth 10 times
Fix: 74075027
Change-Id: I426284792901e6a9540cb6420a7e27a340a3fe1d
parent 842d1b84
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -527,7 +527,7 @@ void btif_disable_bluetooth_evt(void) {
bt_status_t btif_cleanup_bluetooth(void) {
bt_status_t btif_cleanup_bluetooth(void) {
  LOG_INFO(LOG_TAG, "%s entered", __func__);
  LOG_INFO(LOG_TAG, "%s entered", __func__);


  BTA_VendorCleanup();
  do_in_bta_thread(FROM_HERE, base::Bind(&BTA_VendorCleanup));


  btif_dm_cleanup();
  btif_dm_cleanup();
  btif_jni_disassociate();
  btif_jni_disassociate();