OSDN Git Service

A2DP: Wait for previous AVDTP instance to be clean up before re-enabling
authorCheney Ni <cheneyni@google.com>
Wed, 19 Feb 2020 09:41:59 +0000 (17:41 +0800)
committerCheney Ni <cheneyni@google.com>
Tue, 14 Apr 2020 09:44:11 +0000 (17:44 +0800)
commitf2cf5ebc7f29ac8103519bf6895ceb3bf02036f7
tree886cacc42c21f101a2a13c1f7224578b641db234
parent3537765c21c6adb2fcb44cfff3e7f50e2bc09d59
A2DP: Wait for previous AVDTP instance to be clean up before re-enabling

Because more connections spend more time to disconnect, the stack may
still be busy at disabling AVDTP, if we re-enable the A2dpService
quickly. This change will defer BTA_AV_API_ENABLE and BTA_AV_API_REG
events if the stack is still disabling the previous instance, so gives
the stack half more seconds to handle its previous task.

Bug: 135655859
Test: manually
Change-Id: I8e700ce195aa634819ea1ad8cf5892cc35669e10
Merged-In: I8e700ce195aa634819ea1ad8cf5892cc35669e10
(cherry picked from commit 21fe257db23887b3000a6c8d38ee339fcccbdc2b)
bta/av/bta_av_int.h
bta/av/bta_av_main.cc
bta/sys/bta_sys.h
bta/sys/bta_sys_main.cc
stack/btu/btu_task.cc
stack/include/btu.h