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

Commit beacb06c authored by Pomai Ahlo's avatar Pomai Ahlo Committed by Gerrit Code Review
Browse files

Merge "Remove flag rfcomm_always_use_mitm" into main

parents 15445688 61821366
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
package: "com.android.bluetooth.flags"
container: "com.android.btservices"

flag {
    name: "rfcomm_always_use_mitm"
    namespace: "bluetooth"
    description: "Use MITM initially to avoid abrupt peer disconnection b/312840315"
    bug: "316824288"
}

flag {
    name: "rfcomm_prevent_unnecessary_collisions"
    namespace: "bluetooth"
+6 −8
Original line number Diff line number Diff line
@@ -1527,14 +1527,12 @@ void bta_jv_rfcomm_connect(tBTA_SEC sec_mask, uint8_t remote_scn, const RawAddre
                  },
  };

  if (com::android::bluetooth::flags::rfcomm_always_use_mitm()) {
  // Update security service record for RFCOMM client so that
  // secure RFCOMM connection will be authenticated with MTIM protection
  // while creating the L2CAP connection.
    get_btm_client_interface().security.BTM_SetSecurityLevel(
            true, "RFC_MUX", BTM_SEC_SERVICE_RFC_MUX, sec_mask, BT_PSM_RFCOMM, BTM_SEC_PROTO_RFCOMM,
            0);
  }
  get_btm_client_interface().security.BTM_SetSecurityLevel(true, "RFC_MUX", BTM_SEC_SERVICE_RFC_MUX,
                                                           sec_mask, BT_PSM_RFCOMM,
                                                           BTM_SEC_PROTO_RFCOMM, 0);

  if (RFCOMM_CreateConnectionWithSecurity(
              UUID_SERVCLASS_SERIAL_PORT, remote_scn, false, BTA_JV_DEF_RFC_MTU, peer_bd_addr,