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

Commit 401479fa authored by Bill Yi's avatar Bill Yi Committed by Gerrit Code Review
Browse files

Merge "Merge android10-qpr2-s3-release to aosp/master - DO NOT MERGE"

parents 60bc036e ba2063bc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <base/logging.h>

#include "osi/include/log.h"
#include "service/logging_helpers.h"
#include "stack/include/bt_types.h"

@@ -118,6 +119,12 @@ bool GattServer::SendResponse(const std::string& device_address, int request_id,
    return false;
  }

  if (offset < 0) {
    android_errorWriteLog(0x534e4554, "143231677");
    LOG(ERROR) << "Offset is less than 0 offset: " << offset;
    return false;
  }

  if (value.size() + offset > BTGATT_MAX_ATTR_LEN) {
    LOG(ERROR) << "Value is too large";
    return false;
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
typedef struct {
  HANDLE_AACDECODER aac_handle;
  bool has_aac_handle;  // True if aac_handle is valid
  INT_PCM* decode_buf;
  INT_PCM* decode_buf = nullptr;
  decoded_data_callback_t decode_callback;
} tA2DP_AAC_DECODER_CB;

@@ -58,7 +58,7 @@ bool a2dp_aac_decoder_init(decoded_data_callback_t decode_callback) {
void a2dp_aac_decoder_cleanup(void) {
  if (a2dp_aac_decoder_cb.has_aac_handle)
    aacDecoder_Close(a2dp_aac_decoder_cb.aac_handle);
  free(a2dp_aac_decoder_cb.decode_buf);
  osi_free(a2dp_aac_decoder_cb.decode_buf);
  memset(&a2dp_aac_decoder_cb, 0, sizeof(a2dp_aac_decoder_cb));
}