OSDN Git Service

Reland Start the media encoder for a successful BTA_AV_START_EVT
authorCheney Ni <cheneyni@google.com>
Tue, 26 Feb 2019 03:56:25 +0000 (11:56 +0800)
committerHansong Zhang <hsz@google.com>
Thu, 28 Feb 2019 00:33:32 +0000 (16:33 -0800)
commit7036662ec1070a7cadc59d163064fd3c1b3dc8b3
tree74852830dd5e5153c78ac8d1467cc61edd86800e
parente53427f2386648d4b861df12e387567d01b2a109
Reland Start the media encoder for a successful BTA_AV_START_EVT

When phone is A2DP source and receives BTA_AV_START_EVT, we need to
proceed to start the encoder of software or offload, and ack back to
audio HAL. When issue happened, the remote as the AVDTP_START initiator
triggered BTA_AV_START_EVT, and caused we did not start the encoder to
stream the audio. This change simplified the handler of BTA_AV_START_EVT
to always start the encoder for a successful event, and ack to audio HAL
if we are AVDTP initiator.

Bug: 126136429
Test: A2DP play and paused manually on Pixel 2 and Pixel 3
Change-Id: Ieb479fd6f42da1bf37f8f32af7794d86e04cac1b
btif/include/btif_a2dp.h
btif/src/btif_a2dp.cc
btif/src/btif_av.cc