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

Commit 71f004c7 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

Merge "leaudio/vc/csis: Fix handling BTA_GATTC_ENC_CMPL_CB_EVT" into tm-dev am: fc3c3b2d

parents 7eb233d0 fc3c3b2d
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1558,9 +1558,15 @@ class CsisClientImpl : public CsisClient {
        OnGattNotification(p_data->notify);
        break;

      case BTA_GATTC_ENC_CMPL_CB_EVT:
        OnLeEncryptionComplete(p_data->enc_cmpl.remote_bda, BTM_SUCCESS);
        break;
      case BTA_GATTC_ENC_CMPL_CB_EVT: {
        uint8_t encryption_status;
        if (BTM_IsEncrypted(p_data->enc_cmpl.remote_bda, BT_TRANSPORT_LE)) {
          encryption_status = BTM_SUCCESS;
        } else {
          encryption_status = BTM_FAILED_ON_SECURITY;
        }
        OnLeEncryptionComplete(p_data->enc_cmpl.remote_bda, encryption_status);
      } break;

      case BTA_GATTC_SRVC_CHG_EVT:
        OnGattServiceChangeEvent(p_data->remote_bda);
+10 −3
Original line number Diff line number Diff line
@@ -3634,9 +3634,16 @@ void le_audio_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data) {
                                p_data->open.transport, p_data->open.mtu);
      break;

    case BTA_GATTC_ENC_CMPL_CB_EVT:
      instance->OnEncryptionComplete(p_data->enc_cmpl.remote_bda, BTM_SUCCESS);
      break;
    case BTA_GATTC_ENC_CMPL_CB_EVT: {
      uint8_t encryption_status;
      if (BTM_IsEncrypted(p_data->enc_cmpl.remote_bda, BT_TRANSPORT_LE)) {
        encryption_status = BTM_SUCCESS;
      } else {
        encryption_status = BTM_FAILED_ON_SECURITY;
      }
      instance->OnEncryptionComplete(p_data->enc_cmpl.remote_bda,
                                     encryption_status);
    } break;

    case BTA_GATTC_CLOSE_EVT:
      instance->OnGattDisconnected(
+10 −3
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
#include "gd/common/strings.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "stack/btm/btm_sec.h"
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"

@@ -1014,9 +1015,15 @@ class VolumeControlImpl : public VolumeControl {
        OnNotificationEvent(n.conn_id, n.handle, n.len, n.value);
      } break;

      case BTA_GATTC_ENC_CMPL_CB_EVT:
        OnEncryptionComplete(p_data->enc_cmpl.remote_bda, BTM_SUCCESS);
        break;
      case BTA_GATTC_ENC_CMPL_CB_EVT: {
        uint8_t encryption_status;
        if (!BTM_IsEncrypted(p_data->enc_cmpl.remote_bda, BT_TRANSPORT_LE)) {
          encryption_status = BTM_SUCCESS;
        } else {
          encryption_status = BTM_FAILED_ON_SECURITY;
        }
        OnEncryptionComplete(p_data->enc_cmpl.remote_bda, encryption_status);
      } break;

      case BTA_GATTC_SRVC_CHG_EVT:
        OnServiceChangeEvent(p_data->remote_bda);