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

Commit 01f0ab1f authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "Remove read_model_num_fix" into main

parents 2797d9dc b19ce3d1
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
package: "com.android.bluetooth.flags"
container: "com.android.btservices"

flag {
    name: "read_model_num_fix"
    namespace: "bluetooth"
    description: "Read model number for all devices, including ones bonded through Fast Pair"
    bug: "337087330"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "bond_transport_after_bond_cancel_fix"
    namespace: "bluetooth"
+2 −4
Original line number Diff line number Diff line
@@ -3308,8 +3308,7 @@ static void btif_dm_ble_auth_cmpl_evt(tBTA_DM_AUTH_CMPL* p_auth_cmpl) {
    } else {
      btif_dm_save_ble_bonding_keys(bd_addr);

      if (com::android::bluetooth::flags::read_model_num_fix() &&
          is_le_audio_capable_during_service_discovery(bd_addr) &&
      if (is_le_audio_capable_during_service_discovery(bd_addr) &&
          !btif_model_name_known(bd_addr) &&
          get_btm_client_interface().peer.BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE)) {
        log::info("Read model name for le audio capable device");
@@ -3899,8 +3898,7 @@ void btif_dm_metadata_changed(const RawAddress& remote_bd_addr, int key,
    metadata_cb.le_audio_cache.insert_or_assign(remote_bd_addr, value);

    // TODO(b/334067583): Remove this DIS read when b/334067583 is fixed
    if (com::android::bluetooth::flags::read_model_num_fix() &&
        !btif_model_name_known(remote_bd_addr) &&
    if (!btif_model_name_known(remote_bd_addr) &&
        get_btm_client_interface().peer.BTM_IsAclConnectionUp(remote_bd_addr, BT_TRANSPORT_LE)) {
      log::info("Read model name for le audio capable device");
      if (!DIS_ReadDISInfo(remote_bd_addr, read_dis_cback, DIS_ATTR_MODEL_NUM_BIT)) {
+1 −3
Original line number Diff line number Diff line
@@ -582,9 +582,7 @@ static void gatt_le_connect_cback(uint16_t /* chan */, const RawAddress& bd_addr
    bluetooth::shim::arbiter::GetArbiter().OnLeConnect(p_tcb->tcb_idx, advertising_set.value());
  }

  bool device_le_audio_capable = com::android::bluetooth::flags::read_model_num_fix()
                                         ? is_le_audio_capable_during_service_discovery(bd_addr)
                                         : is_device_le_audio_capable(bd_addr);
  bool device_le_audio_capable = is_le_audio_capable_during_service_discovery(bd_addr);
  if (device_le_audio_capable) {
    log::info("Read model name for le audio capable device");
    if (!check_cached_model_name(bd_addr)) {