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

Commit 65c08f2e authored by Ruina Liu's avatar Ruina Liu
Browse files

HOGP connection with some HOGP devices were slowed down

Updating connection parameter with non-zero latency before finishing
HOGP connection causes some HOGP devices reponse slowly during
profile connection. To avoid slowing down the connection, use interop
list to set zero latency for those devices. They can request proper
latency later based on its power state.

Bug: 346692549
Test: m com.android.btservices
Test pairing and reconnecting HOGP devices(Mad mouse) and confirm
the connection won't be slow down.

Change-Id: Ida03591bc4fa5137bd4b6960b4a92cf4f8ea3b15
parent 6460734d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,11 @@ static void read_pref_conn_params_cb(uint16_t conn_id, tGATT_STATUS status,
    if (timeout < 300) timeout = 300;
  }

  if (interop_match_addr(INTEROP_HID_PREF_CONN_ZERO_LATENCY,
                         (RawAddress*)&p_dev_cb->link_spec.addrt.bda)) {
    latency = 0;
  }

  BTM_BleSetPrefConnParams(p_dev_cb->link_spec.addrt.bda, min_interval,
                           max_interval, latency, timeout);
  L2CA_UpdateBleConnParams(p_dev_cb->link_spec.addrt.bda, min_interval,
+6 −0
Original line number Diff line number Diff line
@@ -872,3 +872,9 @@ EPG = Name_Based
CANZ = Name_Based
BSK30 = Name_Based
BSK10 = Name_Based

# Some devices response slowly after setting non zero latency.
# To avoid slowing down profile connection set latency to 0.
# Peer can request proper latency based on its power state later.
[INTEROP_HID_PREF_CONN_ZERO_LATENCY]
00:15:9E = Address_Based
+5 −0
Original line number Diff line number Diff line
@@ -353,6 +353,11 @@ typedef enum {
  // Som A2DP sink devices don't respond SDP request during A2DP reconnection
  INTEROP_A2DP_SKIP_SDP_DURING_RECONNECTION,

  // Some devices response slowly after setting non zero latency.
  // To avoid slowing down profile connection set latency to 0.
  // Peer can request proper latency based on its power state later.
  INTEROP_HID_PREF_CONN_ZERO_LATENCY,

  END_OF_INTEROP_LIST
} interop_feature_t;

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