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

Commit aecb51d0 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6406367 from b0aa88f0 to rvc-release

Change-Id: If820e26f431def16293ee979371dae000f3c04ba
parents 3e1b66c3 b0aa88f0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@
    {
      "name" : "net_test_stack_gatt_native",
      "host" : true
    },
    {
      "name" : "net_test_stack_a2dp_native",
      "host" : true
    }
  ]
}
+0 −1
Original line number Diff line number Diff line
apex {
    name: "com.android.bluetooth.updatable",
    updatable: true,
    min_sdk_version: "R",

    manifest: "apex_manifest.json",
+33 −0
Original line number Diff line number Diff line
@@ -502,3 +502,36 @@ cc_test {
        misc_undefined: ["bounds"],
    },
}

cc_test {
    name: "net_test_stack_a2dp_native",
    defaults: ["fluoride_defaults"],
    test_suites: ["device-tests"],
    host_supported: true,
    include_dirs: [
        "external/libldac/inc",
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/stack/include",
    ],
    srcs: [
        "test/a2dp/a2dp_vendor_ldac_decoder_test.cc",
        "test/a2dp/misc_fake.cc",
    ],
    shared_libs: [
        "libcrypto",
        "libcutils",
        "libprotobuf-cpp-lite",
    ],
    static_libs: [
        "libbt-common",
        "libbt-protos-lite",
        "liblog",
        "libosi",
        "libosi-AllocationTestHarness",
    ],
    sanitize: {
        address: true,
        cfi: true,
        misc_undefined: ["bounds"],
    },
}
+13 −1
Original line number Diff line number Diff line
@@ -203,11 +203,23 @@ void a2dp_vendor_ldac_decoder_cleanup(void) {
}

bool a2dp_vendor_ldac_decoder_decode_packet(BT_HDR* p_buf) {
  pthread_mutex_lock(&(a2dp_ldac_decoder_cb.mutex));
  if (p_buf == nullptr) {
    LOG(ERROR) << __func__ << "Dropping packet with nullptr";
    return false;
  }

  unsigned char* pBuffer =
      reinterpret_cast<unsigned char*>(p_buf->data + p_buf->offset);
  //  unsigned int bufferSize = p_buf->len;
  unsigned int bytesValid = p_buf->len;

  if (bytesValid == 0) {
    LOG(WARNING) << __func__ << "Dropping packet with zero length";
    return false;
  }

  pthread_mutex_lock(&(a2dp_ldac_decoder_cb.mutex));

  LDACBT_SMPL_FMT_T fmt;
  int bs_bytes, frame_number;

+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ extern "C" {
#endif /* LDAC_BCO_API */

/* This file contains the definitions, declarations and macros for an
 * implimentation of LDAC buffer control operation.
 * implementation of LDAC buffer control operation.
 */

#define LDAC_BCO_ERR_NONE 0
Loading