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

Commit 093e6a86 authored by William Escande's avatar William Escande
Browse files

BTA_GATTC_SRVC_CHG_EVT: use proper field

Follow-up of aosp/3185960 to expand fix to all applicable cases

Bug: 328846967
Test: m com.android.btservices
Flag: EXEMPT, minor bugfix
Change-Id: I9aa02504d7d2123cc7e31af82c09a0c6c51d2e67
parent adef9979
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1477,9 +1477,10 @@ static bool bta_gattc_process_srvc_chg_ind(uint16_t conn_id, tBTA_GATTC_RCB* p_c

  /* notify applicationf or service change */
  if (p_clrcb->p_cback) {
    tBTA_GATTC bta_gattc;
    bta_gattc.service_changed.remote_bda = p_srcb->server_bda;
    bta_gattc.service_changed.conn_id = conn_id;
    tBTA_GATTC bta_gattc = {.service_changed = {
                                    .remote_bda = p_srcb->server_bda,
                                    .conn_id = conn_id,
                            }};
    (*p_clrcb->p_cback)(BTA_GATTC_SRVC_CHG_EVT, &bta_gattc);
  }

+1 −1
Original line number Diff line number Diff line
@@ -1811,7 +1811,7 @@ private:
        break;

      case BTA_GATTC_SRVC_CHG_EVT:
        OnGattServiceChangeEvent(p_data->remote_bda);
        OnGattServiceChangeEvent(p_data->service_changed.remote_bda);
        break;

      case BTA_GATTC_SRVC_DISC_DONE_EVT:
+2 −2
Original line number Diff line number Diff line
@@ -2057,14 +2057,14 @@ static void hearingaid_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data)
      if (!instance) {
        return;
      }
      instance->OnServiceChangeEvent(p_data->remote_bda);
      instance->OnServiceChangeEvent(p_data->service_changed.remote_bda);
      break;

    case BTA_GATTC_SRVC_DISC_DONE_EVT:
      if (!instance) {
        return;
      }
      instance->OnServiceDiscDoneEvent(p_data->service_changed.remote_bda);
      instance->OnServiceDiscDoneEvent(p_data->remote_bda);
      break;
    case BTA_GATTC_PHY_UPDATE_EVT: {
      if (!instance) {
+1 −1
Original line number Diff line number Diff line
@@ -2217,7 +2217,7 @@ static void bta_hh_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data) {
      break;

    case BTA_GATTC_SRVC_CHG_EVT:
      link_spec.addrt.bda = p_data->remote_bda;
      link_spec.addrt.bda = p_data->service_changed.remote_bda;
      bta_hh_le_service_changed(link_spec);
      break;

+1 −1
Original line number Diff line number Diff line
@@ -5770,7 +5770,7 @@ void le_audio_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data) {
      break;

    case BTA_GATTC_SRVC_CHG_EVT:
      instance->OnServiceChangeEvent(p_data->remote_bda);
      instance->OnServiceChangeEvent(p_data->service_changed.remote_bda);
      break;
    case BTA_GATTC_CFG_MTU_EVT:
      instance->OnMtuChanged(p_data->cfg_mtu.conn_id, p_data->cfg_mtu.mtu);
Loading