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

Commit 7d8d8eda authored by Liang Li's avatar Liang Li Committed by Gerrit Code Review
Browse files

Merge "Notify socket disconnection event to socket hal for offload RFCOMM socket" into main

parents f5995978 3b66e3dc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -545,6 +545,14 @@ static void cleanup_rfc_slot(rfc_slot_t* slot) {
            slot->role ? slot->service_name : slot->service_uuid.ToString().c_str());

    slot->fd = INVALID_FD;

    if (com::android::bluetooth::flags::socket_settings_api()) {
      if (slot->data_path == BTSOCK_DATA_PATH_HARDWARE_OFFLOAD && !slot->f.server &&
          slot->socket_id != 0) {
        bluetooth::shim::GetLppOffloadManager()->SocketClosed(slot->socket_id);
        slot->socket_id = 0;
      }
    }
  }

  if (slot->app_fd != INVALID_FD) {