OSDN Git Service

A2DP: Workaround to clean up previous AVDTP instance while re-enabling
authorCheney Ni <cheneyni@google.com>
Wed, 18 Mar 2020 08:37:29 +0000 (16:37 +0800)
committerCheney Ni <cheneyni@google.com>
Tue, 14 Apr 2020 09:44:03 +0000 (17:44 +0800)
commit3537765c21c6adb2fcb44cfff3e7f50e2bc09d59
tree2fec1648348aff73d698758025c7648d486c7333
parentf92966049c67cae0edcea4e8d5648579512d79c1
A2DP: Workaround to clean up previous AVDTP instance while re-enabling

If the user disables and re-enables A2dpService quickly, the stack has
chances to be still busy at dropping those out-of-date links, and this
is highly dependent on the handset. If the handset responds more slowly, it
spends more time to disable, but causes the new AVDTP instance won't
work. This change checks the previous disabling flag, and cleans up the
old instance up before re-enabling.

Bug: 135655859
Test: manually
Change-Id: I625cfffab6d4df327fb8159aa4b759a09d90e076
Merged-In: I625cfffab6d4df327fb8159aa4b759a09d90e076
(cherry picked from commit 07689d65f4c6fbc8b20dd0890657936fc6d6cb7b)
bta/av/bta_av_main.cc