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

Commit 98dae3d2 authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge "gatts load bonded for service change" am: 067e37d9

parents 1f45c7f6 067e37d9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -125,6 +125,8 @@ void bta_gatts_enable(tBTA_GATTS_CB* p_cb) {

    p_cb->enabled = true;

    gatt_load_bonded();

    if (!GATTS_NVRegister(&bta_gatts_nv_cback)) {
      LOG(ERROR) << "BTA GATTS NV register failed.";
    }
+8 −0
Original line number Diff line number Diff line
@@ -368,3 +368,11 @@ void BTA_GATTS_Close(uint16_t conn_id) {

  bta_sys_sendmsg(p_buf);
}

void BTA_GATTS_InitBonded(void) {
  LOG(INFO) << __func__;

  BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
  p_buf->event = BTA_GATTS_API_INIT_BONDED_EVT;
  bta_sys_sendmsg(p_buf);
}
+3 −1
Original line number Diff line number Diff line
@@ -51,7 +51,9 @@ enum {
  BTA_GATTS_API_OPEN_EVT,
  BTA_GATTS_API_CANCEL_OPEN_EVT,
  BTA_GATTS_API_CLOSE_EVT,
  BTA_GATTS_API_DISABLE_EVT
  BTA_GATTS_API_DISABLE_EVT,

  BTA_GATTS_API_INIT_BONDED_EVT,
};
typedef uint16_t tBTA_GATTS_INT_EVT;

+4 −0
Original line number Diff line number Diff line
@@ -105,6 +105,10 @@ bool bta_gatts_hdl_event(BT_HDR_RIGID* p_msg) {
      break;
    }

    case BTA_GATTS_API_INIT_BONDED_EVT:
      gatt_load_bonded();
      break;

    default:
      break;
  }
+3 −0
Original line number Diff line number Diff line
@@ -1024,4 +1024,7 @@ extern void BTA_GATTS_CancelOpen(tGATT_IF server_if,
 ******************************************************************************/
extern void BTA_GATTS_Close(uint16_t conn_id);

// Adds bonded device for GATT server tracking service changes
extern void BTA_GATTS_InitBonded(void);

#endif /* BTA_GATT_API_H */
Loading