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

Commit 7b327deb authored by Archie Pusaka's avatar Archie Pusaka Committed by Archie Pusaka
Browse files

hh: Apply HoGP and DIS serialization behind a flag

Previously this is done only for Floss. Now generalize it for Android
as well. For context, see aosp/3226143.

Bug: 366293212
Bug: 367910199
Test: m -j
Flag: com.android.bluetooth.flags.serialize_hogp_and_dis
Change-Id: I4660f816a320c102eb46d50f47e3c85ccb987fc3
parent 6a02fcf4
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -912,12 +912,12 @@ static void bta_hh_le_dis_cback(const RawAddress& addr, tDIS_VALUE* p_dis_value)
    p_cb->dscp_info.version = p_dis_value->pnp_id.product_version;
  }

#if TARGET_FLOSS
  /* serialize HoGP and DIS for floss */
  /* TODO(b/367910199): un-serialize once multiservice HoGP is implemented */
  if (com::android::bluetooth::flags::serialize_hogp_and_dis()) {
    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);
}
@@ -942,10 +942,11 @@ static void bta_hh_le_pri_service_discovery(tBTA_HH_DEV_CB* p_cb) {
    log::error("read DIS failed");
    p_cb->disc_active &= ~BTA_HH_LE_DISC_DIS;
  } else {
#if TARGET_FLOSS
    /* serialize HoGP and DIS for floss */
    /* TODO(b/367910199): un-serialize once multiservice HoGP is implemented */
    if (com::android::bluetooth::flags::serialize_hogp_and_dis()) {
      log::debug("Waiting for DIS result before starting HoGP service discovery");
      return;
#endif
    }
  }

  /* in parallel */