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

Commit 017f101f authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Straighten out tBTA_GATT_REASON am: f0aacdf0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1698153

Change-Id: I0e8a127483f2325ed8ebf6d03629b141a59e0140
parents 02b41658 f0aacdf0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ void bta_gattc_close(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data) {

  cb_data.close.client_if = p_clcb->p_rcb->client_if;
  cb_data.close.conn_id = p_clcb->bta_conn_id;
  cb_data.close.reason = 0;
  cb_data.close.reason = GATT_CONN_OK;
  cb_data.close.remote_bda = p_clcb->bda;
  cb_data.close.status = GATT_SUCCESS;

+1 −3
Original line number Diff line number Diff line
@@ -130,9 +130,7 @@ typedef struct {
typedef struct {
  BT_HDR_RIGID hdr;
  uint16_t conn_id;
  tBTA_GATT_REASON reason; /* disconnect reason code, not useful when connect
                              event is reported */

  tGATT_DISCONN_REASON reason;
} tBTA_HH_LE_CLOSE;

typedef struct {
+1 −2
Original line number Diff line number Diff line
@@ -183,8 +183,7 @@ typedef struct {
  tGATT_STATUS status;
  tGATT_IF client_if;
  RawAddress remote_bda;
  tBTA_GATT_REASON reason; /* disconnect reason code, not useful when connect
                              event is reported */
  tGATT_DISCONN_REASON reason;
} tBTA_GATTC_CLOSE;

typedef struct {
+2 −1
Original line number Diff line number Diff line
@@ -344,7 +344,8 @@ class VolumeControlImpl : public VolumeControl {
  }

  void OnGattDisconnected(uint16_t connection_id, tGATT_IF /*client_if*/,
                          RawAddress remote_bda, tBTA_GATT_REASON /*reason*/) {
                          RawAddress remote_bda,
                          tGATT_DISCONN_REASON /*reason*/) {
    VolumeControlDevice* device =
        volume_control_devices_.FindByConnId(connection_id);
    if (!device) {
+1 −1
Original line number Diff line number Diff line
@@ -344,7 +344,7 @@ class VolumeControlTest : public ::testing::Test {
        .conn_id = conn_id,
        .client_if = gatt_if,
        .remote_bda = address,
        .reason = HCI_ERR_PEER_USER,
        .reason = GATT_CONN_TERMINATE_PEER_USER,
    };

    gatt_callback(BTA_GATTC_CLOSE_EVT, (tBTA_GATTC*)&event_data);