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

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

Snap for 6928482 from bfcc532a to sc-release

Change-Id: I147bb756f8537fffc80dff2e0d334f0b1b3bebc8
parents f4fc9040 bfcc532a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -466,7 +466,9 @@ struct classic_impl : public DisconnectorForLe, public security::ISecurityManage
  void on_read_remote_supported_features_complete(EventPacketView packet) {
    auto view = ReadRemoteSupportedFeaturesCompleteView::Create(packet);
    ASSERT_LOG(view.IsValid(), "Read remote supported features packet invalid");
    LOG_INFO("UNIMPLEMENTED called");
    uint16_t handle = view.GetConnectionHandle();
    auto& acl_connection = acl_connections_.find(handle)->second;
    acl_connection.connection_management_callbacks_->OnReadRemoteExtendedFeaturesComplete(0, 1, view.GetLmpFeatures());
  }

  void on_read_remote_extended_features_complete(EventPacketView packet) {
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ cc_fuzz {
        "packages/modules/Bluetooth/system/packet/tests/avrcp",
        "packages/modules/Bluetooth/system/packet/base",
    ],
    //system/core/base/include/android-base"
    //system/libbase/include/android-base"
    srcs: [
        "change_path_req_fuzzer.cc",

+22 −22
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ void ConnectionHandler::MessageCb(uint8_t handle, uint8_t label, uint8_t opcode,
void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
                              tSDP_DISCOVERY_DB* disc_db, bool retry,
                              uint16_t status) {
  LOG(INFO) << __PRETTY_FUNCTION__ << ": SDP lookup callback received";
  VLOG(1) << __PRETTY_FUNCTION__ << ": SDP lookup callback received";

  if (status == SDP_CONN_FAILED and !retry) {
    LOG(WARNING) << __PRETTY_FUNCTION__ << ": SDP Failure retry again";
@@ -444,34 +444,34 @@ void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
      /* get profile version (if failure, version parameter is not updated) */
      sdp_->FindProfileVersionInRec(
          sdp_record, UUID_SERVCLASS_AV_REMOTE_CONTROL, &peer_avrcp_version);
      LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
      VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
              << " peer avrcp version=" << loghex(peer_avrcp_version);

      if (peer_avrcp_version >= AVRC_REV_1_3) {
        // These are the standard features, another way to check this is to
        // search for CAT1 on the remote device
        LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
        VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                << " supports metadata";
        peer_features |= (BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_METADATA);
      }
      if (peer_avrcp_version >= AVRC_REV_1_4) {
        /* get supported categories */
        LOG(INFO) << __PRETTY_FUNCTION__ << " Get Supported categories";
        VLOG(1) << __PRETTY_FUNCTION__ << " Get Supported categories";
        tSDP_DISC_ATTR* sdp_attribute =
            sdp_->FindAttributeInRec(sdp_record, ATTR_ID_SUPPORTED_FEATURES);
        if (sdp_attribute != NULL) {
          LOG(INFO) << __PRETTY_FUNCTION__
          VLOG(1) << __PRETTY_FUNCTION__
                  << "Get Supported categories SDP ATTRIBUTES != null";
          uint16_t categories = sdp_attribute->attr_value.v.u16;
          if (categories & AVRC_SUPF_CT_CAT2) {
            LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                    << " supports advanced control";
            if (IsAbsoluteVolumeEnabled(&bdaddr)) {
              peer_features |= (BTA_AV_FEAT_ADV_CTRL);
            }
          }
          if (categories & AVRC_SUPF_CT_BROWSE) {
            LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                    << " supports browsing";
            peer_features |= (BTA_AV_FEAT_BROWSE);
          }
@@ -483,13 +483,13 @@ void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
  sdp_record = sdp_->FindServiceInDb(disc_db, UUID_SERVCLASS_AV_REM_CTRL_TARGET,
                                     nullptr);
  if (sdp_record != nullptr) {
    LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
    VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            << " supports remote control target";

    uint16_t peer_avrcp_target_version = 0;
    sdp_->FindProfileVersionInRec(sdp_record, UUID_SERVCLASS_AV_REMOTE_CONTROL,
                                  &peer_avrcp_target_version);
    LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
    VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            << " peer avrcp target version="
            << loghex(peer_avrcp_target_version);

@@ -497,15 +497,15 @@ void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
        NULL) {
      if (peer_avrcp_target_version >= AVRC_REV_1_4) {
        /* get supported categories */
        LOG(INFO) << __PRETTY_FUNCTION__ << " Get Supported categories";
        VLOG(1) << __PRETTY_FUNCTION__ << " Get Supported categories";
        tSDP_DISC_ATTR* sdp_attribute =
            sdp_->FindAttributeInRec(sdp_record, ATTR_ID_SUPPORTED_FEATURES);
        if (sdp_attribute != NULL) {
          LOG(INFO) << __PRETTY_FUNCTION__
          VLOG(1) << __PRETTY_FUNCTION__
                  << "Get Supported categories SDP ATTRIBUTES != null";
          uint16_t categories = sdp_attribute->attr_value.v.u16;
          if (categories & AVRC_SUPF_CT_CAT2) {
            LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                    << " supports advanced control";
            if (IsAbsoluteVolumeEnabled(&bdaddr)) {
              peer_features |= (BTA_AV_FEAT_ADV_CTRL);
+3 −3
Original line number Diff line number Diff line
@@ -328,11 +328,11 @@ static void a2dp_sbc_encoder_update(uint16_t peer_mtu,

    if (s16BitPool < 0) s16BitPool = 0;

    LOG_INFO("%s: bitpool candidate: %d (%d kbps)", __func__, s16BitPool,
    LOG_VERBOSE("%s: bitpool candidate: %d (%d kbps)", __func__, s16BitPool,
                p_encoder_params->u16BitRate);

    if (s16BitPool > max_bitpool) {
      LOG_INFO("%s: computed bitpool too large (%d)", __func__, s16BitPool);
      LOG_VERBOSE("%s: computed bitpool too large (%d)", __func__, s16BitPool);
      /* Decrease bitrate */
      p_encoder_params->u16BitRate -= A2DP_SBC_BITRATE_STEP;
      /* Record that we have decreased the bitrate */