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

Commit 6ada2d73 authored by Zach Johnson's avatar Zach Johnson
Browse files

btif_dm_execute_service_request is safe to call from main thread

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I304005aaf5e75c2153aadd83d58d796c09f9c1a6
parent abb77561
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -830,9 +830,7 @@ bt_status_t btif_enable_service(tBTA_SERVICE_ID service_id) {
                   btif_enabled_services);

  if (btif_is_enabled()) {
    btif_transfer_context(btif_dm_execute_service_request,
                          BTIF_DM_ENABLE_SERVICE, (char*)p_id,
                          sizeof(tBTA_SERVICE_ID), NULL);
    btif_dm_execute_service_request(BTIF_DM_ENABLE_SERVICE, (char*)p_id);
  }

  return BT_STATUS_SUCCESS;
@@ -862,9 +860,7 @@ bt_status_t btif_disable_service(tBTA_SERVICE_ID service_id) {
                   btif_enabled_services);

  if (btif_is_enabled()) {
    btif_transfer_context(btif_dm_execute_service_request,
                          BTIF_DM_DISABLE_SERVICE, (char*)p_id,
                          sizeof(tBTA_SERVICE_ID), NULL);
    btif_dm_execute_service_request(BTIF_DM_DISABLE_SERVICE, (char*)p_id);
  }

  return BT_STATUS_SUCCESS;