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

Commit 2e5625e5 authored by Michael Sun's avatar Michael Sun Committed by Gerrit Code Review
Browse files

Merge "interop: force a MTU exchange for certain keyboards" into main

parents 8cbfa148 d5f1667e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -619,6 +619,13 @@ static void bta_hh_le_open_cmpl(tBTA_HH_DEV_CB* p_cb) {
    bta_hh_le_register_input_notif(p_cb, p_cb->mode, true);
    bta_hh_sm_execute(p_cb, BTA_HH_OPEN_CMPL_EVT, NULL);

    // Some HOGP devices requires MTU exchange be part of the initial setup to function. The size of
    // the requested MTU does not matter as long as the procedure is triggered.
    if (interop_match_vendor_product_ids(INTEROP_HOGP_FORCE_MTU_EXCHANGE, p_cb->dscp_info.vendor_id,
                                         p_cb->dscp_info.product_id)) {
      BTA_GATTC_ConfigureMTU(p_cb->conn_id, GATT_MAX_MTU_SIZE);
    }

    if (!com::android::bluetooth::flags::prevent_hogp_reconnect_when_connected()) {
      if (kBTA_HH_LE_RECONN && p_cb->status == BTA_HH_OK) {
        bta_hh_le_add_dev_bg_conn(p_cb);
+4 −0
Original line number Diff line number Diff line
@@ -872,3 +872,7 @@ BSK10 = Name_Based
# bytes).
[INTEROP_HOGP_LONG_REPORT]
0x03f6-0xa001 = Vndr_Prdt_Based

# Some HOGP devices requires MTU exchange be part of the initial setup to function.
[INTEROP_HOGP_FORCE_MTU_EXCHANGE]
0x03f6-0xa001 = Vndr_Prdt_Based
+3 −0
Original line number Diff line number Diff line
@@ -360,6 +360,9 @@ typedef enum {
  // bytes).
  INTEROP_HOGP_LONG_REPORT,

  // Some HOGP devices requires MTU exchange be part of the initial setup to function.
  INTEROP_HOGP_FORCE_MTU_EXCHANGE,

  END_OF_INTEROP_LIST
} interop_feature_t;

+1 −0
Original line number Diff line number Diff line
@@ -394,6 +394,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) {
    CASE_RETURN_STR(INTEROP_A2DP_SKIP_SDP_DURING_RECONNECTION);
    CASE_RETURN_STR(INTEROP_HID_PREF_CONN_ZERO_LATENCY);
    CASE_RETURN_STR(INTEROP_HOGP_LONG_REPORT);
    CASE_RETURN_STR(INTEROP_HOGP_FORCE_MTU_EXCHANGE);
  }
  return UNKNOWN_INTEROP_FEATURE;
}