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

Commit f54e5df4 authored by Archie Pusaka's avatar Archie Pusaka Committed by Archie Pusaka
Browse files

floss: serialize HoGP and DIS

When preparing to connect HoGP profile, the following two activities
are started simultaneously.
(1) discovery of HoGP service, including register for notification
(2) discovery of DIS

In (1) we have an interop MULTIPLE_HOGP_SERVICE_CHOOSE_THIRD which
actually needs (2) to be done first. Therefore, logically the two
activities above must not run simultaneously.

Bug: 357011645
Test: m -j
Test: Verify Logitech Casa Touch is pairable and usable
Flag: EXEMPT, floss only
Change-Id: I26767f1762b7791c3142dccac5bda3819bd7c5d1
parent 0ed8ea93
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -910,6 +910,14 @@ static void bta_hh_le_dis_cback(const RawAddress& addr, tDIS_VALUE* p_dis_value)
    p_cb->dscp_info.vendor_id = p_dis_value->pnp_id.vendor_id;
    p_cb->dscp_info.version = p_dis_value->pnp_id.product_version;
  }

#if TARGET_FLOSS
  /* serialize HoGP and DIS for floss */
  Uuid pri_srvc = Uuid::From16Bit(UUID_SERVCLASS_LE_HID);
  BTA_GATTC_ServiceSearchRequest(p_cb->conn_id, pri_srvc);
  return;
#endif

  bta_hh_le_open_cmpl(p_cb);
}

@@ -932,6 +940,11 @@ static void bta_hh_le_pri_service_discovery(tBTA_HH_DEV_CB* p_cb) {
  if (!DIS_ReadDISInfo(p_cb->link_spec.addrt.bda, bta_hh_le_dis_cback, DIS_ATTR_PNP_ID_BIT)) {
    log::error("read DIS failed");
    p_cb->disc_active &= ~BTA_HH_LE_DISC_DIS;
  } else {
#if TARGET_FLOSS
    /* serialize HoGP and DIS for floss */
    return;
#endif
  }

  /* in parallel */