From: Jakub Pawlowski Date: Mon, 24 Sep 2018 14:43:59 +0000 (+0200) Subject: Send volume just once when starting the stream. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=53fdcf8645f5843ac534b79c47ceb3046a239026;p=android-x86%2Fsystem-bt.git Send volume just once when starting the stream. The volume is in the Start command already, no need to send it in a separate command. Bug: 116317072 Bug: 116044083 Bug: 116145308 Test: play music, pause, adjust volume, start playing again, verify playing was re-started with proper volume level. Change-Id: I2a900b03a35670de4a265184f333517db17497d8 Merged-In: I76f4b6a9302dd84781195475de50374e9c30700f --- diff --git a/bta/hearing_aid/hearing_aid.cc b/bta/hearing_aid/hearing_aid.cc index b7f2086ed..e49875e71 100644 --- a/bta/hearing_aid/hearing_aid.cc +++ b/bta/hearing_aid/hearing_aid.cc @@ -834,16 +834,6 @@ class HearingAidImpl : public HearingAid { BtaGattQueue::WriteCharacteristic(device.conn_id, device.audio_control_point_handle, start, GATT_WRITE, nullptr, nullptr); - - // TODO(jpawlowski): this will be removed, once test devices get volume - // from start reqest - if (current_volume != VOLUME_UNKNOWN) { - std::vector volume_value( - {static_cast(current_volume)}); - BtaGattQueue::WriteCharacteristic(device.conn_id, device.volume_handle, - volume_value, GATT_WRITE_NO_RSP, - nullptr, nullptr); - } } void OnAudioDataReady(const std::vector& data) {