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

Commit 2eb8c3a3 authored by Yuyang Huang's avatar Yuyang Huang
Browse files

Remove close_rfcomm_instead_of_reset flag

The flag has been enabled by default since Android 24Q2, and there have been no reports of any problems. Therefore, it is safe to remove the flag and make the behavior permanent.

Bug: 347316578
Change-Id: Ie83e19d177264c65450c3b4673b74fa977399454
Flag: com.android.bluetooth.flags.close_rfcomm_instead_of_reset
Test: m packages/modules/Bluetooth
parent ab192b16
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -29,13 +29,6 @@ flag {
    bug: "316498257"
}

flag {
    name: "close_rfcomm_instead_of_reset"
    namespace: "bluetooth"
    description: "Closing Rfcomm Connection instead of reset"
    bug: "316993992"
}

flag {
    name: "pretend_network_service"
    namespace: "bluetooth"
+1 −4
Original line number Diff line number Diff line
@@ -584,10 +584,7 @@ void bta_ag_rfc_acp_open(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
      log::info(
          "close outgoing connection before accepting {} with conn_handle={}",
          ag_scb.peer_addr, ag_scb.conn_handle);
      if (!com::android::bluetooth::flags::close_rfcomm_instead_of_reset()) {
        // Fail the outgoing connection to clean up any upper layer states
        bta_ag_rfc_fail(&ag_scb, tBTA_AG_DATA::kEmpty);
      }

      // If client port is opened, close it, state machine will handle rfcomm
      // closed in opening state as failure and pass to upper layer
      if (ag_scb.conn_handle > 0) {