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

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

Snap for 5058880 from 8cf3463e to pi-qpr2-release

Change-Id: I416392f9de692c9d6c49da48a9467a6117d97d71
parents 7418b4a9 8cf3463e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ constexpr uint8_t CONTROL_POINT_OP_STOP = 0x02;
constexpr int8_t VOLUME_UNKNOWN = 127;
constexpr int8_t VOLUME_MIN = -127;

// audio type
constexpr uint8_t AUDIOTYPE_UNKNOWN = 0x00;

namespace {

// clang-format off
@@ -408,7 +411,7 @@ class HearingAidImpl : public HearingAid {

    // Set data length
    // TODO(jpawlowski: for 16khz only 87 is required, optimize
    BTM_SetBleDataLength(address, 168);
    BTM_SetBleDataLength(address, 167);

    tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(address);
    if (p_dev_rec) {
@@ -839,7 +842,7 @@ class HearingAidImpl : public HearingAid {

  void SendStart(const HearingDevice& device) {
    std::vector<uint8_t> start({CONTROL_POINT_OP_START, codec_in_use,
                                0x02 /* media */, (uint8_t)current_volume});
                                AUDIOTYPE_UNKNOWN, (uint8_t)current_volume});

    if (current_volume == VOLUME_UNKNOWN) start[3] = (uint8_t)VOLUME_MIN;

+2 −1
Original line number Diff line number Diff line
@@ -529,7 +529,8 @@ static void btif_a2dp_source_end_session_delayed(
    BluetoothMetricsLogger::GetInstance()->LogBluetoothSessionEnd(
        system_bt_osi::DISCONNECT_REASON_UNKNOWN, 0);
  }
  if (btif_a2dp_source_cb.State() == BtifA2dpSource::kStateRunning) {
  if ((btif_a2dp_source_cb.State() == BtifA2dpSource::kStateRunning) ||
      (btif_a2dp_source_cb.State() == BtifA2dpSource::kStateShuttingDown)) {
    btif_av_stream_stop(peer_address);
  } else {
    LOG_ERROR(LOG_TAG, "%s: A2DP Source media task is not running", __func__);