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

Commit 72689620 authored by Rahul Arya's avatar Rahul Arya
Browse files

[RESTRICT AUTOMERGE] Reduce behavior change with LE ACL timeout on T

See previous CL for details. Here we constrain the change to when an
ATT control block is already allocated, so the behavior with is
*exactly* the same except for with LE CoC (where the bugfix is added).

But in U, for consistency, we might as well have the same behavior in
classic / in general, to make it more predictable. So this patch will
only go in for T-QPR2.

Ignore-AOSP-First: Only needed in QPR
Bug: 251954527
Test: atest pts-bot
Change-Id: I5f065d064fb8a9a67861811d0559f46115571580
parent d567d75b
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -2630,10 +2630,17 @@ void l2cu_no_dynamic_ccbs(tL2C_LCB* p_lcb) {
  // be in use even without a GATT client. We only timeout if either a dynamic
  // channel or a GATT client was used, since then we expect the client to
  // manage the lifecycle of the connection.

  // FOR T ONLY: We add the outer safety-check to only do this for LE/ATT, to
  // minimize behavioral changes outside a dessert release. But for consistency
  // this should happen throughout on U (i.e. for classic transport + other
  // fixed channels too)
  if (p_lcb->p_fixed_ccbs[L2CAP_ATT_CID - L2CAP_FIRST_FIXED_CHNL] != NULL) {
    if (bluetooth::common::init_flags::finite_att_timeout_is_enabled() &&
        !p_lcb->with_active_local_clients) {
      return;
    }
  }

  if (timeout_ms == 0) {
    L2CAP_TRACE_DEBUG(